Skip to content

Commit

Permalink
BUG: fix bids metadata extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jungheejung committed Aug 27, 2024
1 parent 6a663db commit 3f6114e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spacetop_prep/events/bidsify_fractional_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_task_name(bids_string, metadata_df):
str: The task name or an error message if the input is invalid.
"""
# Convert subject_id to integer by removing the 'sub-' prefix
fname = Path(bids_string).name
fname = Path(bids_string).stem
sub = extract_bids(fname, 'sub')
run = extract_bids(fname, 'run')
subject_number = int(sub.replace('sub-', ''))
Expand Down
2 changes: 1 addition & 1 deletion spacetop_prep/events/bidsify_fractional_subtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_task_name(bids_string, metadata_df):
str: The task name or an error message if the input is invalid.
"""
# Convert subject_id to integer by removing the 'sub-' prefix
fname = Path(bids_string).name
fname = Path(bids_string).stem
sub = extract_bids(fname, 'sub')
run = extract_bids(fname, 'run')
subject_number = int(sub.replace('sub-', ''))
Expand Down

0 comments on commit 3f6114e

Please sign in to comment.