Hello, Everyone !!
I have an easy one , I am sure I am missing something here. I am trying to merge a number of vcf files to one large vcf, utilising bcfttools merge.
the command I used is following
where is Samples is the list of vcf files as A.vcf.gz B.vcf.gz ,, etc)
$> bcftools merge --force-samples -l Sample > Meged.vcf.gz
the error I got is :
[W::bcf_hdr_check_sanity] GL should be declared as Number=G Warning: trying to combine "GQ" tag definitions of different types Error at chrM:309: wrong number of fields in CIGAR?
Thanks
2 answers
The bcftools merge help section says:
Usage: bcftools merge [options] <A.vcf.gz> <B.vcf.gz> [...]
This means that you can specify file names either like above (in the last positional arguments of the command, one after each other, space separated) or in a file, which you can declare as -l.
-l, --file-list <file> read file names from the file
You should write the --file-list as a file containing the file names you want to merge, including path, one per line. What you're doing is declaring them as a list in the command!
You can try /PATH/to/bcftools merge Home/data/*vcf.gz -Oz -o Merged.vcf.gz
[considering that your files A.vcf.gz , B.vcf.gz and so on are in the Home directory, under the folder data]
[If your bcftools is installed in the usr/bin directory then simply use:
/usr/bin/bcftools merge Home/data/*vcf.gz -Oz -o Merged.vcf.gz
This should work fine!
Log in to answer this question.