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

          • SEQadmin2
            New Genomics Technologies Take Aim at Long-Standing Limits
            by SEQadmin2


            Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

            We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
            ...
            09-28-2026, 10:25 AM
          • SEQadmin2
            How Immunogenomics Decodes Immunity’s Genetic Blueprint
            by SEQadmin2




            The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

            This convergence of genetics, immunology, and computation...
            09-01-2026, 05:41 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, Yesterday, 09:51 AM
          0 responses
          11 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 09-25-2026, 09:06 AM
          0 responses
          34 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 09-23-2026, 11:05 AM
          0 responses
          28 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 09-18-2026, 11:37 AM
          1 response
          48 views
          0 reactions
          Last Post pekgio
          by pekgio
           
          Working...