This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BCFTOOLS: command does not work correctly. Can you help me?

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?

bcftools

The result was that there were SNPs in the file indels.vcf.gz, when there should only be indels.

show us such variants.

Remove -c from grep 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.

chrX    77397836        .       CAG     CAGAGAG,CAGAG,GAG,C,CAGAGAGAGAG,CAGAGAGAGAGAGAG
chrX    77398227        .       T       A,TA
chrX    77398233        .       TTTATTTAA       ATTATTTAA,T
chrX    77398237        .       TTTAATTAA       TTTAA,ATTAATTAA,T
chrX    77398241        .       A       T,AT,ATTTATTTAT
chrX    77400094        .       C       T,CA
chrX    77401622        .       CA      C,AA
chrX    77404139        .       CG      C,TG
chrX    77406406        .       TCC     TCCC,CCC,TCCCC,T
chrX    77411156        .       CAAATAAATAAAT   CAAAT,CAAATAAAT,CAAATAAATAAATAAAT,TAAATAAATAAAT,C

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.

0 answers

No answers yet.

Log in to answer this question.