Skip to content

Commit

Permalink
Updating parsers after changes in default_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Sep 5, 2024
1 parent 79b41a1 commit 777f59c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bids_prov/afni/afni_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ def afni_to_bids_prov(filename: str, context_url=CONTEXT_URL, output_file=None,
"""
commands_block = readlines(filename)

graph, agent_id = get_default_graph(label="AFNI", context_url=context_url, soft_ver=soft_ver)
graph, agent_id = get_default_graph(
soft_label="AFNI", context_url=context_url, soft_version=soft_ver)
records, bloc_act = build_records(commands_block, agent_id, verbose=verbose)

graph["Records"].update(records)
Expand Down
2 changes: 1 addition & 1 deletion bids_prov/fsl/fsl_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def fsl_to_bids_prov(filename: str, context_url=CONTEXT_URL, output_file=None,
soft_ver="xxx", indent=2, verbose=False) -> bool: # TODO : add fsl version

graph, agent_id = get_default_graph(
label="FSL", context_url=context_url, soft_ver=soft_ver)
soft_label="FSL", context_url=context_url, soft_version=soft_ver)

lines = readlines(filename)
records = build_records(lines, agent_id)
Expand Down
3 changes: 2 additions & 1 deletion bids_prov/spm/spm_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ def spm_to_bids_prov(filename: str, context_url=CONTEXT_URL, output_file=None, s
If true, nothing is written in memory because the existing file (if it exists) contains the same content.
"""

graph, agent_id = get_default_graph(label="SPM", context_url=context_url, soft_ver=spm_ver)
graph, agent_id = get_default_graph(
soft_label='SPM', context_url=context_url, soft_version=spm_ver)
lines = readlines(filename)
tasks = group_lines(lines) # same as list(lines) to expand generator
records = get_records(tasks, agent_id, verbose=verbose)
Expand Down

0 comments on commit 777f59c

Please sign in to comment.