SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
variant calling using SeqIO ksw9 Bioinformatics 2 11-01-2014 04:35 PM
BFAST and Variant Calling nexgengirl Bioinformatics 8 01-02-2013 06:03 AM
variant calling with SAMtools krueml Bioinformatics 2 09-28-2012 06:36 AM
variant calling kjaja Bioinformatics 1 11-04-2011 08:16 AM

Reply
 
Thread Tools
Old 11-10-2015, 03:18 AM   #1
batman
Member
 
Location: Singapore

Join Date: Sep 2009
Posts: 14
Default variant calling on a subsample of a BAM file..

Hi,

Can someone explain the following phenomenon. I ran bcftools (bcftools call -v -c )on a pileup created by samtools. This resulted in calling of a SNP. Next I extracted reads spanning the SNP, created the pileup and ran bcftools as before. I was expecting that bcftools would give me back the same result but was surprised when no SNP was predicted. Why does this happen?
batman is offline   Reply With Quote
Old 11-10-2015, 03:26 AM   #2
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

Samtools does some filtering of the reads and bases that you probably didn't do manually. Also make sure that you handled overlapping ends of pairs.
dpryan is offline   Reply With Quote
Old 11-10-2015, 08:25 AM   #3
batman
Member
 
Location: Singapore

Join Date: Sep 2009
Posts: 14
Default

Hi @dpryan,

What kind of filtering does samtools do: I used something like samtools view file.name chrY:XXXX-XXXX where XXXX is the SNP location. Would this not give all the reads used in calling the variant? does bcftools care about bases neighboring the SNP?
batman is offline   Reply With Quote
Old 11-10-2015, 12:46 PM   #4
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

Aside from adjusting the phred score on bases from overlapping pairs, it discards orphans, any bases with scores < 13 and any alignments marked as duplicate, secondary, or QC failed. So, samtools view is providing a superset of what mpileup would produce.
dpryan is offline   Reply With Quote
Old 11-10-2015, 09:28 PM   #5
batman
Member
 
Location: Singapore

Join Date: Sep 2009
Posts: 14
Default

Hi @dpryan,

Thanks for the very detailed answer.
But this still leaves me wondering, since I have the identical superset of reads spanning the SNPs, shouldnt mpileup and bcftools predict the same set of SNP for the whole BAM file and to the extracted reads? Only difference I can think of is that some reads do not have the paired read extracted.
batman is offline   Reply With Quote
Old 11-11-2015, 12:23 AM   #6
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

At least in the most recent versions of samtools, mpileup produced a gvcf, which includes basically everything. bcftools call then uses that as a source for calculating the more believable variants. Presumably it's this step that you're seeing.
dpryan is offline   Reply With Quote
Reply

Tags
bcftools vcf bcf, pileup sam bam, samtools, variant analysis

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 09:57 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO