Skip to content

Commit

Permalink
rename yaml files for fmriprep/qsiprep; update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenying Zhao committed May 25, 2023
1 parent 03cd31e commit 25f7ed5
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 90 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
# This is an example config yaml file for fMRIPrep version 20.2.3,
# but in `--sloppy` mode, i.e., test mode, and there is no FreeSurfer recon either.
# This should NOT be used to produce real outputs you need.
# This is an example config yaml file for:
# BIDS App: fMRIPrep ("fmriprep")
# BIDS App version: 20.2.3
# Task: `--sloppy` mode + without FreeSurfer reconstruction
# Which system: SGE
# Tested on which cluster: Penn Med CUBIC cluster
# fMRIPrep's Docker image is publicly available at: https://hub.docker.com/r/nipreps/fmriprep/

# Warning!!!
# WARNING!!!
# This is only an example, which may not necessarily fit your purpose,
# or be an optimized solution for your case,
# or be compatible to the fMRIPrep version you're using.
# or be compatible to the BIDS App version you're using.
# Therefore, please change and tailor it for your case before use it!!!
# WARNING!!!
# We'll use `--sloppy` testing mode of fMRIPrep.
# Therefore this YAML file should only be used for testing purpose.
# You should NOT use this YAML file to generate formal results!

# Arguments when executing the BIDS App using `singularity run`:
# You should not have flags of : `--participant-label`, or `--bids-filter-file`!
singularity_run:
-w: "$BABS_TMPDIR" # this is a placeholder. To be changed to `${PWD}/.git/tmp/wkdir`
--n_cpus: '1'
--stop-on-first-crash: ""
--fs-license-file: "/cbica/projects/BABS/software/FreeSurfer/license.txt" # path to FS license file
--fs-license-file: "/cbica/projects/BABS/software/FreeSurfer/license.txt" # [FIX ME] path to FS license file
--skip-bids-validation: Null # Null or NULL is also a placeholder
--output-spaces: "MNI152NLin6Asym:res-2 MNI152NLin2009cAsym" # e.g., two output spaces
--output-spaces: "MNI152NLin6Asym:res-2" # for two output spaces: e.g., "MNI152NLin6Asym:res-2 MNI152NLin2009cAsym"
--force-bbr: ""
#--cifti-output: 91k # ADD THIS WHEN FULL RUN!
-v: '-v' # this is for double "-v"
--sloppy: '' # TEST RUN!
--fs-no-reconall: '' # TEST RUN!
--sloppy: '' # WARNING: use this only when testing
--fs-no-reconall: '' # WARNING: use this only when testing

# Output foldername(s) to be zipped, and the BIDS App version to be included in the zip filename(s):
# per `--fs-no-reconall`, there won't be an output folder called `freesurfer`
zip_foldernames:
fmriprep: "20-2-3" # folder 'fmriprep' will be zipped into 'sub-xx_ses-yy_fmriprep-20-2-3.zip'

cluster_resources:
interpreting_shell: /bin/bash # "-S /bin/bash" on cubic
hard_memory_limit: 25G # "-l h_vmem=25G" on cubic
temporary_disk_space: 200G # "-l tmpfree=200G" on cubic # this is highly-recommended on cubic
interpreting_shell: /bin/bash # --> "#!/bin/bash"
hard_memory_limit: 25G # --> "#$ -l h_vmem=25G"
temporary_disk_space: 200G # --> "#$ -l tmpfree=200G" # this is highly-recommended on CUBIC cluster
customized_text: |
#$ -R y
#$ -l hostname=!compute-fed*
Expand All @@ -42,16 +48,16 @@ cluster_resources:
# they will be used as preambles in `participant_job.sh`
# the commands should not be quoted!
script_preamble: |
source ${CONDA_PREFIX}/bin/activate mydatalad # Penn Med CUBIC cluster; replace 'mydatalad' with your conda env name
echo "I am running BABS." # this is an example command to show how to add another line; not necessary to include.
source ${CONDA_PREFIX}/bin/activate mydatalad # [FIX ME] Penn Med CUBIC cluster; replace 'mydatalad' with your conda env name
echo "I am running BABS." # [FIX ME] this is an example command to show how to add another line; not necessary to include.
# ^^ conda env above: where the scripts generated by BABS will run
# not necessary the same one for running `babs-init`
# ^^ based on what you need on your cluster; some people even don't use `conda`...
# for MSI, might need to add command e.g., "module_load"

# Where to run the jobs:
job_compute_space: "${CBICA_TMPDIR}" # Penn Med CUBIC cluster tmp space
job_compute_space: "${CBICA_TMPDIR}" # [FIX ME] Penn Med CUBIC cluster tmp space

# Below is to filter out subjects (or sessions)
# right now we only filter based on unzipped dataset
Expand Down
60 changes: 60 additions & 0 deletions notebooks/eg_qsiprep-0-16-0RC3_sloppy_sge_cubic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This is an example config yaml file for:
# BIDS App: QSIPrep ("qsiprep")
# BIDS App version: 0.16.0RC3
# Task: `--sloppy` mode
# Which system: SGE
# Tested on which cluster: Penn Med CUBIC cluster
# QSIPrep's Docker image is publicly available at: https://hub.docker.com/r/pennbbl/qsiprep

# WARNING!!!
# This is only an example, which may not necessarily fit your purpose,
# or be an optimized solution for your case,
# or be compatible to the BIDS App version you're using.
# Therefore, please change and tailor it for your case before use it!!!
# WARNING!!!
# We'll use `--sloppy` testing mode of QSIPrep.
# Therefore this YAML file should only be used for testing purpose.
# You should NOT use this YAML file to generate formal results!

singularity_run:
-v: "-v"
-w: "$BABS_TMPDIR" # this is a placeholder. To be changed to `${PWD}/.git/tmp/wkdir`
--n_cpus: "$NSLOTS" # `$NSLOTS` can be recognized by SGE
--omp-nthreads: "3" # without this, only run single-threaded jobs (N=`--n_cpus`) at once
--stop-on-first-crash: ""
--fs-license-file: "/cbica/projects/BABS/software/FreeSurfer/license.txt" # [FIX ME] path to FS license file
--skip-bids-validation: Null # Null or NULL is also a placeholder
--unringing-method: "mrdegibbs"
--output-resolution: "2.0"
--sloppy: "" # WARNING: only use this when testing
--hmc-model: "none" # WARNING: only use this when testing
--dwi-only: "" # WARNING: only use this when testing

# Output foldername(s) to be zipped, and the BIDS App version to be included in the zip filename(s):
zip_foldernames:
qsiprep: "0-16-0RC3" # folder 'qsiprep' will be zipped into 'sub-xx_ses-yy_qsiprep-0-16-0RC3.zip'

cluster_resources:
interpreting_shell: /bin/bash # --> "#!/bin/bash"
hard_memory_limit: 32G # --> `#$ -l h_vmem=32G`
temporary_disk_space: 200G # --> `#$ -l tmpfree=200G`
number_of_cpus: "6" # --> `#$ -pe threaded 6`
customized_text: |
#$ -R y
#$ -l hostname=!compute-fed*
# Notes: Above `customized_text` is Penn Med CUBIC cluster specific.
# So it's probably not relevant for other clusters

# Users need to add their customized bash command below,
# they will be used as preambles in `participant_job.sh`
# the commands should not be quoted!
script_preamble: |
source ${CONDA_PREFIX}/bin/activate mydatalad # [FIX ME] Penn Med CUBIC cluster; replace 'mydatalad' with your conda env name
echo "I am running BABS." # [FIX ME] this is an example command to show how to add another line; not necessary to include.
# Where to run the jobs:
job_compute_space: "${CBICA_TMPDIR}" # [FIX ME] Penn Med CUBIC cluster tmp space

required_files:
$INPUT_DATASET_#1:
- "dwi/*_dwi.nii*" # QSIPrep
2 changes: 1 addition & 1 deletion notebooks/eg_qsiprep-0-16-0RC3_sloppy_slurm_msi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ zip_foldernames:
qsiprep: "0-16-0RC3" # folder 'qsiprep' will be zipped into 'sub-xx_ses-yy_qsiprep-0-16-0RC3.zip'

cluster_resources:
interpreting_shell: "/bin/bash -l" # --> "#!/bin/bash -l"
interpreting_shell: "/bin/bash -l" # --> "#!/bin/bash -l"
hard_memory_limit: 32G # --> "#SBATCH --mem=32G"
temporary_disk_space: 200G # --> "#SBATCH --tmp=200G"
number_of_cpus: "6" # --> "#SBATCH --cpus-per-task=6"
Expand Down
56 changes: 0 additions & 56 deletions notebooks/example_container_qsiprep.yaml

This file was deleted.

32 changes: 16 additions & 16 deletions notebooks/show_babs_init_InputBIDS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/faird/zhaoc/babs/notebooks/eg_qsiprep-0-16-0RC3_sloppy_slurm_msi.yaml\n"
"/cbica/projects/BABS/babs/notebooks/eg_qsiprep-0-16-0RC3_sloppy_sge_cubic.yaml\n"
]
}
],
Expand All @@ -57,11 +57,11 @@
"# ++++++++++++++++++++++++++++++++++\n",
"bidsapp = \"qsiprep\"\n",
"task_name = \"sloppy\" # for fmriprep: 'anatonly', 'sloppy'; for toybidsapp: 'rawBIDS'\n",
"type_session = \"single-ses\"\n",
"which_dataset = \"HBN\" # \"toy_fake\", \"toy_real\", \"HBN\", \"PNC\"\n",
"type_session = \"multi-ses\"\n",
"which_dataset = \"toy_real\" # \"toy_fake\", \"toy_real\", \"HBN\", \"PNC\"\n",
"\n",
"flag_where = \"msi\" # \"cubic\" or \"local\" or \"msi\"\n",
"type_system = \"slurm\" # \"sge\" or \"slurm\"\n",
"flag_where = \"cubic\" # \"cubic\" or \"local\" or \"msi\"\n",
"type_system = \"sge\" # \"sge\" or \"slurm\"\n",
"# ++++++++++++++++++++++++++++++++++\n",
"\n",
"# sanity checks:\n",
Expand Down Expand Up @@ -164,7 +164,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -173,14 +173,14 @@
"text": [
"The command to execute:\n",
"babs-init \\\n",
"\t--where_project /home/faird/zhaoc/data \\\n",
"\t--project_name test_babs_single-ses_HBN_qsiprep_sloppy \\\n",
"\t--input BIDS /home/faird/zhaoc/data/HBN_BIDS \\\n",
"\t--container_ds /home/faird/zhaoc/data/qsiprep-container \\\n",
"\t--where_project /cbica/projects/BABS/data \\\n",
"\t--project_name test_babs_multi-ses_qsiprep_sloppy \\\n",
"\t--input BIDS /cbica/projects/BABS/data/testdata_NKI/data_hashedID_bids \\\n",
"\t--container_ds /cbica/projects/BABS/data/qsiprep-container \\\n",
"\t--container_name qsiprep-0-16-0RC3 \\\n",
"\t--container_config_yaml_file /home/faird/zhaoc/babs/notebooks/eg_qsiprep-0-16-0RC3_sloppy_slurm_msi.yaml \\\n",
"\t--type_session single-ses \\\n",
"\t--type_system slurm\n",
"\t--container_config_yaml_file /cbica/projects/BABS/babs/notebooks/eg_qsiprep-0-16-0RC3_sloppy_sge_cubic.yaml \\\n",
"\t--type_session multi-ses \\\n",
"\t--type_system sge\n",
"WARNING: make sure you've changed `--fs-license-file` value in YAML file if you use it!!!\n"
]
}
Expand Down Expand Up @@ -215,7 +215,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "babs",
"display_name": "mydatalad",
"language": "python",
"name": "python3"
},
Expand All @@ -234,7 +234,7 @@
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "2538d15ebb217aff7ed13fa29cc6f5f706af190e6008d76f30d7ce8c1383d79a"
"hash": "abcc7813313a81f6f916a4574498d1c2de65ad7fdfeb04d04cdf237cdcbdda8b"
}
}
},
Expand Down

0 comments on commit 25f7ed5

Please sign in to comment.