Skip to content

Commit

Permalink
xsec2
Browse files Browse the repository at this point in the history
  • Loading branch information
baxpr committed Feb 5, 2025
1 parent cd7c68e commit 4e82142
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 0 deletions.
104 changes: 104 additions & 0 deletions processors/fmriprep-PSYXSEC2-T1_v24.1.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
procyamlversion: 3.0.0-dev.0

description: fmriprep - https://fmriprep.org/en/stable/

jobtemplate: job_template_v3.txt

containers:
- name: fmriprep
path: fmriprep_24.1.1.sif
source: docker://nipreps/fmriprep:24.1.1

requirements:
walltime: 2-0
memory: 24000

inputs:
xnat:

filters:
- type: match
inputs: scan_t1,assr_fs/scan_t1

scans:

- name: scan_t1
types: T1,T1_PGPP,T1W_3D_TFE_new_SENSE
keep_multis: first
skip_unusable: true
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: t1.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: t1.json}

- name: scan_fmri
types: Funct_Run1,REST*,Rest*
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: fmri.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: fmri.json}

assessors:

- name: assr_fs
proctypes: freesurfer741_v2
resources:
- {resource: SUBJECT, ftype: DIR, fdest: SUBJECT}

attrs:
- {varname: subject, object: session, attr: subject_label}
- {varname: session, object: session, attr: label}

outputs:
- {path: HTML, type: DIR, resource: HTML}
- {path: fmriprepBIDS, type: DIR, resource: fmriprepBIDS}


pre:
type: singularity_exec
container: fmriprep
args: >-
bash -c '
mkdir /INPUTS/freesurfer &&
mv /INPUTS/SUBJECT/SUBJECT /INPUTS/freesurfer/sub-{subject} &&
cd /INPUTS &&
curl -o fmriprep-prep.tar.gz -L https://github.com/baxpr/fmriprep-prep/archive/refs/tags/v1.5.1.tar.gz &&
tar -zxf fmriprep-prep.tar.gz &&
export PATH=/INPUTS/fmriprep-prep-1.5.1/src:\$PATH &&
fmriprep-prep.sh
--t1_niigz /INPUTS/t1.nii.gz
--bids_dir /INPUTS/fmriprepBIDS
--sub {subject}
--ses {session}
--fmri_niigzs /INPUTS/fmri.nii.gz
--task rest
'
command:
type: singularity_run
container: fmriprep
args: >-
--notrack
--work-dir /tmp
--output-spaces MNI152NLin6Asym
--ignore fieldmaps slicetiming
--fs-license-file /opt/license.txt
--fs-subjects-dir /INPUTS/freesurfer
/INPUTS/fmriprepBIDS
/OUTPUTS/fmriprepBIDS
participant
extraopts: --bind /data/mcr/centos7/FS6/license.txt:/opt/license.txt


# Here we do some extra gymnastics to copy the full HTML output to HTML resource
# without knowing the dirnames (due to changed subject label).
post:
type: singularity_exec
container: fmriprep
args: >-
bash -c '
mkdir /OUTPUTS/HTML &&
cp /OUTPUTS/fmriprepBIDS/sub-*.html /OUTPUTS/HTML &&
cp -R /OUTPUTS/fmriprepBIDS/sub-* /OUTPUTS/HTML &&
rm -fr /OUTPUTS/HTML/sub-*/ses-* &&
rm -fr /OUTPUTS/HTML/sub-*/log
'
104 changes: 104 additions & 0 deletions processors/fmriprep-PSYXSEC2-TFE_v24.1.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
procyamlversion: 3.0.0-dev.0

description: fmriprep - https://fmriprep.org/en/stable/

jobtemplate: job_template_v3.txt

containers:
- name: fmriprep
path: fmriprep_24.1.1.sif
source: docker://nipreps/fmriprep:24.1.1

requirements:
walltime: 2-0
memory: 24000

inputs:
xnat:

filters:
- type: match
inputs: scan_t1,assr_fs/scan_t1

scans:

- name: scan_t1
types: T1W_3D_TFE,T1W_3D_TFE_new
keep_multis: 2
skip_unusable: true
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: t1.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: t1.json}

- name: scan_fmri
types: Funct_Run1,REST*,Rest*
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: fmri.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: fmri.json}

assessors:

- name: assr_fs
proctypes: freesurfer741_v2
resources:
- {resource: SUBJECT, ftype: DIR, fdest: SUBJECT}

attrs:
- {varname: subject, object: session, attr: subject_label}
- {varname: session, object: session, attr: label}

outputs:
- {path: HTML, type: DIR, resource: HTML}
- {path: fmriprepBIDS, type: DIR, resource: fmriprepBIDS}


pre:
type: singularity_exec
container: fmriprep
args: >-
bash -c '
mkdir /INPUTS/freesurfer &&
mv /INPUTS/SUBJECT/SUBJECT /INPUTS/freesurfer/sub-{subject} &&
cd /INPUTS &&
curl -o fmriprep-prep.tar.gz -L https://github.com/baxpr/fmriprep-prep/archive/refs/tags/v1.5.1.tar.gz &&
tar -zxf fmriprep-prep.tar.gz &&
export PATH=/INPUTS/fmriprep-prep-1.5.1/src:\$PATH &&
fmriprep-prep.sh
--t1_niigz /INPUTS/t1.nii.gz
--bids_dir /INPUTS/fmriprepBIDS
--sub {subject}
--ses {session}
--fmri_niigzs /INPUTS/fmri.nii.gz
--task rest
'
command:
type: singularity_run
container: fmriprep
args: >-
--notrack
--work-dir /tmp
--output-spaces MNI152NLin6Asym
--ignore fieldmaps slicetiming
--fs-license-file /opt/license.txt
--fs-subjects-dir /INPUTS/freesurfer
/INPUTS/fmriprepBIDS
/OUTPUTS/fmriprepBIDS
participant
extraopts: --bind /data/mcr/centos7/FS6/license.txt:/opt/license.txt


# Here we do some extra gymnastics to copy the full HTML output to HTML resource
# without knowing the dirnames (due to changed subject label).
post:
type: singularity_exec
container: fmriprep
args: >-
bash -c '
mkdir /OUTPUTS/HTML &&
cp /OUTPUTS/fmriprepBIDS/sub-*.html /OUTPUTS/HTML &&
cp -R /OUTPUTS/fmriprepBIDS/sub-* /OUTPUTS/HTML &&
rm -fr /OUTPUTS/HTML/sub-*/ses-* &&
rm -fr /OUTPUTS/HTML/sub-*/log
'

0 comments on commit 4e82142

Please sign in to comment.