flass / pantagruel

a pipeline for reconciliation of phylogenetic histories within a bacterial pangenome
GNU General Public License v3.0
46 stars 7 forks source link

missing igraph #34

Closed megaptera-helvetiae closed 4 years ago

megaptera-helvetiae commented 4 years ago

Hola Florent,

I am going step-by-step. Today I got stuck because apparently 'igraph' was not installed.

Traceback (most recent call last):
  File "/scratch/clamchatka/Panta/pantagruel/scripts/replace_species_by_pop_in_gene_trees.py", line 10, in <module>
    import igraph
ImportError: No module named igraph
ERROR: failed search of populations in reference tree
ERROR: Pantagruel pipeline task 5: failed.

Which distribution should I install? https://igraph.org/redirect.html

Also, is there a way to check what else is missing in my pantagruel installation? Or should I just go like I did so far; step-by-step?

Thanks. Laetitia

flass commented 4 years ago

HI Laetitia you can install Python module igraph using either

apt install python-igraph

or

pip install python-igraph

I think going step-by-step is a bit of a waste of time; it's much better if you have everything you need when you start running the pipeline! My bad not having the Docker or Singularity containers out yet (even though there is a Docker container recipe made by @pveber in the etc/ folder, but I admit not knowing really how to deploy it). For the time being, my advice is to 1) run the install_dependencies script or if you can't because you lack admin rights, just browse it and try to manually install all what is in there. the main part that is not accessible to you as a non-admin is the one using apt install, which of course contains most of the software. This is the list of pakages to install with apt:

deppackages="git build-essential cmake gcc g++ lftp clustalo raxml libhmsbeagle1v5 mrbayes \
  r-base-core r-recommended r-cran-ape r-cran-ade4 r-cran-vegan r-cran-dbi r-cran-rsqlite r-cran-igraph r-cran-getopt r-cran-phytools \
  sqlite3 sqlite3-doc libmagick++-dev python python-scipy python-numpy python-biopython python-biopython-sql python-igraph cython \
  mpi-default-bin mpi-default-dev mrbayes-mpi python-pip openjdk-11-jdk openjdk-11-jre \
  libdw1 libdw-dev libgsl23 libgsl-dev"

you can check whether they are already installed using:

apt list --installed

and make a list of missing ones with

for pkg in $deppackages ; do
  instpkg=$(apt list --installed 2> /dev/null | grep $pkg)
  [ -z "$instpkg" ] && echo "missing: $pkg"
done