Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • wdemos
    Member
    • Jun 2012
    • 31

    Comprehensive Samtools user guide?

    I'm a first time samtools user. I am using the mpileup command for somatic mutation calling between a pair of samples. I generate an output file: var.bcf, but I don't know how to open/extract the data from the file. Is there a comprehensive user guide somewhere with examples/tutorials how to use this tool? I've been to http://samtools.sourceforge.net/samtools.shtml but it is no where near detailed enough for my level of experience with this tool. Thank you in advance for any insight.
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    The quick answer...

    bcftools view var.bcf > var.vcf
    That's a plain text file

    Comment

    • wdemos
      Member
      • Jun 2012
      • 31

      #3
      Thank you. I did figure out how to view the file, the interpretation is the issue. It looks like a lot oh headers but no data:
      ##fileformat=VCFv4.1
      ##INFO=<ID=DP,Number=1,Type=Integer,Description="Raw read depth">
      ##INFO=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
      ##INFO=<ID=MQ,Number=1,Type=Integer,Description="Root-mean-square mapping quality of covering reads">
      ##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability of all samples being the same">
      ##INFO=<ID=AF1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele frequency (assuming HWE)">
      ##INFO=<ID=AC1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele count (no HWE assumption)">
      ##INFO=<ID=G3,Number=3,Type=Float,Description="ML estimate of genotype frequencies">
      ##INFO=<ID=HWE,Number=1,Type=Float,Description="Chi^2 based HWE test P-value based on G3">
      ##INFO=<ID=CLR,Number=1,Type=Integer,Description="Log ratio of genotype likelihoods with and without the constraint">
      ##INFO=<ID=UGT,Number=1,Type=String,Description="The most probable unconstrained genotype configuration in the trio">
      ##INFO=<ID=CGT,Number=1,Type=String,Description="The most probable constrained genotype configuration in the trio">
      ##INFO=<ID=PV4,Number=4,Type=Float,Description="P-values for strand bias, baseQ bias, mapQ bias and tail distance bias">
      ##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Indicates that the variant is an INDEL.">
      ##INFO=<ID=PC2,Number=2,Type=Integer,Description="Phred probability of the nonRef allele frequency in group1 samples being larger (,smaller) than in group2.">
      ##INFO=<ID=PCHI2,Number=1,Type=Float,Description="Posterior weighted chi^2 P-value for testing the association between group1 and group2 samples.">
      ##INFO=<ID=QCHI2,Number=1,Type=Integer,Description="Phred scaled PCHI2.">
      ##INFO=<ID=PR,Number=1,Type=Integer,Description="# permutations yielding a smaller PCHI2.">
      ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
      ##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
      ##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=-1,Type=Integer,Description="List of Phred-scaled genotype likelihoods, number of values is (#ALT+1)*(#ALT+2)/2">
      #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT

      Not sure what I did wrong. The mplieup command I used was:
      samtools mpileup -DSuf ref.fa aln.bam | bcftools view -bvcgT pair - > var.bcf (inclded my filepaths/names of course)

      Comment

      • swbarnes2
        Senior Member
        • May 2008
        • 910

        #4
        At first glance, you have no SNPs.

        Second, for some reason all the reads that show varaints have been filtered away.

        Try using -A or -B in your mpileup command.

        Try removing the '-T pair' from bcftools

        Comment

        • wdemos
          Member
          • Jun 2012
          • 31

          #5
          thank you I will gie your suggestions a go.

          Comment

          • wdemos
            Member
            • Jun 2012
            • 31

            #6
            I didn't have the files aligned correctly to the alignment file causing the error. Thank you for the help.

            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.
              Yesterday, 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, 06-30-2026, 05:37 AM
            0 responses
            10 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-26-2026, 11:10 AM
            0 responses
            18 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...