Skip to content

Commit 4e46caa

Browse files
authored
Merge pull request #53 from nasironeeb/dev
fix: handle None timepoints in collect_config
2 parents 9f460f7 + 1480b6d commit 4e46caa

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tools/scaling/scaling_cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ def collect_config(
391391
columns named "<modality>-1", "<modality>-2".
392392
timepoints : list[str]
393393
The timepoints to consider in the longitudinal analysis.
394+
Default None.
394395
workflow_id : str
395396
The workflow declared name in brainprep CLI.
396397
workflow_parameters : str
@@ -439,7 +440,11 @@ def collect_config(
439440
key = key[1:] if key[0] == "!" else key
440441
if key.endswith("s") and key[:-1] in long_dfs:
441442
df_ = long_dfs[key[:-1]]
442-
df_ = df_.filter(regex=f"-({'|'.join(timepoints)})$").copy()
443+
df_ = (
444+
df_.filter(regex=f"-({'|'.join(timepoints)})$").copy()
445+
if timepoints is not None
446+
else df_.copy()
447+
)
443448
subset = [
444449
name
445450
for name in df_.columns

0 commit comments

Comments
 (0)