Yes exactly thanks Pierre!
• 0 views
•
link
Dear all,
I have called variants through freebayes.
Now I am filtering SNPs and Indels.
Opening SNPs file I found other variants also.
I used this command to filter snps:
bcftools view -v snps -Ov -o snps_only.vcf variants.vcf.gz
Why bcftools not giving desired output please guide to get only snps.
Thank you
ah yes, you're right. I don't understand the reason bcftools treat this as "SNP". May be you could ask the question in https://github.com/samtools/htslib/issues .
you want:
bcftools view -i 'strlen(ALT)==1 && strlen(REF)==1' -Ov -o snps_only.vcf variants.vcf.gz
Yes exactly thanks Pierre!
Log in to answer this question.
show us an example of "not desired output" please
Here you can see there are other variants too other than SNP