Cannot locate the Vcf.pm every time I logging on the server
1
0
Entering edit mode
6.3 years ago
mike229lin ▴ 50

Hello,

I'm new to bioinformatics. When I use perl module in vcftools like vcf-merge. I need to use

export PERL5LIB=/path/to/your/vcftools-directory/src/perl/

to indicate where's Vcf.pm every time I logging in server.

I install vcftools with commands below

export PERL5LIB=/path/to/your/vcftools-directory/src/perl/
cd vcftools/ 
./autogen.sh 
./configure prefix=$HOME
make 
make install

Is there any advice to prevent indicating the directory of Vcf.pm every time I log in?

Thanks

software error alignment SNP genome • 2.7k views
ADD COMMENT
5
Entering edit mode
6.3 years ago
Sej Modha 5.3k

Do you have the environment variable $PERL5LIB setup? Can you post the output of echo $PERL5LIB? You could add the following to your ~/.bashrc or ~/.bash_profile:

export PERL5LIB=${PERL5LIB}:/path/to/your/vcftools-directory/src/perl/
ADD COMMENT
0
Entering edit mode

Thanks for help. It shows nothing after I input "echo $PERL5LIB" Where should I add the command into ~/.bashrc ?

ADD REPLY
2
Entering edit mode

You can add it anywhere.

The command

echo 'export PERL5LIB=${PERL5LIB}:/path/to/your/vcftools-directory/src/perl/' >> ~/.bashrc

Will append it to the end of the file for you.

You will probably want to spend a little time understanding/getting familiar with the concept of the "PATH" in Unix.

ADD REPLY
1
Entering edit mode

Once you have added the command to ~/.bashrc, you should run echo $PERL5LIB again to check if the changes have been saved, if it shows nothing then run source ~/.bashrc command and run the echo $PERL5LIB command again.

ADD REPLY
0
Entering edit mode

It works ! thanks for help

ADD REPLY
1
Entering edit mode

Glad you got it working. I've moved Sej's comment to an answer so if it has resolved your question satisfactorily please go ahead and accept it by ticking the icon on the left hand side.

ADD REPLY

Login before adding your answer.

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