BU-ISCIII / plasmidID

PlasmidID is a mapping-based, assembly-assisted plasmid identification tool that analyzes and gives graphic solution for plasmid identification.
https://github.com/BU-ISCIII/plasmidID/wiki
GNU General Public License v3.0
38 stars 8 forks source link

Case with no plasmids found #15

Closed Nilad closed 3 years ago

Nilad commented 4 years ago

I got this error:

.
.
.
DRAWING CIRCOS IMAGES (Thu Sep 17 09:31:05 CEST 2020)
 An image per putative plasmid will be drawn having into account all data supplied.
 Additionally a summary image will be created to determine redundancy within remaining plasmids

DONE, files can be found at /myhome/NO_GROUP/81009/images

CREATING SUMMARY REPORT (Thu Sep 17 09:31:24 CEST 2020)
 An html report with miniatures of the images will be generate with useful statistics to determine the correct plasmids in the sample.
Namespace(group=False, input_folder='/myhome/NO_GROUP/81009')
Creating summary
Wrong number of items passed 7, placement implies 1
Traceback (most recent call last):
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2646, in get_loc
    return self._engine.get_loc(key)
  File "pandas/_libs/index.pyx", line 111, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1619, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1627, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'images'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 1071, in set
    loc = self.items.get_loc(item)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2648, in get_loc
    return self._engine.get_loc(self._maybe_cast_indexer(key))
  File "pandas/_libs/index.pyx", line 111, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1619, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1627, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'images'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/plasmidID/bin/summary_report_pid.py", line 465, in <module>
    main()
  File "/usr/local/plasmidID/bin/summary_report_pid.py", line 458, in main
    final_individual_dataframe = include_images(input_folder, summary_df)
  File "/usr/local/plasmidID/bin/summary_report_pid.py", line 135, in include_images
    summary_df['images'] = summary_df.apply(lambda x: image_finder(x, sample_folder), axis=1)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/frame.py", line 2938, in __setitem__
    self._set_item(key, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/frame.py", line 3001, in _set_item
    NDFrame._set_item(self, key, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 3624, in _set_item
    self._data.set(key, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 1074, in set
    self.insert(len(self.items), item, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 1181, in insert
    block = make_block(values=value, ndim=self.ndim, placement=slice(loc, loc + 1))
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/blocks.py", line 3047, in make_block
    return klass(values, ndim=ndim, placement=placement)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/blocks.py", line 2595, in __init__
    super().__init__(values, ndim=ndim, placement=placement)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/blocks.py", line 125, in __init__
    f"Wrong number of items passed {len(self.values)}, "
ValueError: Wrong number of items passed 7, placement implies 1
Traceback (most recent call last):
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2646, in get_loc
    return self._engine.get_loc(key)
  File "pandas/_libs/index.pyx", line 111, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1619, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1627, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'images'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 1071, in set
    loc = self.items.get_loc(item)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2648, in get_loc
    return self._engine.get_loc(self._maybe_cast_indexer(key))
  File "pandas/_libs/index.pyx", line 111, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1619, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1627, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'images'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/plasmidID/bin/summary_report_pid.py", line 465, in <module>
    main()
  File "/usr/local/plasmidID/bin/summary_report_pid.py", line 458, in main
    final_individual_dataframe = include_images(input_folder, summary_df)
  File "/usr/local/plasmidID/bin/summary_report_pid.py", line 135, in include_images
    summary_df['images'] = summary_df.apply(lambda x: image_finder(x, sample_folder), axis=1)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/frame.py", line 2938, in __setitem__
    self._set_item(key, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/frame.py", line 3001, in _set_item
    NDFrame._set_item(self, key, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 3624, in _set_item
    self._data.set(key, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 1074, in set
    self.insert(len(self.items), item, value)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/managers.py", line 1181, in insert
    block = make_block(values=value, ndim=self.ndim, placement=slice(loc, loc + 1))
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/blocks.py", line 3047, in make_block
    return klass(values, ndim=ndim, placement=placement)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/blocks.py", line 2595, in __init__
    super().__init__(values, ndim=ndim, placement=placement)
  File "/myhome/.local/lib/python3.6/site-packages/pandas/core/internals/blocks.py", line 125, in __init__
    f"Wrong number of items passed {len(self.values)}, "
ValueError: Wrong number of items passed 7, placement implies 1

---------------------------------------

ERROR in Script plasmidID on or near line 1075; exiting with status 1
MESSAGE:

See /myhome/logs/plasmidID.log for more information.
command:
summary_report_pid.py -i /myhome/NO_GROUP/81009 -g

---------------------------------------

This error is done because the files (81009.bedgraph_term, 81009.gff.coordinates, 81009.gff.forward.coordinates, 81009.gff.reverse.coordinates, 81009.plasmids.blast.links, 81009.plasmids.complete, 81009.plasmids.links, pID_highlights.conf and pID_text_annotation.coordinates) are empty.

If no plasmids are selected by the filters, it could be nice to manage this case.

saramonzon commented 3 years ago

I think this should be fixed now, if error persists please reopen!