Error When Merging Vcfs With Vcftools'S Vcf-Merge Function
2
1
Entering edit mode
10.9 years ago
Sheila ▴ 420

I'm getting an error when i attempt to merge 3 vcfs with VCFtools' vcf-merge function. See below:

COMMAND:

 /ifshome/vcftools_0.1.10/bin/vcf-merge *.vcf > combinedVCF.vcf

OUTPUT:

Can't locate Vcf.pm in @INC (@INC contains: /usr/local/mni/lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /ifshome/vcftools_0.1.10/bin/vcf-merge line 9.
BEGIN failed--compilation aborted at /ifshome/pbhatt/vcftools_0.1.10/bin/vcf-merge line 9.

What is the problem here?

vcf vcftools • 7.4k views
ADD COMMENT
3
Entering edit mode
10.9 years ago

the error message is telling you that vcftools is not installed properly. How did you install it? In which system you are working?

If you want a quick and dirty fix, locate the folder lib/perl5/site_perl in which you have downloaded vcftools, write down the full path to it, and then add the following line to your ~/.bashrc file:

export PERL5LIB=$PERL5LIB:/path/to/vcftools/lib/perl5/site_perl/
ADD COMMENT
0
Entering edit mode

Thanks! I'm getting a different error now:

/ifshome/pbhatt/vcftools_0.1.10/bin/vcf-merge *.vcf > combinedVCF.vcf.gz
Broken VCF header, no column names?
 at /ifshome/pbhatt/vcftools_0.1.10/lib/perl5/site_perl//Vcf.pm line 177
    Vcf::throw('Vcf4_1=HASH(0xbb1f280)', 'Broken VCF header, no column names?') called at /ifshome/pbhatt/vcftools_0.1.10/lib/perl5/site_perl//Vcf.pm line 869
    VcfReader::_read_column_names('Vcf4_1=HASH(0xbb1f280)') called at /ifshome/pbhatt/vcftools_0.1.10/lib/perl5/site_perl//Vcf.pm line 604
    VcfReader::parse_header('Vcf4_1=HASH(0xbb1f280)') called at /ifshome/pbhatt/vcftools_0.1.10/bin/vcf-merge line 181
    main::init_cols('HASH(0xbb18a10)', 'Vcf4_1=HASH(0xbb19380)') called at /ifshome/pbhatt/vcftools_0.1.10/bin/vcf-merge line 277
    main::merge_vcf_files('HASH(0xbb18a10)') called at /ifshome/pbhatt/vcftools_0.1.10/bin/vcf-merge line 12

Not sure what this is either... sorry I'm very new to this.

ADD REPLY
0
Entering edit mode

Your vcf file doesn't contain headers. How did you get it? If you downloaded it using tabix, remember to add the -h option, to include the headers as well.

ADD REPLY
0
Entering edit mode

I received these VCFs straight from Illumina and when I open the file itself in my favorite text editor I see the headers.

ADD REPLY
0
Entering edit mode

Check the files again. At least one file in your folder is missing the column headers. The last line before the data must begin with #CHROM, followed by 9 columns, and then one column per individual.

ADD REPLY
0
Entering edit mode

I've looked and both have the header column. Could it be a size issue? My VCF files are very large.

ADD REPLY
0
Entering edit mode
10.9 years ago
Robert Sicko ▴ 630

vcftools,vcf-merge error

similar error in the above post mentions possible solutions.

I have not used vcftools, but I did want to mention I've used Pierre's scanvcf to merge a bunch of VCF's from different subjects: A: How can I merge a large amount of VCF files?

ADD COMMENT

Login before adding your answer.

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