Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extracting base coverage and quality values from BAM files

    Experts,
    I am interested in extracting base coverage and quality values for non SNP reads from a BAM file?
    Thanks,
    -Uma

  • #2
    pileup in samtools may be what you need.

    Comment


    • #3
      Yes, pileup is the tool from samtools to display coverage / quality information
      --
      bioinfosm

      Comment


      • #4
        Thanks for the info.
        Here is what I have tried so far to view the file for a given sample:
        samtools view filename.bam chr:start-end

        For non SNP positions, I am getting the base coverage using the following command:
        samtools view filename.bam chr:start-end |wc -l

        Sometimes the actual position is missing when I grep it and ~50 bases around it are printed. My question is how can I trust the wc -l value for a position if that position itself is missing in the BAM file?
        Last edited by unagaswamy; 10-21-2010, 12:37 PM.

        Comment


        • #5
          Hi Experts,
          Can anyone tell me how to extract the base quality from the CQ field of the BAM file? I colleague of mine mentioned that every two ASCII character corresponds to the SOLiD color space. Do I take the average of every overlapping 2 or the max? Any input in this regard is gretaly appreciated!

          Comment


          • #6
            Originally posted by unagaswamy View Post
            Hi Experts,
            Can anyone tell me how to extract the base quality from the CQ field of the BAM file? I colleague of mine mentioned that every two ASCII character corresponds to the SOLiD color space. Do I take the average of every overlapping 2 or the max? Any input in this regard is gretaly appreciated!
            Is the base quality not already reported in the SAM record (it should be)? As to how to calculate the base qualities during alignment from color qualities, here is the formula MAQ/BWA/BFAST uses: https://sourceforge.net/apps/mediawi...apping_Quality.

            Comment


            • #7
              Hi nilshomer,
              Thanks for the reply. We are generating SAM record only for the SNP positions which does have the base quality. I am interested in the Non-SNP positions as well and hence I'm trying to calcuate the base quality for these positions from the BAM file.
              -Uma

              Comment


              • #8
                Hi All,
                I generated a raw pileup for all reference positions using the samtools. An exmaple record for a non-SNP position is below:
                chrY 11936864 G G 51 0 60 8 ,,.,,,.. "%`".B"`

                This base has a coverage of 8. Which one of these fields (51,0,60) represent the base quality in this case? I am still confused about the ABI's SOLiD base quality!

                Any input is greatly appreciated!

                Comment


                • #9
                  Did you see the SAM FAQ?
                  http://sourceforge.net/apps/mediawik...pileup_output.

                  Hope this helps.

                  Comment


                  • #10
                    Hi Bruins,
                    Thanks for this very useful link. It definitely answers some of my questions.
                    -Uma

                    Comment

                    Latest Articles

                    Collapse

                    • seqadmin
                      Quality Control Essentials for Next-Generation Sequencing Workflows
                      by seqadmin




                      Like all molecular biology applications, next-generation sequencing (NGS) workflows require diligent quality control (QC) measures to ensure accurate and reproducible results. Proper QC begins at nucleic acid extraction and continues all the way through to data analysis. This article outlines the key QC steps in an NGS workflow, along with the commonly used tools and techniques.

                      Nucleic Acid Quality Control
                      Preparing for NGS starts with isolating the...
                      02-10-2025, 01:58 PM
                    • seqadmin
                      An Introduction to the Technologies Transforming Precision Medicine
                      by seqadmin


                      In recent years, precision medicine has become a major focus for researchers and healthcare professionals. This approach offers personalized treatment and wellness plans by utilizing insights from each person's unique biology and lifestyle to deliver more effective care. Its advancement relies on innovative technologies that enable a deeper understanding of individual variability. In a joint documentary with our colleagues at Biocompare, we examined the foundational principles of precision...
                      01-27-2025, 07:46 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, 02-07-2025, 09:30 AM
                    0 responses
                    72 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 02-05-2025, 10:34 AM
                    0 responses
                    113 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 02-03-2025, 09:07 AM
                    0 responses
                    90 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 01-31-2025, 08:31 AM
                    0 responses
                    49 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X