Question: Cannot locate the Vcf.pm every time I logging on the server
0
gravatar for mike229lin
8 months ago by
mike229lin10
mike229lin10 wrote:

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

ADD COMMENTlink modified 8 months ago by RamRS21k • written 8 months ago by mike229lin10
4
gravatar for Sej Modha
8 months ago by
Sej Modha4.1k
Glasgow, UK
Sej Modha4.1k wrote:

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 COMMENTlink written 8 months ago by Sej Modha4.1k

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

ADD REPLYlink written 8 months ago by mike229lin10
2

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 REPLYlink modified 8 months ago • written 8 months ago by jrj.healey12k
1

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 REPLYlink modified 8 months ago • written 8 months ago by Sej Modha4.1k

It works ! thanks for help

ADD REPLYlink written 8 months ago by mike229lin10
1

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 REPLYlink written 8 months ago by jrj.healey12k
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: 1993 users visited in the last hour