CAMI-challenge / CAMISIM

CAMISIM: Simulating metagenomes and microbial communities
https://data.cami-challenge.org/participate
Apache License 2.0
166 stars 36 forks source link

Problem trying to run metagenome_from_profile.py with docker. Is python3 update completed? #149

Open MateDuda opened 1 year ago

MateDuda commented 1 year ago

Hi, I was trying to test run camisim using the docker image, but I ran into some problems. I tried a from profile simulation running metagenome_from_profile.py with the mini.biom file just as described in the example call, but however I tried I couldn't succeed for multiple reasons. Here are some problems I found:

  1. The docker image I pulled is most likely an outdated version using python2 that should be updated. The image built from the Dockerfile from the repository could be the up to date version, but that didn't run either

  2. The requirements.txt is was missing some dependencies, for example joblib, scipy, sklearn

  3. The shebang in metagenome_from_profile.py and other scripts had to be updated to #!/usr/bin/env python3

  4. in get_genomes_py the split_by_n function can't execute the perl scrpit with os.system. This can be solves by using:

    def split_by_N(fasta_path, out_path):
    import subprocess
    subprocess.run(['perl', '/usr/local/bin/scripts/split_fasta.pl', fasta_path, out_path], check=True)
    os.remove(fasta_path)

    intead of:

    def split_by_N(fasta_path, out_path):
    os.system("scripts/split_fasta.pl %s %s" % (fasta_path, out_path))
    os.remove(fasta_path)
  5. It looks like part of the scripts hasn't actually been updated to python3 from python2 which might be the reason I can't get it working.

Any help and information possible updates would be really appreciated. Thank you!

AlphaSquad commented 1 year ago

Hi, yes, unfortunately the Dockerfile is not up to date. If you get it to run I would be very happy to review a pull request, but I currently do not have the capacities to update the Dockerfile to be up-to-date with the latest CAMISIM version, sorry. For the CAMISIM 2.0 version coming up we plan on including a working Docker version

CassandraHjo commented 10 months ago

Is the Dockerfile still not up to date? Or has it been updated?