This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bcftools merge sample order

Does the sample names order in the multisample vcf file respect the input files order ?

for exemple: >> bcftools merge sample1.vcf sample2.vcf sample3.vcf

will always produce -->

CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  sample1       sample2       sample3

?

vcf dna multisample bcftools htslib

1 answer

If you merge various vcf files into a single large vcf, the merged file will show the sample IDs names in the header in increasing order. The information in the hearder will follow the same order as in the separated files you provided as input. However, I guess be careful if there are not unique individuals and about the number of SNPs you have in the single vcf files in the input during your merging.

Log in to answer this question.