Hi all,
I would like to know how samtools pileup format calls SNPs.
For my pipeline I
- Map Illumina reads onto my reference with Bowtie to get a sam file
- Have a custom scripts which filter out non uniquely mapping reads and reads > 5 mismatches
- Use samtools pileup to produce a vcf file
My custom script removes reads on the basis of NM and AS. Therefore, the sam flags are no longer meaningful. E.g. if both reads map originally then the flag for read 1 and read 2 might be 83 and 163. However, if I remove read 2 because it has > mismatches then the flag for read 1 will remain 83 (i.e. read paired, read mapped in proper pair) when it is now actually an unpaired read. This only has an impact if subsequent programs use the flag information.
My question is, does samtools pileup read/use the flags in the sam file to produce the vcf file?
Thanks!