Chainer assumes GFP channel exists, breaking grouper
Summary
Chainer assumes GFP channel exists, breaking grouper
Steps to reproduce
Use aliby
d89c2cd5 or 0.1.49 (b206c48a).
Minimal working example -- use grouper
like so:
from postprocessor.grouper import NameGrouper
# Define system path to HDF5 file
data_dir = .....
# Define path in HDF5 file to signal,
# e.g. 'extraction/mCherry_bgsub/max/mean'
h5path = .....
grouper = NameGrouper(data_dir)
s = grouper.concat_signal(h5path)
What is the current bug behavior?
IndexError
raised, see traceback below.
What is the expected correct behavior?
s
should be defined as an object that contains the appropriate signal from the grouper
object.
Logs/Traceback
Traceback (most recent call last):
File "strain_report_dev.py", line 53, in <module>
grouper = NameGrouper(data_directory)
File "/home/arin/git/aliby/src/postprocessor/grouper.py", line 302, in __init__
super().__init__(dir=dir)
File "/home/arin/git/aliby/src/postprocessor/grouper.py", line 31, in __init__
self.load_chains()
File "/home/arin/git/aliby/src/postprocessor/grouper.py", line 35, in load_chains
self.chainers = {f.name[:-3]: Chainer(f) for f in self.files}
File "/home/arin/git/aliby/src/postprocessor/grouper.py", line 35, in <dictcomp>
self.chainers = {f.name[:-3]: Chainer(f) for f in self.files}
File "/home/arin/git/aliby/src/postprocessor/chainer.py", line 28, in __init__
channel = [ch for ch in self.channels if re.match("GFP", ch)][0]
IndexError: list index out of range
Possible fixes
This was actually fixed in c361e004 and 252915c6 to create aliby
0.1.48, but apparently broke something else (see 78f9499c (comment 106980)), so those changes were removed in aliby
0.1.49