Skip to content

Commit

Permalink
Introduced path_qc variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jcohenadad committed Dec 22, 2023
1 parent 450e26a commit 285939e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Download data\n",
"# Download data and define path variables\n",
"\n",
"!datalad install https://github.com/OpenNeuroDatasets/ds004906.git\n",
"os.chdir(\"ds004906\")\n",
"# !datalad get . # uncomment for production\n",
"!datalad get sub-01/ # comment for debugging\n",
"path_data = os.getcwd()"
"path_data = os.getcwd()\n",
"path_qc = os.path.join(path_data, \"qc\")"
]
},
{
Expand All @@ -94,21 +95,21 @@
"subjects = glob.glob(\"sub-*\")\n",
"for subject in subjects:\n",
" os.chdir(os.path.join(path_data, subject, \"anat\"))\n",
" !sct_deepseg_sc -i {subject}_acq-CoV_T2starw.nii.gz -c t2 -qc {os.path.join(path_data, \"qc\")}"
" !sct_deepseg_sc -i {subject}_acq-CoV_T2starw.nii.gz -c t2 -qc {path_qc}"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "028b3383",
"id": "17223063",
"metadata": {},
"outputs": [],
"source": [
"# Register TFL B1maps to the GRE scan\n",
"\n",
"for subject in subjects:\n",
" os.chdir(os.path.join(path_data, subject, \"fmap\"))\n",
" !sct_register_multimodal -i {subject}_acq-anatCoV_TB1TFL.nii.gz -d ../anat/{subject}_acq-CoV_T2starw.nii.gz -param step=1,type=im,algo=slicereg,metric=CC -qc {os.path.join(path_data, \"qc\")}"
" !sct_register_multimodal -i {subject}_acq-anatCoV_TB1TFL.nii.gz -d ../anat/{subject}_acq-CoV_T2starw.nii.gz -param step=1,type=im,algo=slicereg,metric=CC -qc {path_qc}"
]
}
],
Expand Down

0 comments on commit 285939e

Please sign in to comment.