xnatqa 0.0.10__tar.gz → 0.0.12__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.10/xnatqa.egg-info → xnatqa-0.0.12}/PKG-INFO +1 -1
- {xnatqa-0.0.10 → xnatqa-0.0.12}/pyproject.toml +1 -1
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa/tag/__init__.py +3 -1
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa/xnatqa.py +0 -4
- {xnatqa-0.0.10 → xnatqa-0.0.12/xnatqa.egg-info}/PKG-INFO +1 -1
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa.egg-info/SOURCES.txt +0 -1
- xnatqa-0.0.10/xnatqa/launch/__init__.py +0 -36
- {xnatqa-0.0.10 → xnatqa-0.0.12}/LICENSE +0 -0
- {xnatqa-0.0.10 → xnatqa-0.0.12}/README.md +0 -0
- {xnatqa-0.0.10 → xnatqa-0.0.12}/setup.cfg +0 -0
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa/__init__.py +0 -0
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa.egg-info/dependency_links.txt +0 -0
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa.egg-info/entry_points.txt +0 -0
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa.egg-info/requires.txt +0 -0
- {xnatqa-0.0.10 → xnatqa-0.0.12}/xnatqa.egg-info/top_level.txt +0 -0
|
@@ -22,7 +22,7 @@ def generate_tagger_config(dicom_dir):
|
|
|
22
22
|
os.system(f"dcm2niix -s y -a y -b o -o $PWD -f 'output_%s_%d' -w 0 -m 1 -i y {dicom_dir} &>>log.txt")
|
|
23
23
|
|
|
24
24
|
# idenfity all of these text files
|
|
25
|
-
jsonFiles = glob('./output*.json')
|
|
25
|
+
jsonFiles = glob(os.path.abspath('./output*.json'))
|
|
26
26
|
|
|
27
27
|
# sort the found files so that they are in decensing order by series_number
|
|
28
28
|
# this is probably unnecssary
|
|
@@ -180,6 +180,8 @@ def generate_tagger_config(dicom_dir):
|
|
|
180
180
|
with open('tagger.yaml', 'a') as file:
|
|
181
181
|
yaml.dump(tagger_data, file)
|
|
182
182
|
|
|
183
|
+
print(tagger_data)
|
|
184
|
+
|
|
183
185
|
def update_xnat_tags(MRsession):
|
|
184
186
|
|
|
185
187
|
# make sure an xnat authentication files has already been created. See YXAIL documentation.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import argparse
|
|
3
3
|
from xnatqa.tag import tag_scans
|
|
4
|
-
from xnatqa.launch import launch
|
|
5
4
|
|
|
6
5
|
def main():
|
|
7
6
|
|
|
@@ -21,8 +20,5 @@ def main():
|
|
|
21
20
|
# tag all scans in this session
|
|
22
21
|
tag_scans(dicom_dir, experiment)
|
|
23
22
|
|
|
24
|
-
# launch all QA jobs for this session
|
|
25
|
-
launch(experiment)
|
|
26
|
-
|
|
27
23
|
if __name__ == "__main__":
|
|
28
24
|
main()
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import yaxil
|
|
3
|
-
|
|
4
|
-
def launch(MRsession):
|
|
5
|
-
# So, at this point, everything has been labeled for this session.
|
|
6
|
-
# We now need to:
|
|
7
|
-
|
|
8
|
-
# Identify all of the tagged scans in this sessions
|
|
9
|
-
# For each tagged scan, launch the appropriate QA routine
|
|
10
|
-
|
|
11
|
-
# authenticate with xnat using the ~/.xnat_auth file created earlier in the workflow
|
|
12
|
-
auth = yaxil.auth(alias = 'xnat')
|
|
13
|
-
|
|
14
|
-
# open and automatically close a connection to XNAT using the auth
|
|
15
|
-
with yaxil.session(auth) as sess:
|
|
16
|
-
# keep track of the number of BOLD (b) and ANAT (a) scans idenfified
|
|
17
|
-
b = 0
|
|
18
|
-
a = 0
|
|
19
|
-
|
|
20
|
-
# for each scan in this session...
|
|
21
|
-
for scan in sess.scans(label=MRsession):
|
|
22
|
-
|
|
23
|
-
# this scan's note
|
|
24
|
-
note = scan['note']
|
|
25
|
-
|
|
26
|
-
# if that note has a "#BOLD" tag...
|
|
27
|
-
if '#BOLD' in note:
|
|
28
|
-
print('Run BOLDQC')
|
|
29
|
-
os.system(f'qsub -P drkrcs boldqc.qsub {MRsession} {b}')
|
|
30
|
-
b+=1
|
|
31
|
-
|
|
32
|
-
# if that note has a "#T1w" tag...
|
|
33
|
-
if '#T1w' in note:
|
|
34
|
-
print('Run ANATQC')
|
|
35
|
-
os.system(f'qsub -P drkrcs anatqc.qsub {MRsession} {a}')
|
|
36
|
-
a+=1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|