BCFTOOLS: command does not work correctly. Can you help me?
0
0
Entering edit mode
20 days ago

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 • 634 views
ADD COMMENT
0
Entering edit mode

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

show us such variants.

ADD REPLY
0
Entering edit mode

the command only gave me the quantity: 1,655,993

ADD REPLY
0
Entering edit mode

Remove -c from grep part to see actual lines and then post a few,

ADD REPLY
0
Entering edit mode

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
ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 2257 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6