User Tools

Site Tools


funannotate-software

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
funannotate-software [2022/03/17 16:46] aorthfunannotate-software [2022/07/05 11:43] aorth
Line 4: Line 4:
 ===== Information ===== ===== Information =====
  
-  * Version: 1.8.9+  * Version: 1.8.11
   * Added: August, 2021   * Added: August, 2021
-  * Updated: March, 2022+  * Updated: June, 2022
   * Link: https://github.com/nextgenusfs/funannotate   * Link: https://github.com/nextgenusfs/funannotate
  
 ===== Usage ===== ===== Usage =====
  
-See versions 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.9 +# 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.9 funannotate +
-# env > before-conda +
-# conda activate /export/apps/funannotate/1.8.9 +
-# env > conda-funannotate-1.8.9 +
-# exit +
-$ sudo mkdir -p /export/apps/funannotate/1.8.9 +
-$ sudo chown aorth /export/apps/funannotate/1.8.9 +
-$ rsync -av /var/tmp/chroot/funannotate/export/apps/funannotate/1.8.9/ /export/apps/funannotate/1.8.9 +
-$ sudo chown -R root:root /export/apps/funannotate/1.8.9 +
-$ 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.9 directory. Furthermore, I first installed funannotate/1.8.9 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.11/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 +$ singularity pull /var/scratch/funannotate.sif docker://nextgenusfs/funannotate:v1.8.11 
-$ sudo mkdir -p /export/apps/funannotate/1.8.9/db +$ sudo mkdir -p /export/apps/funannotate/1.8.11 
-$ sudo chown aorth /export/apps/funannotate/1.8.9/db +$ sudo /var/scratch/funannotate.sif /export/apps/funannotate/1.8.11</code>
-$ funannotate setup -d /export/apps/funannotate/1.8.9/db</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.11/funannotate.sif \ 
 +            funannotate test -t all --cpus 10</code>
funannotate-software.txt · Last modified: 2023/04/20 21:21 by aorth