Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phantom123
    Member
    • Mar 2012
    • 13

    #1

    Samtools filtering question

    I used Samtools and bcftools to generate bcf files and then vcf files from the original BAM file containing RNA-seq data. Some of the publications i have read which make use of Samtools talk of filtering based on read quality, phred score, and depth. What are the typical parameters you use for these? The commands are as follows:

    samtools view -bh -q(min_MapQ) in.bam > out.bam

    samtools mpileup -uf in.ref.fa –Q(min_phred_Score) in.bam > out.bam

    bcftools view var.raw.bcf | vcfutils.pl varFilter –D(max_depth) > var.flt.vcf

    I did the alignment once using Tophat and once using BWA so that i have two sets of BAM files for the same RNA-seq data. Do the Samtools filtering parameters depend on the alignment algorithm used?
  • Heisman
    Senior Member
    • Dec 2010
    • 534

    #2
    There are no hard and fast rules when it comes to filtering, typically. In terms of depth, the idea is that all else being equal, the more reads you have supporting a call, the more likely the call is to be correct. If you have a homozygous position, all reads should support it if there are no errors anywhere. The reason more read depth can be really useful is because positions can be heterozygous, for example, if you have 6 reads covering a heterozygous site and all 6 match the wildtype, you may call it homozygous wildtype. With 12 reads, it's much less likely to have all 12 match the wildtype for a heterozygous site.

    Read quality and phred score of the call are somewhat intertwined. You can have a fairly high read depth but have many of the reads align with a poor mapping quality score; this implies a lot of those reads may not in fact come from the region they were aligned too (or perhaps they do). In that case, your read depth is artificially high, in a sense.

    I have not analyzed RNA-Seq data so I do not want to pretend I know the normal metrics used for filtering. I do regularly call variants from sequencing data. For that, I use the varFilter as you showed. Other than that, the only thing I consider regarding filtering is coverage. I feel 10x is generally an acceptable cutoff to use, with higher or lower being fine depending on the situation.

    Comment

    • Richard Finney
      Senior Member
      • Feb 2009
      • 701

      #3
      I did the [rna seq] alignment once using Tophat and once using BWA

      What was your reference genome that you aligned to using BWA?

      Comment

      • Phantom123
        Member
        • Mar 2012
        • 13

        #4
        Originally posted by Richard Finney View Post
        I did the [rna seq] alignment once using Tophat and once using BWA

        What was your reference genome that you aligned to using BWA?
        UCSC hg 19.

        Comment

        • Phantom123
          Member
          • Mar 2012
          • 13

          #5
          Originally posted by Heisman View Post
          There are no hard and fast rules when it comes to filtering, typically. In terms of depth, the idea is that all else being equal, the more reads you have supporting a call, the more likely the call is to be correct. If you have a homozygous position, all reads should support it if there are no errors anywhere. The reason more read depth can be really useful is because positions can be heterozygous, for example, if you have 6 reads covering a heterozygous site and all 6 match the wildtype, you may call it homozygous wildtype. With 12 reads, it's much less likely to have all 12 match the wildtype for a heterozygous site.

          Read quality and phred score of the call are somewhat intertwined. You can have a fairly high read depth but have many of the reads align with a poor mapping quality score; this implies a lot of those reads may not in fact come from the region they were aligned too (or perhaps they do). In that case, your read depth is artificially high, in a sense.

          I have not analyzed RNA-Seq data so I do not want to pretend I know the normal metrics used for filtering. I do regularly call variants from sequencing data. For that, I use the varFilter as you showed. Other than that, the only thing I consider regarding filtering is coverage. I feel 10x is generally an acceptable cutoff to use, with higher or lower being fine depending on the situation.
          Thank you.

          Comment

          Latest Articles

          Collapse

          • kinpict.com
            Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
            by kinpict.com
            The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
            Today, 06:37 PM
          • SEQadmin2
            16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
            by SEQadmin2





            NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
            10-30-2026, 06:46 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 11-12-2026, 07:59 AM
          0 responses
          26 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 11-05-2026, 09:25 AM
          0 responses
          35 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 11-03-2026, 11:54 AM
          2 responses
          55 views
          0 reactions
          Last Post kinpict.com  
          Started by SEQadmin2, 10-28-2026, 09:57 AM
          0 responses
          175 views
          0 reactions
          Last Post SEQadmin2  
          Working...