Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • krueml
    Junior Member
    • Aug 2012
    • 3

    variant calling with SAMtools

    Hi, I am trying to repeat a papers steps to detect somatic variants. My earlier steps were using bwa, picard sortsam and addedreadgroup, and gatk indelrealigner. now I'm stucking at the variant calling step where the paper says I should use SAMtools varfilters with 3 different options. I found out how to put 2 of them but the 3rd one gives me headache since last week:

    Minimum consensus quality set to 20

    My pipeline looks like this for now:
    samtools mpileup -M 255 -ugf ref.fasta realigned.bam | bcftools view - | vcfutils.pl varFilter -Q 43 | awk '$6>=50'> var.flt.vcf


    I also found out on http://samtools.sourceforge.net/cns0.shtml that there should be a column called consensus quality or phred scaled likelihood that genotype is wrong, respectively, but I cannot find that column in my data.
    After
    samtools mpileup -M 255 -f ref.fasta realigned.bam > raw.pileup
    my data looks like this. And there arent so many columns (even with option -OABs with does not change):


    1 569924 T 2 .. GI
    1 569925 G 2 .. HI
    Thank you!

    K
  • dschika
    Member
    • Mar 2010
    • 56

    #2
    Hi krueml,

    If you want to filter the bam file for a minimum mapping quality have a look at the -q option of samtools view:

    samtools view -bq 20 your.bam > out.bam

    If you want to see a "List of Phred-scaled genotype likelihoods" you should have a look at the output of your pipeline before using the awk command. The awk command also dismisses some header lines starting with '##' e.g.:
    PHP Code:
    ##FORMAT=<ID=GL,Number=3,Type=Float,Description="Likelihoods for RR,RA,AA genotypes (R=ref,A=alt)">
    ##FORMAT=<ID=DP,Number=1,Type=Integer,Description="# high-quality bases">
    ##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
    ##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods"> 
    Btw: Your link points to the description of samtools pileup, but you use mpileup. Afaik there are some differences between both for example mpileup does not provide a consensus...

    Comment

    • krueml
      Junior Member
      • Aug 2012
      • 3

      #3
      Yes sorry I posted the wrong link. This what I have posted was my mpileup output.
      Well sorry that I wasn't clear. I was just asking how I can set the minimum consensus quality. After the whole pipeline, there is a FQ listed in the info of the vcf file.

      Code:
      ##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability of all samples being the same">
      
      #CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  bar
      1     9778579   .       C       T       62      .       DP=17;VDB=0.0000;AF1=1;AC1=2;DP4=0,0,13,0;MQ=60;FQ=-66  GT:PL:GQ        1/1:95,39,0:75
      1     9781412   .       C       G       214     .       DP=66;VDB=0.0768;AF1=1;AC1=2;DP4=0,0,37,15;MQ=55;FQ=-184        GT:PL:GQ        1/1:247,157,0:99
      1     9782556   .       C       T       222     .       DP=368;VDB=0.0599;AF1=1;AC1=2;DP4=2,0,263,42;MQ=59;FQ=-282;PV4=1,0.27,0.36,1    GT:PL:GQ        1/1:255,255,0:99
      I changed the script by now of the varFilter but I wanted to know if there is another way (w/o changing the script), because in the paper there was no changing at all and again: they used the same version of samtools, so I was just curious.
      Thank you!

      K

      Comment

      Latest Articles

      Collapse

      • GATTACAT
        Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by GATTACAT
        Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
        Today, 11:43 AM
      • SEQadmin2
        Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by SEQadmin2


        I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

        Here are nine questions we think about, in roughly the order they matter, before...
        06-18-2026, 07:11 AM
      • SEQadmin2
        From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
        by SEQadmin2


        Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


        The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
        ...
        06-02-2026, 10:05 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Yesterday, 05:37 AM
      0 responses
      8 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-26-2026, 11:10 AM
      0 responses
      17 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-17-2026, 06:09 AM
      0 responses
      52 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-09-2026, 11:58 AM
      0 responses
      110 views
      0 reactions
      Last Post SEQadmin2  
      Working...