Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions bluepyefe/nwbreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion bluepyefe/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down