Hello, how are you?
So, I used the command bcftools view -v indels SRZ189891_722g.990.SNP.INDEL.chrAll.vcf.gz -Oz -o indels.vcf.gz
to create a file with only the indels. When I checked if the number of indels in the file SRZ189891_722g.990.SNP.INDEL.chrAll.vcf.gz was the same as in indels.vcf.gz, the results matched. However, I wanted to verify if any SNPs had been filtered out as well, so I used the command bcftools view -v snps indels.vcf.gz|grep -v -c '^#'
. The result was that there were SNPs in the file indels.vcf.gz, when there should only be indels.
What could have happened? What can I do to have only the indels?
show us such variants.
the command only gave me the quantity: 1,655,993
Remove
-c
fromgrep
part to see actual lines and then post a few,Sorry for the delay. So, I used the command
bcftools view -v snps indels.vcf.gz | tail -n10 | cut -f 1-5
and it gave me the data below. Any idea why there are snps in a file that should only have indels? I'm new to bioinformatics and I don't understand much about it.This question was also asked on Bioinfo SE: https://bioinformatics.stackexchange.com/questions/23018/bcftools-command-does-not-work-correctly-can-you-help-me
Please keep in mind that posting the same question to multiple sites can be perceived as bad etiquette, because efforts may be made to address a problem that has already been solved elsewhere in the meantime.
The helpful thing to do if you do decide to post on multiple forums is to add a link to the other forum posts on each post so people will look at the other posts before investing their effort.
I'm sorry, I didn't know. I'm new to the forum and was just concerned and would like to get different kinds of views. I didn't mean to give a bad impression. I'm really sorry.
Possible answer here: https://bioinformatics.stackexchange.com/a/23019/650