Skip to content

Commit

Permalink
proc
Browse files Browse the repository at this point in the history
  • Loading branch information
baxpr committed Nov 21, 2024
1 parent 7c29424 commit d6f4d0a
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 0 deletions.
107 changes: 107 additions & 0 deletions processors/fmriprep-GF-st-topup_v24.1.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
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: 'cs_T1W_3D_TFE_32 channel'
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: rest1APA_FMRI_MB3_2_5mm_1300
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: fmri.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: fmri.json}

- name: scan_fmrirpe
types: rest2APP_FMRI_MB3_2_5mm_1300
keep_multis: first
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: fmrirpe.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: fmrirpe.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: BIDS, 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 v1.5.0.tar.gz -L https://github.com/baxpr/fmriprep-prep/archive/refs/tags/v1.5.0.tar.gz &&
tar -zxf v1.5.0.tar.gz &&
export PATH=/INPUTS/fmriprep-prep-1.5.0/src:\$PATH &&
fmriprep-prep.sh
--t1_niigz /INPUTS/t1.nii.gz
--rpefwd_niigz /INPUTS/fmri.nii.gz
--rperev_niigz /INPUTS/fmrirpe.nii.gz
--bids_dir /INPUTS/BIDS
--sub {subject}
--ses {session}
--fmri_niigzs /INPUTS/fmri.nii.gz
'
command:
type: singularity_run
container: fmriprep
args: >-
--notrack
--participant_label {subject}
--output-spaces MNI152NLin6Asym
--slice-time-ref 0
--fs-license-file /opt/license.txt
--fs-subjects-dir /INPUTS/freesurfer
/INPUTS/BIDS
/OUTPUTS/BIDS
participant
extraopts: --bind /data/mcr/centos7/FS6/license.txt:/opt/license.txt

post:
type: singularity_exec
container: fmriprep
args: >-
bash -c '
mkdir /OUTPUTS/HTML &&
cp /OUTPUTS/BIDS/sub-{subject}.html /OUTPUTS/HTML &&
mkdir /OUTPUTS/HTML/sub-{subject} &&
cp -R /OUTPUTS/BIDS/sub-{subject}/figures /OUTPUTS/HTML/sub-{subject}
'
107 changes: 107 additions & 0 deletions processors/fmriprep-NVS-rest_v23.2.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
procyamlversion: 3.0.0-dev.0

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

jobtemplate: job_template_v3.txt

containers:
- name: fmriprep
path: fmriprep_23.2.1.sif
source: docker://nipreps/fmriprep:23.2.1

requirements:
walltime: 2-0
memory: 24000

inputs:
xnat:

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

scans:

- name: scan_t1
types: 'cs_T1W_3D_TFE_32 channel'
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: Rest
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: fmri.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: fmri.json}

- name: scan_fmrirpe
types: TOPUP
keep_multis: first
resources:
- {resource: NIFTI, fmatch: '*.nii.gz', fdest: fmrirpe.nii.gz}
- {resource: JSON, fmatch: '*.json', fdest: fmrirpe.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: BIDS, 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 v1.4.0.tar.gz -L https://github.com/baxpr/fmriprep-prep/archive/refs/tags/v1.4.0.tar.gz &&
tar -zxf v1.4.0.tar.gz &&
export PATH=/INPUTS/fmriprep-prep-1.4.0/src:\$PATH &&
fmriprep-prep.sh
--t1_niigz /INPUTS/t1.nii.gz
--rpefwd_niigz /INPUTS/fmri.nii.gz
--rperev_niigz /INPUTS/fmrirpe.nii.gz
--bids_dir /INPUTS/BIDS
--sub {subject}
--ses {session}
--fmri_niigzs /INPUTS/fmri.nii.gz
'
command:
type: singularity_run
container: fmriprep
args: >-
--notrack
--participant_label {subject}
--output-spaces MNI152NLin6Asym
--ignore slicetiming
--fs-license-file /opt/license.txt
--fs-subjects-dir /INPUTS/freesurfer
/INPUTS/BIDS
/OUTPUTS/BIDS
participant
extraopts: --bind /data/mcr/centos7/FS6/license.txt:/opt/license.txt

post:
type: singularity_exec
container: fmriprep
args: >-
bash -c '
mkdir /OUTPUTS/HTML &&
cp /OUTPUTS/BIDS/sub-{subject}.html /OUTPUTS/HTML &&
mkdir /OUTPUTS/HTML/sub-{subject} &&
cp -R /OUTPUTS/BIDS/sub-{subject}/figures /OUTPUTS/HTML/sub-{subject}
'

0 comments on commit d6f4d0a

Please sign in to comment.