User Tools

Site Tools


funannotate-software

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
funannotate-software [2021/08/05 08:03] – created aorthfunannotate-software [2023/04/20 21:21] (current) aorth
Line 4: Line 4:
 ===== Information ===== ===== Information =====
  
-  * Version: 1.8.7+  * Version: 1.8.15
   * Added: August, 2021   * Added: August, 2021
 +  * Updated: April, 2023
   * Link: https://github.com/nextgenusfs/funannotate   * Link: https://github.com/nextgenusfs/funannotate
  
 ===== Usage ===== ===== Usage =====
  
-See versions of funannotate that are available: +Funannotate is installed in a dedicated "container" environment using [[https://docs.sylabs.io/guides/latest/user-guide/|Singularity]] (similar to Docker, but more suited to HPC environments) so you need to run it a bit differently than other software. Here is an example SLURM batch script, ''funannotate.sbatch'':
-<code>$ module avail funannotate</code>+
  
-Load a particular version into your environment and run it:+<code>#!/usr/bin/env bash 
 +#SBATCH -p batch 
 +#SBATCH -n 10 
 +#SBATCH -J funannotate
  
-<code>$ module load funannotate/1.8.7 +# Set up output directory in scratch 
-funannotate --help</code>+WORKDIR=/var/scratch/aorth/funannotate/2022-06-09
  
-===== Installation ====== +mkdir -p "$WORKDIR" && cd "$WORKDIR"
-Notes from the sysadmin during installation:+
  
-<code>mkdir -p /var/tmp/chroot/funannotate +echo "SLURM job ID $SLURM_JOBID using $WORKDIR on $SLURMD_NODENAME"
-rpm --rebuilddb --root=/var/tmp/chroot/funannotate +
-wget https://hpc.ilri.cgiar.org/mirror/centos/7/os/x86_64/Packages/centos-release-7-9.2009.0.el7.centos.x86_64.rpm +
-$ sudo rpm --root=/var/tmp/chroot/funannotate -i centos-release-7-9.2009.0.el7.centos.x86_64.rpm +
-$ sudo yum --installroot=/var/tmp/chroot/funannotate install -y rpm-build yum gcc wget vim perl +
-$ sudo cp /etc/resolv.conf /var/tmp/chroot/funannotate/etc +
-$ sudo mount --bind /dev/ /var/tmp/chroot/funannotate/dev +
-$ sudo mount -t proc procfs /var/tmp/chroot/funannotate/proc +
-$ sudo mount -t sysfs sysfs /var/tmp/chroot/funannotate/sys +
-$ sudo chroot /var/tmp/chroot/funannotate +
-# wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh +
-# bash Miniconda3-latest-Linux-x86_64.sh -b -p /export/apps/funannotate/conda +
-# eval "$(/export/apps/funannotate/conda/bin/conda shell.bash hook)" +
-# conda config --add channels defaults +
-# conda config --add channels bioconda +
-# conda config --add channels conda-forge +
-# conda install -n base mamba +
-# mamba create -p /export/apps/funannotate/1.8.7 funannotate +
-# env > before-conda +
-# conda activate /export/apps/funannotate/1.8.7 +
-# env > conda-funannotate-1.8.7 +
-# exit +
-$ sudo mkdir -p /export/apps/funannotate/1.8.7 +
-$ sudo chown aorth /export/apps/funannotate/1.8.7 +
-$ rsync -av /var/tmp/chroot/funannotate/export/apps/funannotate/1.8.7/ /export/apps/funannotate/1.8.7 +
-$ sudo chown -R root:root /export/apps/funannotate/1.8.7 +
-$ sudo umount /var/tmp/chroot/funannotate/dev /var/tmp/chroot/funannotate/proc /var/tmp/chroot/funannotate/sys</code>+
  
-funannotate has over fifty dependencies and is essentially impossible to install without the use of [[https://conda.io/miniconda.html|Miniconda]]. My strategy is to install Conda somewhere globally and then use it to install funannotate. After the installation is done I think we don't technically need Conda itself anymore, as all binaries seem to be linked against libraries in the funannotate/1.8.7 directory. Furthermore, I first installed funannotate/1.8.7 in a chroot on the local file system and then rsynced it over to the network applications directory. This is MUCH faster, but more importantly, it avoids random "permission denied" errors I was getting when installing on the network file system.+DATADIR=/home/aorth/data 
 +rnaseq_ont="${DATADIR}/ayb_leaf_stem_root.fastq" 
 +genome="${DATADIR}/ayb_11chrs_assembly_soft_masked.fasta"
  
-To create the [[https://github.com/ilri/hpc-environment-modules/tree/master/funannotate|modulefile]] I compared the output ''env'' before and after loading the funannotate environment with Conda.+# The most important thing is to bind the input files and output directory. 
 +singularity run \ 
 +            --bind "$genome:$genome","$rnaseq_ont:$rnaseq_ont","$WORKDIR:$WORKDIR"
 +            /export/apps/funannotate/1.8.15/funannotate.sif \ 
 +            funannotate train --input "$genome"
 +            --out "$WORKDIR"
 +            --nanopore_cdna "$rnaseq_ont"
 +            --max_intronlen 10000 \ 
 +            --jaccard_clip --species "Sphenotylis stenocarpa"
 +            --cpus $SLURM_NTASKS</code>
  
-Install databases:+Note the use of ''bind'' to map the input files and working directory from the compute node into the container. 
 + 
 +===== Installation ====== 
 +Notes from the sysadmin during installation:
  
-<code>module load funannotate/1.8.+<code>export SINGULARITY_TMPDIR=/var/scratch/aorth 
-$ funannotate check --show-versions +$ mkdir $SINGULARITY_TMPDIR 
-$ sudo mkdir -p /export/apps/funannotate/1.8.7/db +$ singularity pull /var/scratch/funannotate.sif docker://nextgenusfs/funannotate:v1.8.15 
-$ sudo chown aorth /export/apps/funannotate/1.8.7/db +$ sudo mkdir -p /export/apps/funannotate/1.8.15 
-$ funannotate setup -d /export/apps/funannotate/1.8.7/db</code>+$ sudo cp /var/scratch/funannotate.sif /export/apps/funannotate/1.8.15</code>
  
 Run built-in tests: Run built-in tests:
  
-<code>funannotate test -t all --cpus 12</code>+<code>singularity run \ 
 +            /export/apps/funannotate/1.8.15/funannotate.sif \ 
 +            funannotate test -t all --cpus 10</code>
funannotate-software.1628150596.txt.gz · Last modified: 2021/08/05 08:03 by aorth