Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sfh838t
    Member
    • Apr 2014
    • 29

    #1

    more samtools SNP calling questions

    I have used the samtools/bcftools/vcfutils pipeline to do variant calling.
    step1:
    samtools mpileup -uf reference.fa align-file1.bam align-file2.bam | bcftools view -bvcg >unfiltered-variants.bcf
    step2:
    bcftools view unfiltered-variants.bcf | vcfutils.pl varFilter -D100 >filtered-variants.vcf

    This gives me about 30 variants in a format I can open in a spreadsheet.

    However, I would also like to see the unfiltered variant list, so it needs to be in vcf format. I should be able to do this by changing the first step bcftools arguments to -vcg and the output file name to *.vcf. Actually this works up to certain point and I get partial output which matches the filtered variants, but it crashes at a certain line and I get sync error the number of fields does not match.
    is there another way to just convert the bcf file into vcf to see all variants?

    my other concern is that just about ALL variants found are indels. I have used IGV to look at the aligned contigs and I clearly see a number of SNPs.
    I am trying to decipher the arguments it seems to me that the -c switch in bcftools should list SNPs?
    I have seen a number of pages and read other posts, some of which are similar but just not quite the answer I need.
  • westerman
    Rick Westerman
    • Jun 2008
    • 1104

    #2
    1) It looks like you are using the pre-version 1 of samtools/bcftools. I don't blame you since samtools v.1 changed a bunch. I am still getting use to it. That said if you want to see a lot of SNPs using the old method then you could use the 'flat' prior via the switch '-P flat'

    2) GATK give you better SNP calls.

    Comment

    • sfh838t
      Member
      • Apr 2014
      • 29

      #3
      Thanks Rick. I have no training and I do not use any of these assorted tools often, so it is always new for me. I also dread the installation process of a program/tool more than anything! I guess the new version came out between the last time I was fiddling with this and now. I will see if I can find/work with GATK.
      Not sure what you mean by 'flat'?

      Comment

      • westerman
        Rick Westerman
        • Jun 2008
        • 1104

        #4
        Since I am not a statistician I would stumble trying to explain a 'prior' so I refer you to Wikipedia:



        Also quoting from Heng Li on the Samtools list from 2010:

        With any Bayesian SNP callers, you need a prior. Full is the standard Wright-Fisher infinite site prior. Flat is a flat prior and cond2 is the prior distribution conditional on hets discovered in two chromosomes, assuming Wright-Fisher.
        As mentioned above the old bcftools had three different set priors. The new bcftools using the 'call' option has a more variable set of priors as per:

        -P, --prior <float> mutation rate (use bigger for greater sensitivity)

        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
        27 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
        56 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...