AuReMe / mpwt

Pathway Tools multiprocessing wrapper (for PathoLogic).
GNU Lesser General Public License v3.0
12 stars 0 forks source link

Error when trying to run mpwt on Ubuntu with Python3.7 #31

Closed mostueve closed 4 years ago

mostueve commented 4 years ago

Hi, I ran into this issue trying to run mpwt. Could it be because of the Python version?

my command line call is:

mpwt -f path/to/input -o path/to/output --patho --hf --dat --cpu 4 --log path/to/logs --ignore-error -v


multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/ptools_venv/lib/python3.7/site-packages/mpwt/pathologic_input.py", line 417, in pwt_input_files
    check_datas_lisp = create_dats_and_lisp(run_folder, taxon_file)
  File "/ptools_venv/lib/python3.7/site-packages/mpwt/pathologic_input.py", line 304, in create_dats_and_lisp
    region_feature = [feature for feature in DataIterator(gff_pathname) if feature.featuretype == 'region'][0]
IndexError: list index out of range
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/ptools_venv/bin/mpwt", line 10, in <module>
    sys.exit(run_mpwt())
  File "/ptools_venv/lib/python3.7/site-packages/mpwt/__main__.py", line 113, in run_mpwt
    verbose=verbose)
  File "/ptools_venv/lib/python3.7/site-packages/mpwt/mpwt_workflow.py", line 102, in multiprocess_pwt
    mpwt_pool.map(pwt_input_files, multiprocess_inputs)
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 290, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 683, in get
    raise self._value
IndexError: list index out of range
mostueve commented 4 years ago

just tested with python3.6.6 - same same.

what does this region_feature = [feature for feature in DataIterator(gff_pathname) if feature.featuretype == 'region'][0] look for exactly?

mostueve commented 4 years ago

Ok, this is due to wrong gff files. Nevermind.

ArnaudBelcour commented 4 years ago

Hi,

Sorry for the delay of my answer, I am on holiday.

As you already have found it, this error is caused by a missing feature in the GFF.

I reopen the issue because this error is difficult to understand, I will make an update in the next version to have a better error message.

Thank you for your report.

ArnaudBelcour commented 4 years ago

The error message has been added in #32.