bcftools merge is not merging ??
2
0
Entering edit mode
7.0 years ago
abdulbenissa ▴ 10

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

bcftools next-gen vcf • 4.8k views
ADD COMMENT
3
Entering edit mode
7.0 years ago

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!

ADD COMMENT
0
Entering edit mode
5.2 years ago
jaybee ▴ 170

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!

ADD COMMENT

Login before adding your answer.

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