Problem with vcf-merge
Hi I am trying to merge two VCFs which I got from using platypus joint variant calling on bam files which I had to split from the original files I got, they were just to big for the cluster I'm using and had to split them per chromosome for variant calling.
I did zip my vcfs using bgzip and then indexed them with tabix :
bgzip -c file1.vcf > file1.gz
tabix -p vcf file1.gz
and then when I run vcf merge file1.vcf file2.vcf > merged.vcf, I get the following error few seconds after submitting the job(see below for command line):
Use of qw(...) as parentheses is deprecated at /com/extra/vcftools/0.1.9/lib/perl5/site_perl//Vcf.pm line 1622.
[main] fail to load the index file.
The command "tabix -l /home/annavct/Klinefelter/faststorage/people/anna/04_variants_split/variants_Y.vcf" exited with an error. Is the file tabix indexed?
at /com/extra/vcftools/0.1.9/lib/perl5/site_perl//Vcf.pm line 177.
Vcf::throw('Vcf4_0=HASH(0x1876428)', 'The command "tabix -l /home/annavct/Klinefelter/faststorage/p...') called at /com/extra/vcftools/0.1.9/lib/perl5/site_perl//Vcf.pm line 2599
VcfReader::get_chromosomes('Vcf4_0=HASH(0x1876428)') called at /com/extra/vcftools/0.1.9/bin/vcf-merge line 182
main::init_cols('HASH(0x1866118)', 'Vcf4_1=HASH(0x1872f90)') called at /com/extra/vcftools/0.1.9/bin/vcf-merge line 264
main::merge_vcf_files('HASH(0x1866118)') called at /com/extra/vcftools/0.1.9/bin/vcf-merge line 12
THANKS :D
• 1,915 views
•
link
1 answer
You have to use vcf-merge on the gzipped and tabixed files directly. In your command you use them on the uncompressed ones:
bgzip file1.vcf > file1.vcf.gz
tabix -p file1.vcf.gz
vcf-merge file1.vcf.gz file2.vcf.gz > merged.vcf
• 0 views
•
link
Log in to answer this question.