Illumina / interop

C++ Library to parse Illumina InterOp files
http://illumina.github.io/interop/index.html
GNU General Public License v3.0
75 stars 26 forks source link

Error in tutorial_03 #304

Closed hotsoupisgood closed 1 year ago

hotsoupisgood commented 1 year ago

In the cell with

lane, tile, cycle, channel = (1, 1101, 15, 0)
extraction_metric = extraction_metrics.get_metric(lane, tile, cycle)
intensity = extraction_metric.max_intensity (channel)

on the 2nd line I get this error: index_out_of_bounds_exception: Index map empty: Run rebuild_index(true) on this metric_set Not sure what the issue is. Any help would be much appreceiated.

hotsoupisgood commented 1 year ago

Running python 3.8.2

hotsoupisgood commented 1 year ago

Full traceback


index_out_of_bounds_exception             Traceback (most recent call last)
Cell In[17], line 3
      1 # lane, tile, cycle, channel = (1, 1101, 15, 0)
      2 lane, tile, cycle, channel = (0, 0, 0, 0)
----> 3 extraction_metric = extraction_metrics.get_metric(lane, tile, cycle)
      4 intensity = extraction_metric.max_intensity (channel)

File ~/Library/Python/3.8/lib/python/site-packages/interop/py_interop_metrics.py:2981, in base_extraction_metrics.get_metric(self, *args)
   2980 def get_metric(self, *args):
-> 2981     return _py_interop_metrics.base_extraction_metrics_get_metric(self, *args)

index_out_of_bounds_exception: Index map empty: Run rebuild_index(true) on this metric_set
/Users/runner/work/interop/interop/./interop/model/metric_base/metric_set.h::get_metric (680)```
ezralanglois commented 1 year ago

get_metric requires a hash map to be built. To save memory, we do not build this hashmap by default.

Calling the following before the first call to get_metric will build the hashmap. extraction_metrics.rebuild_index(true)

hotsoupisgood commented 1 year ago

Gotcha, rebuilding the index worked.