Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

GroopM2 ImportError: No module named tempdir #34

Open
kmin940 opened this issue Nov 27, 2018 · 6 comments
Open

GroopM2 ImportError: No module named tempdir #34

kmin940 opened this issue Nov 27, 2018 · 6 comments

Comments

@kmin940
Copy link

kmin940 commented Nov 27, 2018

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
Copy link
Member

wwood commented Nov 27, 2018 via email

@kmin940
Copy link
Author

kmin940 commented Nov 29, 2018

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
Copy link
Member

wwood commented Nov 29, 2018

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

@kmin940
Copy link
Author

kmin940 commented Dec 7, 2018

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
Copy link
Member

wwood commented Dec 7, 2018

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
Copy link

adityabandla commented Sep 30, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants