Skip to content

How to install perl for Bionano Solve

Andy Yuan edited this page Apr 6, 2021 · 2 revisions

Bionano Solve package needs specific perl versions, particularly during the hybrid scaffolding step. Installing perl is not a trivial task on the server and you may fail to make it work if you install it using the source code. To solve this problem, you may follow the steps below to install perl without root permission.

Using perlbrew

Perlbrew is a nice perl env manager and it can help to easily install a specific perl version.

Download and install perlbrew

You may follow the steps below to install perlbrew

$ wget -O - https://install.perlbrew.pl | bash

Perlbrew will be installed to ~/perl5/perlbrew. You may change the env variable using PERLBREW_ROOT.

Install specific perl

If you look at the hybrid scaffolding libraries provided by Bionano Genomics, you may notice that the Hybrid Scaffolding pipeline only needs perl version

+ 5.10.1
+ 5.14.4
+ 5.16.3
+ 5.18.2

However, for your server, you may not have these perl versions installed, which means you need to install the particular perl version by yourself. Here I suggest installing perl5.14.4.

Download and install perl

$ ~/perl5/perlbrew/bin/perlbrew --notest install --thread perl-5.14.4

This will take a while to install the specific perl version. You may open a new terminal page to monitor the process by using:

$ tail -f ~/perl5/perlbrew/build.perl-5.14.4.log

Check if the perl version is installed properly

Once the installation is completed, perlbrew will report if the installation is sccessful or not. However, you may need to further check if the perl version installed works for your Bionano pipeline using:

$ expert PATH="$HOME/perl5/perlbrew/perls/perl-5.14.4/bin:$PATH"
$ solvePkg="" ## /full/path/to/the/latest/bionano/solve/package
$ hybrid=`find $solvePkg -iname hybridScaffold.pl`
$ perl $hybrid -h

If the installation is OK, you may see:

Usage: perl hybridScaffold.pl <-h> <-n ngs_file> <-b bng_cmap_file> <-c hybrid_config_xml> <-o output_folder> <-B conflict_filter_level> <-N conflict_filter_level> <-f> 
      <-m molecules_bnx> <-p de_novo_pipeline> <-q de_novo_xml> <-v> <-x> <-y> <-e noise_param><-z tar_zip_file><-S>
      -h    : This help message         
      -n    : Input NGS FASTA [required]
      -b    : Input BioNano CMAP  [required]
      -c    : Merge configuration file [required]
      -o    : Output folder [required]
      -r    : RefAligner program [required]
      -B    : conflict filter level: 1 no filter, 2 cut contig at conflict, 3 exclude conflicting contig [required if not using -M option]
      -N    : conflict filter level: 1 no filter, 2 cut contig at conflict, 3 exclude conflicting contig [required if not using -M option]
      -f    : Force output and overwrite any existing files
      -x    : Flag to generate molecules to hybrid scaffold alignment and molecules to genome map alignment [optional]
      -y    : Flag to generate chimeric quality score for the Input BioNano CMAP [optional]
      -m    : Input BioNano molecules BNX [optional; only required for either the -x or -y option]
      -p    : Input de novo assembly pipeline directory [optional; only required for -x option]
      -q    : Input de novo assembly pipeline optArguments XML script [optional; only required for -x option]
      -e    : Input de novo assembly noise parameter .errbin or .err file [optional; recommended for -y option but not required]
      -v    : Print pipeline version information
      -M    : Input a conflict resolution file indicating which NGS and BioNano conflicting contigs to be cut [optional] 
      -z    : Name of a zipped file to archive the essential output files [optional]
      -S    : Only run hybridScaffold up to before Merge steps [optional]
      -w    : Name of the status text file needed by IrysView [optional]
      -t    : Perform pre-pairmerge sequence to pre-pairmerge genome map alignment [optional]
      -u    : Sequence of enzyme recognition site (overrides what has been specified in config XML file, for IrysView only) [optional]

If errors are raised, you may try:

$ ~/perl5/perlbrew/bin/perlbrew switch perl-5.14.4
$ perl $hybrid -h