Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shuang
    Senior Member
    • Jul 2011
    • 100

    #1

    counting RNA-seq matches

    I have a data set of RNA-seq. I also have a set of genome wide coding sequences.

    My goal is to count the number of matches of each coding sequence which is queried by RNA-seq. What kind of tools would fit my purpose?
  • chadn737
    Senior Member
    • Jan 2009
    • 392

    #2
    htseq-count

    Comment

    • shuang
      Senior Member
      • Jul 2011
      • 100

      #3
      I was also suggested to use Bowtie. Bowtie basically outputs an alignment report. Then, how to do the counting/statistics part?

      Comment

      • chadn737
        Senior Member
        • Jan 2009
        • 392

        #4
        The program I mentioned above, htseq-count, takes a sam alignment file and a gtf/gff file describing your features and gives you the number of reads aligning to each feature. This is then appropriate for use in various statistical programs such as DESeq and EdgeR.

        Comment

        • arvid
          Senior Member
          • Jul 2011
          • 156

          #5
          I like to use RSEM for mapping (uses Bowtie) and isoform expression estimations, followed by DESeq for the differential expression statistics.

          If you just want raw read counts, map your reads (take some time to find the right software and options here, as this depends on the sequencing technology, sample and reference) and extract the counts from the BAM file with "samtools idxstats".

          Comment

          • steven
            Senior Member
            • Aug 2009
            • 269

            #6
            Originally posted by arvid View Post
            I like to use RSEM for mapping (uses Bowtie) and isoform expression estimations, followed by DESeq for the differential expression statistics.

            If you just want raw read counts, map your reads (take some time to find the right software and options here, as this depends on the sequencing technology, sample and reference) and extract the counts from the BAM file with "samtools idxstats".
            "samtools idxstats file.bam" seems to compute the number of reads per reference sequence -typically chromosomes. To get the number of reads per gene htseq-count is a valid option indeed. I think that BEDtools is another one.
            BTW, I am curious to know if one is much faster than the other one.

            Comment

            • mgogol
              Senior Member
              • Mar 2008
              • 197

              #7
              BEDtools coverageBed with a bed file of genes can be used with a bam file from bowtie...

              Comment

              • elemenTY
                Junior Member
                • Sep 2011
                • 1

                #8
                Beside Simon's python-based HTSeq , If you have experience with R and bioconductor, summarizeOverlaps function in GenomicRanges is easy to use too, following the same pattern defined in HTSeq


                countByOverlaps could also do the trick if you can manage your data and features into the right forms.

                Comment

                • shuang
                  Senior Member
                  • Jul 2011
                  • 100

                  #9
                  I used bowtie for alignment and samtools idxstats for counting. It works!

                  However, bowtie only allows me set a alignment constrain by a number of mismatches. Can I set a constrain by either identity percentage or P-value via bowtie or other tools?

                  Comment

                  • shuang
                    Senior Member
                    • Jul 2011
                    • 100

                    #10
                    My data reads are all bout 100bp. I want to count any alignments which are 90% identified and up. I notice that bowtie only allows max mismatches to be 3. How do I increase mismatch to be 10?

                    Comment

                    • arvid
                      Senior Member
                      • Jul 2011
                      • 156

                      #11
                      Originally posted by shuang View Post
                      My data reads are all bout 100bp. I want to count any alignments which are 90% identified and up. I notice that bowtie only allows max mismatches to be 3. How do I increase mismatch to be 10?
                      With Bowtie, the -n option (0-3) is for the seed only (usually the first 28 bases in the read), if you increase -e (max sum of mismatch quals) more mismatches in the whole alignment are allowed. You could also use the -v option (report end-to-end hits w/ <=v mismatches; ignore qualities) instead of -e if you want to allow a specific number of mismatches.

                      The settings in Bowtie2 (currently in beta5) are simplified and might suit your purposes better...

                      Comment

                      • shuang
                        Senior Member
                        • Jul 2011
                        • 100

                        #12
                        the average read length of my RNA-seq is 83. The reference sequences are coding sequences, including genomic, chloroplast, and mitochondria of the same species and strain.

                        Ideally, I want to set a threshold about 90% identity in finding matches. I set the parameters as -n 2 -l 15 -e 10

                        However, the aligned reads were only about 30% while I expected it to be almost 100%. Where did I do wrong?

                        Comment

                        • arvid
                          Senior Member
                          • Jul 2011
                          • 156

                          #13
                          Originally posted by shuang View Post
                          the average read length of my RNA-seq is 83. The reference sequences are coding sequences, including genomic, chloroplast, and mitochondria of the same species and strain.

                          Ideally, I want to set a threshold about 90% identity in finding matches. I set the parameters as -n 2 -l 15 -e 10

                          However, the aligned reads were only about 30% while I expected it to be almost 100%. Where did I do wrong?
                          Not sure whether you'll see massive improvements, but you should set -e much higher (you set it lower than the default 70), it is in mismatch qualities, not bases. Try something extreme like "-e 9999999" to see whether that gives you more alignments...

                          Comment

                          • shuang
                            Senior Member
                            • Jul 2011
                            • 100

                            #14
                            Thank you. This works!

                            I have one more question about the alignment. How do I set a threshold on P value or the minimum length of alignments. Basically, I don't want alignments which are too short, such as shorted than 50bp.

                            Comment

                            Latest Articles

                            Collapse

                            • SEQadmin2
                              Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                              by SEQadmin2



                              CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                              Despite this, “CRISPR helped turn genome editing from a specialized technique into
                              ...
                              07-31-2026, 11:01 AM
                            • SEQadmin2
                              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                              by SEQadmin2


                              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                              The systematic characterization of the human proteome has
                              ...
                              07-20-2026, 11:48 AM
                            • SEQadmin2
                              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                              by SEQadmin2



                              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                              ...
                              07-09-2026, 11:10 AM

                            ad_right_rmr

                            Collapse

                            News

                            Collapse

                            Topics Statistics Last Post
                            Started by SEQadmin2, Yesterday, 10:13 AM
                            0 responses
                            14 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 07-31-2026, 02:55 AM
                            0 responses
                            27 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 07-24-2026, 12:17 PM
                            0 responses
                            20 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 07-23-2026, 11:41 AM
                            0 responses
                            19 views
                            0 reactions
                            Last Post SEQadmin2  
                            Working...