-
Notifications
You must be signed in to change notification settings - Fork 90
Description
I know there are a lot of dependencies with funannotate (it isn't ideal). I spent quite some time getting funannotate working on conda. However, as most of you know that have worked with conda, it is also far from perfect. I can't possibly test everybody's system, my two test environments are centOS and macOS. In my experience, the key to keeping conda working is to never install anything in the base environment, this is especially true in a shared system as inevitably you end up with permissions issues with multiple users. If you are trying to install funannotate via conda, i.e. conda create -n funannotate funannotate and you are getting errors that it is unable to solve, then you most likely have packages installed in your base environment that are clashing with the dependencies.
I also know there are several people interested in Docker/Singularity containers #183 #366 #257 #379 . I've been told that conda doesn't work in these environments and fails to find a solution. I finally had some time to look around and see what worked/didn't work for me.
On my macOS system, I'm able to build a Docker image for funannotate v1.7.4 using python 2.7 as follows. Note that apparently on Debian systems the forge program in the Bioconda snap recipe isn't working (#387 thanks to @nhartwic for the fix), below you'll find a fix for that in this recipe. For me, bioconda snap works on both centOS and macOS.
FROM continuumio/miniconda3:latest
RUN conda config --add channels defaults && conda config --add channels bioconda && \
conda config --add channels conda-forge && conda update -n base -c defaults conda && \
apt-get update && apt-get -y install gcc
RUN conda create -n funannotate --yes "funannotate=1.7.4" && conda clean -afy && \
mkdir -p /home/funannotate_db && echo "source activate funannotate" > ~/.bashrc
ENV FUNANNOTATE_DB=/home/funannotate_db
SHELL ["conda", "run", "-n", "funannotate", "/bin/bash", "-c"]
#bioconda snap is partially broken on some systems (debian apparently), forge is problem
WORKDIR /opt
RUN git clone https://github.com/KorfLab/SNAP.git && cd SNAP && make && \
cp /opt/SNAP/forge /opt/conda/envs/funannotate/bin/forge
RUN funannotate setup -i all
#for some reason USER needs to be set for seqclean to work in docker
ENV USER='me'
WORKDIR /home
I'm also working on a python3 port of the code which is in the python3 branch. I'm still doing some testing on this branch to make sure everything is working. It would be helpful for others to test the code as well, as I know people use the scripts in slightly different ways. This can be tested in a docker environment like this (note I found a unicode error that needs to be fixed in this py3 port, but you get the idea):
FROM continuumio/miniconda3:latest
RUN conda config --add channels defaults && conda config --add channels bioconda &&\
conda config --add channels conda-forge && conda update -n base -c defaults --yes \
conda && apt-get update && apt-get -y install gcc make
RUN conda create -n funannotate --yes python=3.7 biopython goatools matplotlib natsort \
psutil requests scikit-learn scipy seaborn "blast=2.2.31" tantan bedtools hmmer \
exonerate "diamond>0.9,<=0.9.24" tbl2asn ucsc-pslcdnafilter "pasa>=2.4.1" \
trimmomatic raxml trimal "mafft>=7" iqtree "kallisto>=0.46,<0.46.2" evidencemodeler \
codingquarry stringtie snap glimmerhmm trnascan-se hisat2 "proteinortho>=6.0.9" \
"salmon>=0.9" perl "perl-bioperl>1.7" perl-dbd-mysql perl-clone perl-hash-merge \
perl-soap-lite perl-json perl-logger-simple perl-scalar-util-numeric minimap2 \
perl-text-soundex perl-parallel-forkmanager "r-base>=3.4.1" bamtools numpy pandas \
"augustus>3.3" "trinity>=2.8.5=h8b12597_5" pip && conda clean -afy && \
mkdir -p /home/funannotate_db && echo "source activate funannotate" > ~/.bashrc
ENV FUNANNOTATE_DB=/home/funannotate_db
SHELL ["conda", "run", "-n", "funannotate", "/bin/bash", "-c"]
#bioconda snap is partially broken on some systems (debian apparently), forge is problem
WORKDIR /opt
RUN git clone https://github.com/KorfLab/SNAP.git && cd SNAP && make && \
cp /opt/SNAP/forge /opt/conda/bin/forge
RUN python -m pip install git+https://github.com/nextgenusfs/funannotate.git@python3
RUN funannotate setup -i all -w
#for some reason USER needs to be set for seqclean to work in docker
ENV USER='me'
WORKDIR /home