diff --git a/bluepyefe/nwbreader.py b/bluepyefe/nwbreader.py index 2a8ed8c..e2d7b1b 100644 --- a/bluepyefe/nwbreader.py +++ b/bluepyefe/nwbreader.py @@ -278,19 +278,20 @@ def read(self): """ data = [] - # Only return data if target_protocols is None or includes "step" + # Only return data if target_protocols is None or includes "step" or "genericstep" if self.target_protocols: allowed = [p.lower() for p in self.target_protocols] - if "step" not in allowed: + if "step" not in allowed and "genericstep" not in allowed: logger.warning( - f"TRTNWBReader only supports 'step' protocols, but requested: {self.target_protocols}. Skipping." + "TRTNWBReader only supports 'step' and 'genericstep' protocols, " + f"but requested: {self.target_protocols}. Skipping." ) return [] # possible paths in content: # /acquisition/index_00 # or /acquisition/index_000 - # or /acquisition/index_0_0_0 + # or /acquisition/Index_0_0_0 for voltage_sweep_name, voltage_sweep in list(self.content["acquisition"].items()): parts = voltage_sweep_name.split("_") if len(parts) == 2: @@ -312,7 +313,7 @@ def read(self): # possible paths in content: # /stimulus/presentation/index_01 # or /stimulus/presentation/index_001 - # or /stimulus/presentation/index_0_0_1 + # or /stimulus/presentation/Index_0_0_1 current_sweep = self.content["stimulus"]["presentation"][current_sweep_name] data.append(self._format_nwb_trace( diff --git a/bluepyefe/reader.py b/bluepyefe/reader.py index 5028edf..b9cc14b 100644 --- a/bluepyefe/reader.py +++ b/bluepyefe/reader.py @@ -215,7 +215,7 @@ def nwb_reader(in_data): elif "timeseries" in content["acquisition"].keys(): # For data from the Allen Institute reader = AIBSNWBReader(content, target_protocols) - elif next(iter(content["acquisition"]))[:6] == "index_": + elif next(iter(content["acquisition"]))[:6].lower() == "index_": # For data from Derek Howard # (An in vitro whole-cell electrophysiology dataset of human cortical neurons) reader = TRTNWBReader(content, target_protocols, repetition=None)