Error with bcftools and vcftools and removing individuals
0
0
Entering edit mode
4.5 years ago
seta ★ 1.9k

Dear all,

I'm trying to remove an individuals from a multi-sample vcf file using bcftools and vcftools, but none of them worked well. Also, in this file, there is no variant information at all sites for this individual (actually there is just one empty column), but this individual used for the calculation of "AN" in the INFO filed. I used bcftools with bcftools view -s indv26 file1.vcf -o out.vcf, it gave me the error "Number of columns does not match the number of samples", which is right as I explained above the empty column). In addition, I used vcftools with vcftools --vcf file2.vcf --remove-indv indv26 --recode --recode-INFO-all. It removed the individual of interest, but it didn't update AN in the INFO filed. Could you please help me out what shall I do?

Sorry, the corresponding variant of the removed individuals also will be removed from the multi-sample vcf file, yes?

Thanks

vcf bcftools vcftools • 2.9k views
ADD COMMENT
0
Entering edit mode

(actually there is just one empty column)

so you're VCF is broken. an empty column is not valid. https://samtools.github.io/hts-specs/VCFv4.2.pdf

ADD REPLY
0
Entering edit mode

Yes, this empty column actually has a header (sample name) and this sample also used for the calculation of AN. I tried to remove this sample, but the error appeared as I mentioned in the post. Could you please let me know how I can solve the issue?

ADD REPLY
0
Entering edit mode

Hello,

could you please show the header and one variant line?

fin swimmer

ADD REPLY
0
Entering edit mode

just use cut ...

ADD REPLY
0
Entering edit mode

I also used cut but vcf-validator didn't confirm the resulting vcf file. Finally, I used vcftools to remove the individual and used vcffixup (from vcflib) to update the AN. It worked well, but took very long time to finish. It will be great if someone has any faster suggestion.

Thanks

ADD REPLY

Login before adding your answer.

Traffic: 1285 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