<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>Install tools</title><revhistory><revision><revnumber>18</revnumber><date>2023-04-25 11:43:41</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>17</revnumber><date>2023-04-25 11:29:29</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>16</revnumber><date>2023-04-25 09:53:47</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>15</revnumber><date>2021-10-29 14:53:21</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>14</revnumber><date>2021-10-29 14:35:37</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>13</revnumber><date>2021-10-29 14:22:07</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>12</revnumber><date>2021-10-29 14:12:19</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>11</revnumber><date>2021-10-29 09:34:51</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>10</revnumber><date>2020-05-13 10:51:13</date><authorinitials>fhoma</authorinitials><revremark>monitor jobs</revremark></revision><revision><revnumber>9</revnumber><date>2020-04-27 07:40:01</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>8</revnumber><date>2020-04-27 07:39:27</date><authorinitials>fhoma</authorinitials><revremark>Compiling software</revremark></revision><revision><revnumber>7</revnumber><date>2020-04-26 08:25:10</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>6</revnumber><date>2020-04-26 08:23:34</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>5</revnumber><date>2020-04-26 08:22:34</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>4</revnumber><date>2020-04-26 08:22:05</date><authorinitials>fhoma</authorinitials></revision><revision><revnumber>3</revnumber><date>2020-04-26 07:54:20</date><authorinitials>fhoma</authorinitials><revremark>miniconda</revremark></revision><revision><revnumber>2</revnumber><date>2020-04-26 06:25:46</date><authorinitials>fhoma</authorinitials><revremark>Add nav menu</revremark></revision><revision><revnumber>1</revnumber><date>2020-04-24 07:21:07</date><authorinitials>fhoma</authorinitials><revremark>R packages</revremark></revision></revhistory></articleinfo><para><anchor id="top|scroll to the top of the page"/> </para><section><title>Installing software</title><para>Installing software or pipeline can be a difficult task to accomplish. Therefore we suggest all users to make the programs they installed available to all users whenever it is possible. In general programs/pipelines that should be available to all are installed in <emphasis role="strong">/tools</emphasis> folder. On this page will be described how to make tools available on our system for installation procedure of your specific program please refer to the instructions coming with that program. </para><section><title>Who can install software</title><para>In principle any users except students and guests should be able to install bioinfo tools in folders made for that purpose. </para></section><section><title>Test data</title><para>We do ask users to provide test data for all install software. This way it becomes easy to check whether a software works or not. It is also good to define default command to test a tool, see next section to know more about this. </para></section><section><title>Install binaries</title><para>Installing software on potato can be separated into 3 parts: </para><itemizedlist><listitem><para>Compiling/generating binaries (/tools/software/bioinfo-tools) </para></listitem><listitem><para>Adding binaries and libraries to the path (/tools/modulefiles) </para></listitem><listitem><para>Adding test data (/tools/test_data) </para></listitem></itemizedlist><section><title>Path to place tool's binaries</title><para>The following scheme will help you understanding how tools should be placed in /tools/software/bioinfo-tools/</para><para> /tools/software/bioinfo-tools/<emphasis role="strong">&lt;category_name&gt;</emphasis>/<emphasis role="strong">&lt;generic_name&gt;</emphasis>/<emphasis role="strong">&lt;version_name&gt;</emphasis>/ </para><glosslist><glossentry><glossterm>CATEGORY NAME</glossterm><glossdef><para>Every tool is place in a specific category, users have to choose which category is adequate for there tool. If no category is suited for the new tool, make a new folder. </para></glossdef></glossentry><glossentry><glossterm>GENERIC NAME</glossterm><glossdef><para>This the name of the tool without any version information </para></glossdef></glossentry><glossentry><glossterm>VERSION NAME</glossterm><glossdef><para>This the tool's name and the version or simply the version </para></glossdef></glossentry></glosslist><para>an example for assembly tools could look like this, </para><screen><![CDATA[/tools/software/bioinfo-tools/assembly/
-- spades
    -- SPAdes-3.14.0-Linux
       |-- bin
       |-- lib
       `-- share
    -- SPAdes-2.19.0-Linux
       |-- bin
       |-- lib
       `-- share
-- megahit
    -- 1.0
       `-- bin
    -- 1.4
       `-- bin
...]]></screen></section><section><title>Adding software to modules</title><para>Once the binaries has been placed in software folder, the next step is to add the path to modules. By doing so users can easily load the software using the command <emphasis role="strong">module</emphasis>. For each software installed a module file should be created, users module files are located in /tools/modulefiles. Make a new file following this scheme, /tools/modulefiles/&lt;TOOL_NAME&gt;/&lt;VERSION&gt; Here is a test module file that you can modify to suit your case, </para><programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><lineannotation><![CDATA[#%Module1.0#####################################################################]]></lineannotation>
<lineannotation></lineannotation>
<![CDATA[proc ModulesHelp { } {]]>

<![CDATA[    puts stderr ]]><phrase><![CDATA[" "]]></phrase>
<![CDATA[    puts stderr ]]><phrase><![CDATA["This module loads <TOOLNAME> version <VERSION>"]]></phrase>
<![CDATA[    puts stderr ]]><phrase><![CDATA["toolchain."]]></phrase>
<![CDATA[    puts stderr ]]><phrase><![CDATA["\nVersion 1.0\n"]]></phrase>

<![CDATA[}]]>
<![CDATA[module-whatis ]]><phrase><![CDATA["Name: <TOOLNAME>"]]></phrase>
<![CDATA[module-whatis ]]><phrase><![CDATA["Version: <VERSION>"]]></phrase>
<![CDATA[module-whatis ]]><phrase><![CDATA["Category: bioinfo-tools / <CATEGORY>"]]></phrase>
<![CDATA[module-whatis ]]><phrase><![CDATA["Description: <DESCRIPTION>"]]></phrase>
<![CDATA[module-whatis ]]><phrase><![CDATA["URL <URL WHERE YOU HAVE DOWNLOADED THE TOOL>"]]></phrase>

<token><![CDATA[set]]></token><![CDATA[     version                     <VERSION>]]>

<lineannotation><![CDATA[# Path to binaries for the tool]]></lineannotation>
<lineannotation></lineannotation><![CDATA[prepend-path    PATH                /tools/software/bioinfo-tools/<PATH TO BINARIES>]]>
<lineannotation><![CDATA[# Path to MAN folder if exists, most of the time in share/man]]></lineannotation>
<lineannotation></lineannotation><![CDATA[prepend-path    MANPATH             /tools/software/bioinfo-tools/<PATH TO MAN FOLDER>]]>
<lineannotation><![CDATA[# Path to INCLUDE folder if exists]]></lineannotation>
<lineannotation></lineannotation><![CDATA[prepend-path    INCLUDE             /tools/software/bioinfo-tools/<PATH TO INCLUDE>]]>
<lineannotation><![CDATA[# Path to LIB folder if exists]]></lineannotation>
<lineannotation></lineannotation><![CDATA[prepend-path    LD_LIBRARY_PATH     /tools/software/bioinfo-tools/<PATH TO LIB>]]>

<lineannotation><![CDATA[# Set environment variable for your tool]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[# setenv        TOOLNAME_VAR         value]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[# Replace TOOLNAME with your program name]]></lineannotation>
<lineannotation></lineannotation><![CDATA[setenv          TOOLNAME_DIR        /tools/software/bioinfo-tools/...]]>
<![CDATA[setenv          TOOLNAME_BIN        /tools/software/bioinfo-tools/...]]>
<![CDATA[setenv          TOOLNAME_LIB        /tools/software/bioinfo-tools/...]]>
<![CDATA[setenv          TOOLNAME_INC        /tools/software/bioinfo-tools/...]]>
<![CDATA[setenv          TOOLNAME_TEST       /tools/test_data/...]]>
<![CDATA[setenv          TOOLNAME_TEST_CMD   ]]><phrase><![CDATA["TOOLNAME [options] <REQUIRED PARAMETER>"]]></phrase>
</programlisting></section><section><title>Test data</title><para>We kindly as all users to provide test data for all software they install as we as a basic command to run the a test (cf. module file). Test data should be a very <emphasis role="strong">tiny</emphasis> (simulated or not) amount of data to use to test a tool, a test run should last less than 5min.</para><para>Make a folder for your tool in /tools/test_data/&lt;TOOL&gt; then add your data and a &quot;sbatch&quot; file to run the test. </para></section></section><section><title>Install miniconda/anaconda packages</title><para>Anaconda (or Conda) is a well known program for managing environments and packages. It is very popular inn bioinformatics as it allows users with little experience to easily install needed tools and all dependencies. It also makes it easy for users to load the specific environments they need without modifying their <emphasis role="strong">bashrc</emphasis> themselves. </para><para>On this server you will find 2 versions of miniconda installed, miniconda3 for python 3 and miniconda2 for python 2.7 environments. </para><para>Conda's users guide can be found here, <ulink url="https://docs.conda.io/projects/conda/en/latest/user-guide/index.html"/>. </para><para><emphasis role="strong"> <itemizedlist><listitem><para>Load conda module and set needed for conda to work. Be aware that this process rebase you default python bin folder into conda base folder. </para></listitem></itemizedlist><para/> <programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[module load miniconda3/4.8.2]]>
<token><![CDATA[source]]></token><![CDATA[ ]]><methodname><![CDATA[$CONDA_INIT]]></methodname>
</programlisting><programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[which python]]>
<lineannotation><![CDATA[#/tools/software/bioinfo-tools/miniconda/miniconda3/bin/python]]></lineannotation>
<lineannotation></lineannotation>
</programlisting><para><emphasis role="strong"> <itemizedlist><listitem><para>You can see all available environments </para></listitem><listitem><para>To make it easy for all users to locate needed environments, use descriptive names when making new environments, eg. software-exact_version_number. </para></listitem></itemizedlist><para/> <programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[conda info --envs]]>
<lineannotation><![CDATA[# OR]]></lineannotation>
<lineannotation></lineannotation><![CDATA[conda env list]]>
<lineannotation><![CDATA[## conda environments:]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[##]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[#test                     /home/fhoma/.conda/envs/test]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[#base                  *  /tools/software/bioinfo-tools/miniconda/miniconda3]]></lineannotation>
<lineannotation></lineannotation>
</programlisting><para><emphasis role="strong"> <itemizedlist><listitem><para>Activate an existing environment </para></listitem></itemizedlist><para/> <programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[conda activate <environment_name>]]>
<lineannotation><![CDATA[# For example, you can try]]></lineannotation>
<lineannotation></lineannotation><![CDATA[conda activate base]]>
</programlisting><para><emphasis role="strong"> <itemizedlist><listitem><para>Deactivate the current environment </para></listitem></itemizedlist><para/> <programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[conda deactivate]]>
</programlisting><para><emphasis role="strong"> <itemizedlist><listitem><para>Load 2 conda environments (we do not recommend doing this as it may lead to big confusions) </para></listitem><listitem><para>Nested environment </para></listitem></itemizedlist><para/> <programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[conda activate --stack <env_name>]]>
</programlisting><para><emphasis role="strong"> <itemizedlist><listitem><para>Create new conda environment, there are 2 ways of doing this </para></listitem><listitem><para>from scratch or from a YAML config file. The latter one will create the environment and install all listed software </para></listitem><listitem><para>You can also give a list of software and versions when installing from scratch </para></listitem><listitem><para>Replace &lt;env_name&gt;, with a descriptive name. </para></listitem></itemizedlist><para/> <programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><lineannotation><![CDATA[# Create an environment with only default packages]]></lineannotation>
<lineannotation></lineannotation><![CDATA[conda create --name <env_name>]]>
<lineannotation><![CDATA[# You can be asked to confirm the location of the location of the envs folder]]></lineannotation>
<lineannotation></lineannotation><lineannotation><![CDATA[# Use the command below to accept any question by default]]></lineannotation>
<lineannotation></lineannotation><![CDATA[conda create --yes --name <env_name>]]>

<lineannotation><![CDATA[# Make an environment with python 3.6]]></lineannotation>
<lineannotation></lineannotation><![CDATA[conda create --yes --name <env_name> ]]><methodname><![CDATA[python]]></methodname><![CDATA[=3.6]]>

<lineannotation><![CDATA[# Create an environment from YAML file]]></lineannotation>
<lineannotation></lineannotation><![CDATA[conda env create -f <environment.yml>]]>
</programlisting><para><emphasis role="strong"> <itemizedlist><listitem><para>Remove an unused environment </para></listitem></itemizedlist><para/> <programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[conda env remove --name <env_name>]]>
<lineannotation><![CDATA[# OR]]></lineannotation>
<lineannotation></lineannotation><![CDATA[conda remove --name <env_name> --all]]>
</programlisting><itemizedlist><listitem><para><ulink url="https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf"/> </para></listitem></itemizedlist></emphasis></para></emphasis></para></emphasis></para></emphasis></para></emphasis></para></emphasis></para></emphasis></para></section><section><title>Install R packages</title><itemizedlist><listitem><para>Packages for R are installed within R, so to install R packages, you will first need to load the module R and run R. </para></listitem></itemizedlist><programlisting format="linespecific" language="bash" linenumbering="numbered" startinglinenumber="1"><![CDATA[module load R]]>
<![CDATA[R]]>
</programlisting><itemizedlist><listitem><para>Use the following R command to print where are the R libraries. Users libraries are installed in <emphasis role="strong">/tools/R_libs/3.6.1</emphasis> </para></listitem></itemizedlist><programlisting format="linespecific" language="R" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[.libPaths]]></methodname><![CDATA[()]]>
<lineannotation><![CDATA[#[1] "/tools/R_libs/3.6.1"]]></lineannotation>
<lineannotation><![CDATA[#[2] "/opt/ohpc/pub/libs/gnu8/R/3.6.1/lib64/R/library"]]></lineannotation>
</programlisting><itemizedlist><listitem><para>To see all available/installed packages </para></listitem></itemizedlist><programlisting format="linespecific" language="R" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[.packages]]></methodname><![CDATA[(]]><methodname><![CDATA[all.available]]></methodname><![CDATA[=]]><token><![CDATA[T]]></token><![CDATA[)]]>
</programlisting><itemizedlist><listitem><para>To install R packages and dependancies. Installation will automatically be done in a <emphasis role="strong">/tools/R_libs/3.6.1</emphasis> if permissions allows it. If not you could be asked to create a private one. </para></listitem></itemizedlist><programlisting format="linespecific" language="R" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[install.packages]]></methodname><![CDATA[(]]><methodname><![CDATA[c]]></methodname><![CDATA[(]]><phrase><![CDATA["]]></phrase><phrase><![CDATA[<package1>"]]></phrase><![CDATA[, ]]><phrase><![CDATA["]]></phrase><phrase><![CDATA[<package2>,..."]]></phrase><![CDATA[), ]]><methodname><![CDATA[dep]]></methodname><![CDATA[=]]><token><![CDATA[T]]></token><![CDATA[)]]>
</programlisting><itemizedlist><listitem><para>To install <emphasis role="strong">BIOINFORMATICS R PACKAGES</emphasis>, we recommend to use &quot;bioconductor&quot; channels. </para></listitem></itemizedlist><programlisting format="linespecific" language="R" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[library]]></methodname><![CDATA[(]]><methodname><![CDATA[BiocManager]]></methodname><![CDATA[)]]>
<methodname><![CDATA[BiocManager]]></methodname><![CDATA[::]]><methodname><![CDATA[install]]></methodname><![CDATA[(]]><methodname><![CDATA[c]]></methodname><![CDATA[(]]><phrase><![CDATA["]]></phrase><phrase><![CDATA[<package1>"]]></phrase><![CDATA[, ]]><phrase><![CDATA["]]></phrase><phrase><![CDATA[<package2>"]]></phrase><![CDATA[,]]><symbol><![CDATA[...]]></symbol><![CDATA[))]]>
</programlisting><para>Read more about R and bioconductor: </para><itemizedlist><listitem><para><ulink url="https://cran.r-project.org/"/> </para></listitem><listitem><para><ulink url="https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf"/> </para></listitem><listitem><para><ulink url="https://www.bioconductor.org/"/> </para></listitem></itemizedlist></section><section><title>Quick links</title><orderedlist numeration="arabic"><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/Computers%20description#">Computers description</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/Request%20an%20account#">Request an account</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/storage%20description#">storage description</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/First%20login#">First login</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/Receiving%20sequencing%20data#">Receiving sequencing data</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/transferring%20data#">transferring data</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/Submitting%20jobs#">Submitting jobs</ulink> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/Monitor%20jobs#">Monitor jobs</ulink> </para></listitem><listitem><para><link linkend="">Install tools</link> </para></listitem><listitem><para><ulink url="https://platecarpus.wur.nl/wiki.potato/Install%20tools/wiki.potato/Space%20management#">Space management</ulink> </para></listitem></orderedlist><para><link linkend="top">#top</link> </para></section></section></article>