This section covers the scripting facilities for SuperMUC and the Linux Cluster systems

I need additional modules for perl. How can I install them for my user account?

In order to give our users the maximum freedom, we are not installing perl modules systemwide, but the modules have to be installed on a per user basis, unless the modules are of such importance and wide use by our user basis, that it justifies a system wide installation. We are always pleased to help our users in case of any problems.

You can install all the modules that you require easily in the following way:

  • create local perl module directory:
     > mkdir ~/myperl
    
  • start cpan
     > cpan
    
    You will be in the initial configuration dialog. The defaults are ok. Just press enter. When the installation dialog asks for the downloadsites set: 11 9 4 This might take a while (several minutes). Then set the following options in cpan:
      cpan> o conf makepl_arg "LIB=~/myperl/lib \
      INSTALLMAN1DIR=~/myperl/man/man1 \
      INSTALLMAN3DIR=~/myperl/man/man3 \
      INSTALLSCRIPT=~/myperl/bin \
      INSTALLBIN=~/myperl/bin"
     cpan> o conf mbuildpl_arg "--lib=~/myperl/lib \
      --installman1dir=~/myperl/man/man1 \
      --installman3dir=~/myperl/man/man3 \
      --installscript=~/myperl/bin \
      --installbin=~/myperl/bin"
     cpan> o conf mbuild_install_arg "--install_path lib=~/myperl"
     cpan> o conf prerequisites_policy automatically
     cpan> o conf commit
     cpan> quit
    
  • Now you can install whatever modules you like in your local directory ~/myperl.

For example, for the bioperl module, type in the following commands while being in the cpan shell:

    cpan>d /bioperl/
	CPAN: Storable loaded ok
	Going to read /home/bosborne/.cpan/Metadata
	Database was generated on Mon, 20 Nov 2006 05:24:36 GMT

	....

	Distribution B/BI/BIRNEY/bioperl-1.2.tar.gz
	Distribution B/BI/BIRNEY/bioperl-1.4.tar.gz
	Distribution C/CJ/CJFIELDS/BioPerl-1.6.0.tar.gz
	Now install:
	 cpan> force install C/CJ/CJFIELDS/BioPerl-1.6.0.tar.gz

Some additional tricks:

in case the download is slow, then edit the file ~/.cpan/CPAN/MyConfig.pm and insert the following line into $CPAN::Config :

'dontload_hash' => { "Net::FTP" => 1, "LWP" =>1 },

in case something goes wrong you can delete ~/.cpan and start over again.

Very helpful is the perl shell which you can easily obtain by installing:

cpan> install Psh
cpan> install IO::String

it is then available under ~/myperl/bin/psh e.g. try it out:

psh% use Bio::Perl;
psh% $seq_object = get_sequence('genbank',"ROA1_HUMAN");
psh% write_sequence(">roa1.fasta",'fasta',$seq_object);


  • No labels