This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Cannot locate the Vcf.pm every time I logging on the server

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

1 answer

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/

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

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.

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.

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.

Log in to answer this question.