how to get fs_LR space bold data from hcppipeline

194 views
Skip to first unread message

Yuan Cao

unread,
Jun 25, 2024, 8:52:20 PM6/25/24
to HCP-Users
Hi expert,
I have recently been running XCP-D using hcp-preprocessed data, but an error indicated that I lacked fs_LR spaced bold data. I am wondering which step in hcppipeline can create fs_LR space data. Is the task-rest_dir-RL_LR_Atlas_MSMAll.dtseries.nii the 32k_fsLR space data? Attached is my Results folder

Here is the code I used and the error:
Code:
sudo docker run -it --rm -v /media/ubuntu/NCU/deng/Rawdata:/data -v /media/ubuntu/NCU/out:/out -v /opt/freesurfer/license.txt:/opt/freesurfer/license.txt pennlinc/xcp_d:latest /data /out --despike --head_radius 40 -w /media/ubuntu/NCU/deng/Rawdata --smoothing 6 --fs-license-file /opt/freesurfer/license.txt participant --participant-label 233 --input-type hcp
Error:
With input_type hcp, cifti processing (--cifti) will be enabled automatically.
With input_type hcp, surface normalization (--warp-surfaces-native2std) will be enabled automatically.
240626-00:24:59,480 nipype.utils WARNING:
 convert_hcp2bids is an experimental function.
240626-00:24:59,480 nipype.utils INFO:
 Converting 233
240626-00:24:59,481 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/T1w.nii.gz
240626-00:24:59,481 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/brainmask_fs.nii.gz
240626-00:24:59,481 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/ribbon.nii.gz
240626-00:24:59,481 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/aparc+aseg.nii.gz
240626-00:24:59,481 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/fsaverage_LR32k/233.L.pial.32k_fs_LR.surf.gii
240626-00:24:59,481 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/fsaverage_LR32k/233.R.pial.32k_fs_LR.surf.gii
240626-00:24:59,481 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/fsaverage_LR32k/233.L.white.32k_fs_LR.surf.gii
240626-00:24:59,482 nipype.utils WARNING:
 File DNE: /data/233/MNINonLinear/fsaverage_LR32k/233.R.white.32k_fs_LR.surf.gii
240626-00:24:59,482 nipype.utils WARNING:
 File(s) DNE:
/data/233/MNINonLinear/fsaverage_LR32k/233.L.thickness.32k_fs_LR.shape.gii
/data/233/MNINonLinear/fsaverage_LR32k/233.R.thickness.32k_fs_LR.shape.gii
240626-00:24:59,482 nipype.utils WARNING:
 File(s) DNE:
/data/233/MNINonLinear/fsaverage_LR32k/233.L.corrThickness.32k_fs_LR.shape.gii
/data/233/MNINonLinear/fsaverage_LR32k/233.R.corrThickness.32k_fs_LR.shape.gii
240626-00:24:59,482 nipype.utils WARNING:
 File(s) DNE:
/data/233/MNINonLinear/fsaverage_LR32k/233.L.curvature.32k_fs_LR.shape.gii
/data/233/MNINonLinear/fsaverage_LR32k/233.R.curvature.32k_fs_LR.shape.gii
240626-00:24:59,482 nipype.utils WARNING:
 File(s) DNE:
/data/233/MNINonLinear/fsaverage_LR32k/233.L.sulc.32k_fs_LR.shape.gii
/data/233/MNINonLinear/fsaverage_LR32k/233.R.sulc.32k_fs_LR.shape.gii
240626-00:24:59,482 nipype.utils WARNING:
 File(s) DNE:
/data/233/MNINonLinear/fsaverage_LR32k/233.L.MyelinMap.32k_fs_LR.func.gii
/data/233/MNINonLinear/fsaverage_LR32k/233.R.MyelinMap.32k_fs_LR.func.gii
240626-00:24:59,482 nipype.utils WARNING:
 File(s) DNE:
/data/233/MNINonLinear/fsaverage_LR32k/233.L.SmoothedMyelinMap.32k_fs_LR.func.gii
/data/233/MNINonLinear/fsaverage_LR32k/233.R.SmoothedMyelinMap.32k_fs_LR.func.gii
240626-00:24:59,482 nipype.utils INFO:
 Finished collecting anatomical files
240626-00:24:59,482 nipype.utils INFO:
 Finished collecting functional files
240626-00:24:59,482 nipype.utils INFO:
 Copying files
240626-00:24:59,482 nipype.utils WARNING:
 File used for more than one output: /usr/local/miniconda/lib/python3.10/site-packages/xcp_d/data/transform/itkIdentityTransform.txt
240626-00:24:59,483 nipype.utils INFO:
 Finished copying files
240626-00:24:59,485 nipype.utils INFO:
 Conversion completed
240626-00:25:07,978 nipype.workflow IMPORTANT:
 Running XCP-D version 0.7.4
240626-00:25:07,984 nipype.workflow IMPORTANT:
 Building XCP-D's workflow:
           * Preprocessing derivatives path: /media/ubuntu/NCU/deng/Rawdata/dset_bids/derivatives/hcp.
           * Participant list: ['233'].
           * Run identifier: 20240626-002456_0bfbfefb-f810-410b-946d-4cbf81cbcc10.
Process Process-2:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/cli/workflow.py", line 98, in build_workflow
    retval["workflow"] = init_xcpd_wf()
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 80, in init_xcpd_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 126, in init_single_subject_wf
    subj_data = collect_data(
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/utils/bids.py", line 255, in collect_data
    raise FileNotFoundError(
FileNotFoundError: No BOLD data found in allowed spaces (fsLR).

Query: {'datatype': 'func', 'suffix': 'bold', 'desc': ['preproc', None], 'extension': '.dtseries.nii', 'space': 'fsLR'}


Thank you so much

Yuan
Screenshot 2024-06-26 at 02.46.11.png

Tim Coalson

unread,
Jun 25, 2024, 9:06:29 PM6/25/24
to hcp-...@humanconnectome.org
The folder screenshot you sent shows preprocessed outputs in a "sub-223" folder, but your command is trying to find files in a "223" folder.  You probably need to specify "sub-223" as the subject identifier.  That output folder looks like someone has tried to use BIDS-like names for the HCP preprocessing outputs, with an unclear amount of success.

Yes, the _Atlas*.dtseries.nii files should contain fs_LR32k data.

Tim


--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/896fea0e-08fb-4e65-bfa7-5a2f1f6a2e1en%40humanconnectome.org.

Jim Pollaro

unread,
Nov 18, 2024, 11:54:18 AM11/18/24
to HCP-Users, Tim Coalson
I've run into this problem. It's one of many you'll get trying to get this data to work. xcp-d is good enough to know that 223 is sub-223

Starting on this line of xcp-d you can see the BIDS format it's xcp-d is looking for. My issue was all the bold data was `task<tasktype><run-id>` instead of `task-<task-type>_run-<run-id>`. Once I changed those, it started to work. And now it's failing on trying to collect the brain registration data. I'm getting
```
2024-11-18 15:33:06,030 [ WARNING] WARNING: Cannot detect name collisions for function 'nifti_masker_extractor'

Traceback (most recent call last):
  File "/usr/local/miniconda/bin/xcp_d", line 8, in <module>
    sys.exit(main())
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/cli/run.py", line 27, in main
    parse_args(args=sys.argv[1:])
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/cli/parser.py", line 799, in parse_args
    convert_to_bids(
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/ingression/abcdbids.py", line 73, in convert_dcan2bids
    convert_dcan_to_bids_single_subject(
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/ingression/abcdbids.py", line 298, in convert_dcan_to_bids_single_subject
    collect_hcp_confounds(
  File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/ingression/utils.py", line 182, in collect_hcp_confounds
    brainreg = pd.DataFrame(
  File "/usr/local/miniconda/lib/python3.10/site-packages/pandas/core/frame.py", line 778, in __init__
    mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
  File "/usr/local/miniconda/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
    return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
  File "/usr/local/miniconda/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
    index = _extract_index(arrays)
  File "/usr/local/miniconda/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 677, in _extract_index
    raise ValueError("All arrays must be of the same length")
ValueError: All arrays must be of the same length
```
For some reason the masks or data are different lengths. It's immensely frustrating

Glasser, Matthew

unread,
Nov 18, 2024, 12:52:50 PM11/18/24
to hcp-...@humanconnectome.org, tim.c...@gmail.com

What is xcp-d?

Matt.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Reply all
Reply to author
Forward
0 new messages