I used samtools after aligning Illumina reads from > 100 samples to a reference genome and used mpileup to call variants. Now, I want to discard the SNPs that compare an individual with the reference and keep the SNPs that are between the individuals only. Is there any ways to get this done? Thanks in advance.
Thanks Jorge! I followed this pipeline :
bowtie2 > samtools mpileup -uf ref.fa aln1.bam....aln100.bam -v > raw.vcf
Now I have all variants and then usedbcftools call -mv raw.vcf>called.raw.vcf
. This file calls SNPs between my samples and the reference. Now I want to filter the SNPs between the individuals only (without regards to the reference). Is there any tools or filtering criteria to accomplish this?you mean that you want each sample's variants into separate files? then the proper pipeline would have been this one:
if you want to extract each sample's variants from a single joined vcf file (as your called.raw.vcf should be), then you would need other solution like this one or this other one.