Summary of what happened:
Hi all, I’m running FitLins on Haxby’s visual object recognition dataset. I’m trying to run a very simple run-level GLM for one single subject. From the error message it seems like FitLins cannot locate my NIfTI images, but I can’t find errors in how I’m mounting my data. Any help would be greatly appreciated!
Here’s how my json file looks like (which I’ve placed under [bids_root]/models/model-001_smdl.json):
{
"Name":"ds_model001",
"Description":"Model for Visual Object Recognition task",
"Input":{
"task":"objectviewing"
},
"Nodes":[
{
"Level":"run",
"Name":"subject",
"GroupBy":[
"run",
"subject"
],
"Transformations":{
"Transformer": "pybids-transforms-v1",
"Instructions": [
{
"Name": "Factor",
"Input": ["trial_type"]
},
{
"Name": "Convolve",
"Model": "spm",
"Input": ["trial_type.face", "trial_type.scrambledpix"]
}
]
},
"Model":{
"X":[
"trial_type.face",
"trial_type.scrambledpix",
"framewise_displacement",
"trans_x",
"trans_y",
"trans_z",
"rot_x",
"rot_y",
"rot_z",
"a_comp_cor_00",
"a_comp_cor_01",
"a_comp_cor_02",
"a_comp_cor_03",
"a_comp_cor_04",
"a_comp_cor_05"
]
},
"Contrasts":[
{
"Name":"face_gt_scrambled",
"ConditionList":[
"trial_type.face",
"trial_type.scrambled"
],
"Weights":[
1,
-1
],
"Test":"t"
}
]
}
]
}
Command used (and if a helper script was used, a link to the helper script or the command generated):
docker run --rm -it \
-v /Users/sajjad/Documents/Haxby/data/:/bids:ro \
-v /Users/sajjad/Documents/Haxby/data/derivatives:/prep:ro \
-v /Users/sajjad/Documents/Haxby/data/derivatives/fitlins:/out \
-v /Users/sajjad/Documents/Haxby/data/derivatives/fitlins_work:/scratch \
poldracklab/fitlins:latest \
/bids /out participant -d /prep -w /scratch --participant-label 1 -m /bids/models/model-001_smdl.json --estimator nilearn
Version:
Environment (Docker, Singularity / Apptainer, custom installation):
Docker
Data formatted according to a validatable standard? Please provide the output of the validator:
bids-validator@1.14.5
(node:1) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
1: [ERR] Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder. (code: 1 - NOT_INCLUDED)
./models/example1_model-001_smdl.json
Evidence: example1_model-001_smdl.json
./models/example2_model-001_smdl.json
Evidence: example2_model-001_smdl.json
./models/example3_model-001_smdl.json
Evidence: example3_model-001_smdl.json
./models/example4_model-001_smdl.json
Evidence: example4_model-001_smdl.json
./models/model-001_smdl.json
Evidence: model-001_smdl.json
Please visit https://neurostars.org/search?q=NOT_INCLUDED for existing conversations about this issue.
1: [WARN] You should define 'SliceTiming' for this file. If you don't provide this information slice time correction will not be possible. 'Slice Timing' is the time at which each slice was acquired within each volume (frame) of the acquisition. Slice timing is not slice order -- rather, it is a list of times containing the time (in seconds) of each slice acquisition in relation to the beginning of volume acquisition. (code: 13 - SLICE_TIMING_NOT_DEFINED)
./sub-1/func/sub-1_task-objectviewing_run-01_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-02_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-03_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-04_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-05_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-06_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-07_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-08_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-09_bold.nii.gz
./sub-1/func/sub-1_task-objectviewing_run-10_bold.nii.gz
... and 61 more files having this issue (Use --verbose to see them all).
Please visit https://neurostars.org/search?q=SLICE_TIMING_NOT_DEFINED for existing conversations about this issue.
2: [WARN] Not all subjects contain the same files. Each subject should contain the same number of files with the same naming unless some files are known to be missing. (code: 38 - INCONSISTENT_SUBJECTS)
./sub-5/func/sub-5_task-objectviewing_run-12_bold.nii.gz
Evidence: Subject: sub-5; Missing file: sub-5_task-objectviewing_run-12_bold.nii.gz
./sub-5/func/sub-5_task-objectviewing_run-12_events.tsv
Evidence: Subject: sub-5; Missing file: sub-5_task-objectviewing_run-12_events.tsv
Please visit https://neurostars.org/search?q=INCONSISTENT_SUBJECTS for existing conversations about this issue.
3: [WARN] Not all subjects/sessions/runs have the same scanning parameters. (code: 39 - INCONSISTENT_PARAMETERS)
./sub-6/anat/sub-6_T1w.nii.gz
Please visit https://neurostars.org/search?q=INCONSISTENT_PARAMETERS for existing conversations about this issue.
Summary: Available Tasks: Available Modalities:
157 Files, 1.75GB object viewing MRI
6 - Subjects
1 - Session
Relevant log outputs (up to 20 lines):
Captured warning (<class 'UserWarning'>): [Node subject]:Transformations reformatted to {'transformer': 'pybids-transforms-v1', 'instructions': [{'name': 'Factor', 'input': ['trial_type']}, {'name': 'Convolve', 'input': ['trial_type.face', 'trial_type.scrambledpix']}]}
240430-02:47:42,784 nipype.workflow INFO:
[Node] Setting-up "fitlins_wf.loader" in "/scratch/fitlins_wf/loader".
240430-02:47:42,870 nipype.workflow INFO:
[Node] Executing "loader" <fitlins.interfaces.bids.LoadBIDSModel>
/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/modeling/statsmodels.py:63: UserWarning: [Node subject]:Transformations reformatted to {'transformer': 'pybids-transforms-v1', 'instructions': [{'name': 'Factor', 'input': ['trial_type']}, {'name': 'Convolve', 'input': ['trial_type.face', 'trial_type.scrambledpix']}]}
warnings.warn(f"[Node {node['name']}]:"
240430-02:47:43,109 nipype.workflow INFO:
[Node] Finished "loader", elapsed time 0.204128s.
240430-02:47:43,109 nipype.workflow WARNING:
Storing result file without outputs
240430-02:47:43,115 nipype.workflow WARNING:
[Node] Error on "fitlins_wf.loader" (/scratch/fitlins_wf/loader)
240430-02:47:44,143 nipype.workflow ERROR:
Node loader failed to run on host eec0cd6b518f.
240430-02:47:44,144 nipype.workflow ERROR:
Saving crash info to /scratch/crash-20240430-024744-neuro-loader-529c9467-e290-4851-8b2c-7b5d8e2e9ebc.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 527, 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 645, 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 771, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node loader.
Traceback:
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 246, in _run_interface
graph.load_collections(**selectors)
File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/modeling/statsmodels.py", line 198, 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 860, 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 93, 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 186, in _load_time_variables
raise ValueError("No functional images that match criteria found.")
ValueError: No functional images that match criteria found.