bowmanjeffs / paprica

paprica - PAthway PRediction by phylogenetIC plAcement
26 stars 8 forks source link

Error running test #76

Closed lee-s17 closed 3 years ago

lee-s17 commented 3 years ago

Hi, I installed paprica, checked all dependencies, but when I run the test: ./paprica-run.sh test bacteria, I encountered the following error:

(conda) gl@gl:~/paprica$ ./paprica-run.sh test bacteria [Parallel(n_jobs=32)]: Using backend LokyBackend with 32 concurrent workers. [Parallel(n_jobs=32)]: Done 5 out of 23 | elapsed: 0.7s remaining: 2.4s [Parallel(n_jobs=32)]: Done 10 out of 23 | elapsed: 0.8s remaining: 1.1s [Parallel(n_jobs=32)]: Done 15 out of 23 | elapsed: 1.2s remaining: 0.6s [Parallel(n_jobs=32)]: Done 20 out of 23 | elapsed: 7.2s remaining: 1.1s [Parallel(n_jobs=32)]: Done 23 out of 23 | elapsed: 9.4s finished Traceback (most recent call last): File "/home/gl/anaconda3/envs/microb/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 2889, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 97, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1675, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1683, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: True   The above exception was the direct cause of the following exception:   Traceback (most recent call last): File "/home/gl/paprica/paprica-pick_domain.py", line 249, in e_min = temp[temp['score'] == temp['score'].max()] File "/home/gl/anaconda3/envs/microb/lib/python3.8/site-packages/pandas/core/series.py", line 882, in getitem return self._get_value(key) File "/home/gl/anaconda3/envs/microb/lib/python3.8/site-packages/pandas/core/series.py", line 991, in _get_value loc = self.index.get_loc(label) File "/home/gl/anaconda3/envs/microb/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 2891, in get_loc raise KeyError(key) from err KeyError: True Traceback (most recent call last): File "/home/gl/paprica/paprica-place_it.py", line 533, in unique_count, unique_names, unique_seq_names = make_unique(cwd + query) File "/home/gl/paprica/paprica-place_it.py", line 211, in make_unique clean_name(query) File "/home/gl/paprica/paprica-place_it.py", line 197, in clean_name for record in SeqIO.parse(prefix + '.fasta', 'fasta'): File "/home/gl/anaconda3/envs/microb/lib/python3.8/site-packages/Bio/SeqIO/init.py", line 627, in parse i = iterator_generator(handle) File "/home/gl/anaconda3/envs/microb/lib/python3.8/site-packages/Bio/SeqIO/FastaIO.py", line 181, in init super().init(source, alphabet=alphabet, mode="t", fmt="Fasta") File "/home/gl/anaconda3/envs/microb/lib/python3.8/site-packages/Bio/SeqIO/Interfaces.py", line 42, in init self.stream = open(source, "r" + mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/gl/paprica/test.bacteria.fasta'

May I know how to resolve this?

bowmanjeffs commented 3 years ago

This is a quirky little thing in different pandas versions. I'll provide a fix in the next update, which will have some major overall improvements. In the meantime change line 255 in paprica-pick_domain.py from "exceptAttributeError:" to "exceptKeyError:"