poldracklab / fitlins

Fit Linear Models to BIDS Datasets
https://fitlins.readthedocs.io
Apache License 2.0
73 stars 30 forks source link

Support for fsnative #373

Open smeisler opened 2 years ago

smeisler commented 2 years ago

Is fitlins meant to support fsnative space? I see some mention of .func.gii in the source code, but didn't look too far into it.

Environment

fitlins version 0.10.1 via Singularity on CentOs7.6

Expected Behavior

GLM run on fsnative func.gii outputs

Observed Behavior

220613-21:55:14,561 nipype.workflow ERROR:
     Node loader failed to run on host node051.
220613-21:55:14,561 nipype.workflow ERROR:
     Saving crash info to /om2/scratch/Fri/smeisler/INSIDE_preproc/sub-inside7006/crash-20220613-215514-smeisler-loader-941aee49-fd5b-4816-8147-5398f2f41ebc.txt
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 521, in run
    result = self._run_interface(execute=True)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 639, in _run_interface
    return self._run_command(execute)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 750, in _run_command
    raise NodeExecutionError(
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node loader.

Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 398, in run
    runtime = self._run_interface(runtime)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/fitlins/interfaces/bids.py", line 248, in _run_interface
    graph.load_collections(**selectors)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/modeling/statsmodels.py", line 201, in load_collections
    collections = self.layout.get_collections(node.level, drop_na=drop_na,
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/layout/layout.py", line 840, in get_collections
    index = load_variables(self, types=types, levels=level,
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/variables/io.py", line 92, in load_variables
    dataset = _load_time_variables(layout, dataset, scope=scope, **_kwargs)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/variables/io.py", line 182, in _load_time_variables
    images = layout.get(return_type='object', scope=scope, extension=exts, **selectors)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/layout/layout.py", line 626, in get
    raise ValueError(msg + "If you're sure you want to impose "
ValueError: 'desc' is not a recognized entity. If you're sure you want to impose this constraint, set invalid_filters='allow'.

Steps to Reproduce

  1. Run fmriprep (22.0.0RC2) with --output-spaces fsnative
  2. Run fitlins with --space fsnative
effigies commented 2 years ago

No, I put it in the code because we should support it in principle, but we haven't gotten around to actually handling it.

It actually shouldn't be very hard, the trickier part will be repacking the stat maps in appropriate gifti metadata.