centre-for-microbiome-research / GroopM

Metagenomic binning suite
GNU General Public License v3.0
29 stars 18 forks source link

GroopM2 ImportError: No module named tempdir #34

Open kmin940 opened 6 years ago

kmin940 commented 6 years ago

Hi, I am trying to run the new version of GroopM from https://github.com/timbalam/GroopM. I used virtualenv, and the code I used was

$(groopm_env_new) mathed@mathed-ubuntu:~/virtualenv/groopm_env_new/GroopM$ /usr/bin/time -v groopm2 parse ~/Simulation/custom_desman/1/Strains/Simulation20_2500000_nostr/test/groopm_1500/dbname ~/Simulation/custom_desman/1/Strains/Simulation20_2500000_nostr/test/final_contigs_1500.fa ~/Simulation/custom_desman/1/Strains/Simulation20_5000000/Map/Reads.*.mapped.sorted.bam and the error I received is Traceback (most recent call last): File "/home/mathed/virtualenv/groopm_env_new/bin/groopm2", line 56, in <module> import groopm File "/home/mathed/virtualenv/groopm_env_new/local/lib/python2.7/site-packages/groopm/__init__.py", line 52, in <module> from data3 import DataManager File "/home/mathed/virtualenv/groopm_env_new/local/lib/python2.7/site-packages/groopm/data3.py", line 59, in <module> import tempdir ImportError: No module named tempdir

There doesn't seem to be data3.py in the old version of GroopM, nor the use of tempdir. Do I have to install additional package? How?

Thank you very much.

wwood commented 6 years ago

Hi there, data3 is part of this version of groopm so you need not worry, tempdir can be installed in the usual way with pip install tempdir I believe. Good luck. ben

kmin940 commented 6 years ago

I see. Thank you very much. Also, do I need to install singlem pipe available at https://github.com/wwood/singlem#installation-via-pypi? Thank you very much.

wwood commented 6 years ago

Hi, no you do not need to install SingleM to use GroopM.

kmin940 commented 5 years ago

I see, but when I use groopm2 parse, I get the following error messages after parsing: Parsing file: /home/mathed/Simulation/custom_desman/1/Strains/Simulation20_2500000_nostr/Map/Reads.9.mapped.sorted.bam Mapping contigs Error creating database: /home/mathed/Simulation/custom_desman/1/Strains/Simulation20_2500000_nostr/test/groopm2/dbname <class 'subprocess.CalledProcessError'> Unexpected error: <class 'subprocess.CalledProcessError'> Traceback (most recent call last): File "/home/mathed/virtualenv/groopm_env_new/bin/groopm2", line 669, in args.run(args) File "/home/mathed/virtualenv/groopm_env_new/bin/groopm2", line 189, in call threads=options.threads) File "/home/mathed/virtualenv/groopm_env_new/local/lib/python2.7/site-packages/groopm/data3.py", line 340, in createDB (contig_indices, marker_indices, marker_names, marker_counts, taxstrings) = mapper.getMappings(contigsFile, cid_2_indices) File "/home/mathed/virtualenv/groopm_env_new/local/lib/python2.7/site-packages/groopm/data3.py", line 1862, in getMappings (con_indices, map_markers, map_taxstrings) = self._runMapper(contig_file, cid_2_indices, self._mode, working_directory) File "/home/mathed/virtualenv/groopm_env_new/local/lib/python2.7/site-packages/groopm/data3.py", line 1845, in _runMapper return mapper.getMappings(contig_file, cid_2_indices) File "/home/mathed/virtualenv/groopm_env_new/local/lib/python2.7/site-packages/groopm/map.py", line 83, in getMappings subprocess.check_call(cmd, shell=True) File "/usr/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'singlem pipe --sequences /home/mathed/Simulation/custom_desman/1/Strains/Simulation20_2500000_nostr/test/final_contigs_1500.fa --archive_otu_table /tmp/tmpCITk6m/singlem_otu_table.csv 2> /dev/null' returned non-zero exit status 1 Command exited with non-zero status 1

Is there a way to fix this? thank you.

wwood commented 5 years ago

Hi, Sorry sorry, you are quite right - I forgot you do need to install SingleM to use the new version of GroopM. My mistake.

adityabandla commented 4 years ago

Trying to install groopM v2. bamM is supported only on python 2, whereas singleM requires python 3, is there some work around to this?