Rinoahu / SwiftOrtho

A high performance tool to identify orthologs and paralogs across genomes.
GNU General Public License v3.0
27 stars 11 forks source link

It is possible to provide the package in docker or singualarity format in the future? #9

Open weifei888 opened 4 years ago

weifei888 commented 4 years ago

I am very glad to use it software in last year, it is very nice to calculate the ortholog in multiple species. However, when I want to use it in a public server, I always find there is some problem in environment or something else. So, I wonder if it is possible to provide the package in docker or singualarity format in the future? So that there would be more people can use it who are not very familar with linux server.

Rinoahu commented 4 years ago

Thanks for the suggestion. Docker is a good way to address the environment issues. I am not familiar with docker and need to learn how to use it. I will try to package it in docker in the future.

mictadlo commented 4 years ago

Bioconda would an alternative.

MrTomRod commented 1 year ago

I would be happy to create a docker image. In the paper, you say PyPy makes it even faster, so I will build an image based on their container. Does the PyPy installation require anything more other than what is in install.sh?

MrTomRod commented 1 year ago

This tool was pretty difficult to install. It requires a specific gcc compiler, pypy and Rpython for Python 2 apparently... I only managed to install it with conda, not with pip. Nevertheless, this seems to work:

FROM continuumio/anaconda3
MAINTAINER Thomas Roder

RUN apt-get update --allow-releaseinfo-change && apt install -y \
  build-essential wget gcc g++ gfortran libopenblas-dev liblapack-dev pkg-config

# install MCL
WORKDIR /opt
RUN mkdir installmcl && \
  cd installmcl && \
  wget https://raw.githubusercontent.com/micans/mcl/main/install-this-mcl.sh -o install-this-mcl && \
  chmod u+x install-this-mcl.sh && \
  env HOME="/usr" bash -c ./install-this-mcl.sh && \
  cd /opt  && \
  rm -rf installmcl && \
  mcl --version  # test if it works

# cone SwiftOrtho
WORKDIR /opt
RUN git clone https://github.com/Rinoahu/SwiftOrtho.git

# install SwiftOrtho (remove last line)
WORKDIR /opt/SwiftOrtho
RUN bash install.sh
ENV PATH="/opt/SwiftOrtho/pypy/install_dir/bin/:${PATH}"
RUN pypy -mpip install -U networkx

WORKDIR /data

The resulting image is available on Docker Hub: https://hub.docker.com/r/troder/swiftortho

Usage:

$ docker pull troder/swiftortho
$ docker run --rm -v $PWD:/data -it troder/swiftortho bash
(docker)$ pypy /opt/SwiftOrtho/bin/find_hit.py
(docker)$ pypy /opt/SwiftOrtho/bin/find_orth.py
(docker)$ pypy /opt/SwiftOrtho/bin/find_cluster.py
(docker)$ pypy /opt/SwiftOrtho/scripts/run_all.py