Question: Set Path Variable For Perl In Vcftools Perl Script Correctly
0
gravatar for mathias.gorski
6.5 years ago by
mathias.gorski20 wrote:

Hi all,

I am using Ubuntu and I cannot start the vcftools/bin/vcf-fix-ploidy perl function. It says:

Can't locate Vcf.pm in @INC (@INC contains:

/etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /opt/vcftools/bin/vcf-fix-ploidy line 9.

Ok, i have to add the vcftools/perl directory to PATH:

setenv PATH ${PATH}:/opt/vcftools/perl
setenv PATH ${PATH}:/opt/vcftools/bin
setenv PATH ${PATH}:/opt/vcftools/

neither or all of this does help.

Furthermore I have no Variable PERL5LIB or PERLLIB, too.

These are my environmental variables, that I have:

USER=user0815
LOGNAME=user0815
HOME=/home/user0815
PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/sbin:/sbin:/usr/games:/psi/bin:.:/opt/vcftools/perl
MAIL=/home/user0815/Mail/Inbox
SHELL=/bin/tcsh
SSH_CLIENT=xxx
SSH_CONNECTION=xxx
SSH_TTY=/dev/pts/15
TERM=xterm
LANG=de_DE.UTF-8
XDG_SESSION_COOKIE=xxx
NLSPATH=/usr/share/locale/%L/LC_MESSAGES/%N.cat
HOSTTYPE=x86_64-linux
VENDOR=unknown
OSTYPE=linux
MACHTYPE=x86_64
SHLVL=1
PWD=progs/vcftools/perl
GROUP=mygroup
HOST=myhost
REMOTEHOST=myremotehost
OS_TYPE=LINUX
X11BASEDIR=/usr/X11R6
NNTPSERVER=news.mydomain.de
EDITOR=vi
no_proxy=alt_domain.de
MAILCAPS=/home/user0815/.mailcap:/etc/mailcap
PSI=/psi
MATLAB_JAVA=/usr/lib/jvm/java-1.6.0-openjdk/jre/
MAPLE_JAVA=/usr/lib/jvm/java-1.6.0-openjdk/jre/
ENVIRONMENT=NOBATCH
COLUMNS=208
LINES=62

What can I do? How can I tell PERL manually to include this path?

Thanks, all the best.

perl ubuntu script • 4.5k views
ADD COMMENTlink modified 6.5 years ago by SES8.2k • written 6.5 years ago by mathias.gorski20

it's a perl question, unrelated to bioinformatics.

ADD REPLYlink written 6.5 years ago by Pierre Lindenbaum123k

you can run vctools using: perl -I /path/to/vcftools/perl /path/to/vcftools/perl/vcf-xxxxx

ADD REPLYlink written 6.5 years ago by Pierre Lindenbaum123k

I am sorry, if this is not hte right place to ask. Btw, with the -I flag, the same error appears.

ADD REPLYlink written 6.5 years ago by mathias.gorski20
4
gravatar for Istvan Albert
6.5 years ago by
Istvan Albert ♦♦ 81k
University Park, USA
Istvan Albert ♦♦ 81k wrote:

The import path of any righteous tool is beset on all sides by the inequities of the selfish and the tyranny of environment variables.

Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children

http://www.perlhowto.com/extending_the_library_path

ADD COMMENTlink written 6.5 years ago by Istvan Albert ♦♦ 81k
0
gravatar for SES
6.5 years ago by
SES8.2k
Vancouver, BC
SES8.2k wrote:

You can add the PERL5LIB variable, or you can add the lib path to your script. The environment variables are good because you can move the code around without editing it, but adding the path to the script is an easier fix.

In this case, add use lib qw(/opt/vcftools/lib/perl5/site_perl); to the top of vcf-fix-ploidy before use Vcf;.

ADD COMMENTlink written 6.5 years ago by SES8.2k
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: 1723 users visited in the last hour