Question: Error When Merging Vcfs With Vcftools'S Vcf-Merge Function
1
gravatar for Sheila
5.9 years ago by
Sheila290
United States
Sheila290 wrote:

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 • 4.3k views
ADD COMMENTlink modified 5.9 years ago by Giovanni M Dall'Olio26k • written 5.9 years ago by Sheila290
3
gravatar for Giovanni M Dall'Olio
5.9 years ago by
London, UK
Giovanni M Dall'Olio26k wrote:

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 COMMENTlink written 5.9 years ago by Giovanni M Dall'Olio26k

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 REPLYlink written 5.9 years ago by Sheila290

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 REPLYlink modified 5.9 years ago • written 5.9 years ago by Giovanni M Dall'Olio26k

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

ADD REPLYlink written 5.9 years ago by Sheila290

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 REPLYlink written 5.9 years ago by Giovanni M Dall'Olio26k

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

ADD REPLYlink written 5.8 years ago by Sheila290
0
gravatar for Robert Sicko
5.9 years ago by
Robert Sicko570
United States
Robert Sicko570 wrote:

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 COMMENTlink written 5.9 years ago by Robert Sicko570
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 729 users visited in the last hour