Can'T Locate Vcf.Pm Vcftools
3
7
Entering edit mode
9.8 years ago
Deniz ▴ 210

When I try this [vcftools_results]$ /home/X/vcftools_0.1.6/perl/vcf-validator sample1.flt.vcf.gz

it gives an error.

Can't locate Vcf.pm in @INC (@INC contains: /share/lib64/perl5/5.8.8 /share/lib64/perl5 /share/lib/perl5/5.10.0/x86_64-linux-thread-multi-ld /share/lib/perl5/5.10.0

/share/lib/perl5/5.8.8 /share/lib/perl5 /usr/lib/perl5/5.8.8 /usr/lib/perl5

/share/lib/perl5/5.10.0/x86_64-linux-thread-multi-ld /share/lib/perl5/5.10.0

/share/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi-ld

/share/lib/perl5/site_perl/5.10.0 /share/lib/perl5/site_perl/5.8.8

/share/lib/perl5/site_perl .) at /home/X/vcftools_0.1.6/perl/vcf-validator line 9.

BEGIN failed--compilation aborted at /home/X/vcftools_0.1.6/perl/vcf-validator line 9.

how can I fix it?

vcftools vcf • 29k views
ADD COMMENT
0
Entering edit mode

Thank you so much :)

ADD REPLY
17
Entering edit mode
9.8 years ago
Neilfws 49k

I'm guessing that Vcf.pm is located somewhere under /home/X/vcftools_0.1.6/perl.

So the problem is that this is not a standard Perl library location (@INC) and Perl cannot find it.

Did you read the documentation? It contains this important piece of information:

For running the Perl scripts, the PERL5LIB environment variable must be set to include the Vcf.pm module

export PERL5LIB=/path/to/your/installation/perl
ADD COMMENT
0
Entering edit mode

It worked, thanks.

ADD REPLY
9
Entering edit mode
9.8 years ago
Pascal ★ 1.5k

Hi Deniz

Have you set the environment variable PERL5LIB as it is defined in VCF Tools installation ?

It is as simple as calling:

export PERL5LIB=/path/to/your/installation/perl

Regards.

ADD COMMENT
1
Entering edit mode

oh! It looks neilfws has been 6 seconds faster than me to answer :-)

ADD REPLY
0
Entering edit mode

It worked, thanks.

ADD REPLY
5
Entering edit mode
6.4 years ago
SmallChess ▴ 550

If you're using Mac. You can install the vcftool package by:

    brew install vcftools

Once installed, type

    brew info vcftools

and you'll see

    To use the Perl modules, make sure Vcf.pm, VcfStats.pm, and FaSlice.pm

    are included in your PERL5LIB environment variable:

        export PERL5LIB=/usr/local/lib/perl5/site_perl:${PERL5LIB}

 

 

ADD COMMENT
0
Entering edit mode

In my case (Mac) I did not used brew, and I had to export the path for perl5 libs from the downloaded folder:

export PERL5LIB=/Users/xxxx/Softwares/vcftools-vcftools-2543f81/lib/perl5/site_perl/5.24.0/:${PERL5LIB}

ADD REPLY
0
Entering edit mode

Thanks, that helped me. But now I have another error with this command "vcf-concat lakeforestpark3.vcf.gz saltlakecity1.vcf.gz": gunzip: saltlakecity1.vcf.gz: unexpected end of file Broken VCF header, no column names? at /usr/local/lib/perl5/site_perl/Vcf.pm line 172. Vcf::throw('Vcf4_2=HASH(0x7fb87b2cc3b0)', 'Broken VCF header, no column names?') called at /usr/local/lib/perl5/site_perl/Vcf.pm line 866 VcfReader::_read_column_names('Vcf4_2=HASH(0x7fb87b2cc3b0)') called at /usr/local/lib/perl5/site_perl/Vcf.pm line 601 VcfReader::parse_header('Vcf4_2=HASH(0x7fb87b2cc3b0)') called at /usr/local/bin/vcf-concat line 150 main::concat('HASH(0x7fb8798040c8)') called at /usr/local/bin/vcf-concat line 12

ADD REPLY
0
Entering edit mode

Hi Did you try redirecting to an output file? i.e.: vcf-concat lakeforestpark3.vcf.gz saltlakecity1.vcf.gz | gzip > outputfilename.vcf.gz ?

ADD REPLY

Login before adding your answer.

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