This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bsctools merge on duplicate samples

Dear all,

I try to merge several vcfs (each one for one chr, and with same samples) into one vcf file. However, when I run

bcftools merge -l file_list.txt --force-samples -o all.vcf

where file_list is a list of vcf file I try to merge with.

I got an all.vcf file with sample names as

2428822
2543874
2545438
2626320
2627207
2:2428822
2:2543874
2:2545438
2:2626320
2:2627207
3:2428822
3:2543874
3:2545438
3:2626320
3:2627207

Obviously, bcftools assumes that these samples are different, could any one help me with this problem?

Thanks and with best regards,

Xinhui

snp

1 answer

Try bcftools concat instead.

concat       concatenate VCF/BCF files from the same set of samples
merge        merge VCF/BCF files files from non-overlapping sample sets

Log in to answer this question.