xnatqa 0.0.16__tar.gz → 0.0.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xnatqa-0.0.16/xnatqa.egg-info → xnatqa-0.0.17}/PKG-INFO +1 -1
- {xnatqa-0.0.16 → xnatqa-0.0.17}/pyproject.toml +1 -1
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa/launch.py +10 -4
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa/tag/__init__.py +3 -2
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa/xnatqa.py +3 -1
- {xnatqa-0.0.16 → xnatqa-0.0.17/xnatqa.egg-info}/PKG-INFO +1 -1
- {xnatqa-0.0.16 → xnatqa-0.0.17}/LICENSE +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/README.md +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/setup.cfg +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa/__init__.py +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa.egg-info/SOURCES.txt +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa.egg-info/dependency_links.txt +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa.egg-info/entry_points.txt +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa.egg-info/requires.txt +0 -0
- {xnatqa-0.0.16 → xnatqa-0.0.17}/xnatqa.egg-info/top_level.txt +0 -0
|
@@ -12,9 +12,11 @@ def main():
|
|
|
12
12
|
# parse input arguments
|
|
13
13
|
parser = argparse.ArgumentParser(description="XNAT QA Workflow")
|
|
14
14
|
parser.add_argument("--experiment", default = "", required=True)
|
|
15
|
+
parser.add_argument("--dryrun", default = "", action='store_true', help="Run in dry run mode: No launching of jobs")
|
|
15
16
|
|
|
16
17
|
args, unknown_args = parser.parse_known_args()
|
|
17
18
|
MRsession = args.experiment
|
|
19
|
+
dryrun = args.dryrun
|
|
18
20
|
|
|
19
21
|
# authenticate with xnat using the ~/.xnat_auth file created earlier in the workflow
|
|
20
22
|
auth = yaxil.auth(alias = 'xnat')
|
|
@@ -33,12 +35,16 @@ def main():
|
|
|
33
35
|
|
|
34
36
|
# if that note has a "#BOLD" tag...
|
|
35
37
|
if '#BOLD' in note:
|
|
36
|
-
print('Run BOLDQC')
|
|
37
|
-
|
|
38
|
+
print('Run BOLDQC:')
|
|
39
|
+
print(f'qsub -P cncxnat boldqc.qsub {MRsession} {b}')
|
|
40
|
+
if not dryrun:
|
|
41
|
+
os.system(f'qsub -P cncxnat boldqc.qsub {MRsession} {b}')
|
|
38
42
|
b+=1
|
|
39
43
|
|
|
40
44
|
# if that note has a "#T1w" tag...
|
|
41
45
|
if '#T1w' in note:
|
|
42
|
-
print('Run ANATQC')
|
|
43
|
-
|
|
46
|
+
print('Run ANATQC:')
|
|
47
|
+
print(f'qsub -P cncxnat anatqc.qsub {MRsession} {a}')
|
|
48
|
+
if not dryrun:
|
|
49
|
+
os.system(f'qsub -P cncxnat anatqc.qsub {MRsession} {a}')
|
|
44
50
|
a+=1
|
|
@@ -188,11 +188,12 @@ def update_xnat_tags(MRsession):
|
|
|
188
188
|
# run the command
|
|
189
189
|
os.system(f'xnat_tagger.py --label {MRsession} --target-modality all --xnat-alias xnat --config tagger.yaml')
|
|
190
190
|
|
|
191
|
-
def tag_scans(dicom_dir, MRsession):
|
|
191
|
+
def tag_scans(dicom_dir, MRsession, dryrun):
|
|
192
192
|
|
|
193
193
|
# generate the xnattag config file
|
|
194
194
|
generate_tagger_config(dicom_dir)
|
|
195
195
|
|
|
196
196
|
# update the xnat tags
|
|
197
|
-
|
|
197
|
+
if not dryrun:
|
|
198
|
+
update_xnat_tags(MRsession)
|
|
198
199
|
|
|
@@ -8,17 +8,19 @@ def main():
|
|
|
8
8
|
parser = argparse.ArgumentParser(description="XNAT QA Workflow")
|
|
9
9
|
parser.add_argument("--dicom_dir", default="/input", help = "where the DICOMs are located", required=True)
|
|
10
10
|
parser.add_argument("--experiment", default = "", required=True)
|
|
11
|
+
parser.add_argument("--dryrun", default = "", action='store_true', help="Run in dry run mode: No upload to XNAT")
|
|
11
12
|
|
|
12
13
|
args, unknown_args = parser.parse_known_args()
|
|
13
14
|
dicom_dir = os.path.join(args.dicom_dir, 'SCANS')
|
|
14
15
|
experiment = args.experiment
|
|
16
|
+
dryrun = args.dryrun
|
|
15
17
|
|
|
16
18
|
# run xnat authentication for this container. writes an ~/.xnat_auth file to the home directory
|
|
17
19
|
# this file is used in all subsequent calls to XNAT
|
|
18
20
|
os.system(f'xnat_auth --alias xnat --url $XNAT_HOST --username $XNAT_USER --password $XNAT_PASS')
|
|
19
21
|
|
|
20
22
|
# tag all scans in this session
|
|
21
|
-
tag_scans(dicom_dir, experiment)
|
|
23
|
+
tag_scans(dicom_dir, experiment, dryrun)
|
|
22
24
|
|
|
23
25
|
if __name__ == "__main__":
|
|
24
26
|
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|