Skip to content

Commit

Permalink
make default artifacts directory, --run must be an int
Browse files Browse the repository at this point in the history
  • Loading branch information
tokeefe committed Dec 7, 2021
1 parent eb96f56 commit 9cc9dab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion anatqc/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = 'anatqc'
__description__ = 'Anatomical QC'
__url__ = 'https://github.com/harvard-nrg/anatqc'
__version__ = '0.4.4'
__version__ = '0.4.5'
__author__ = 'Neuroinformatics Research Group'
__author_email__ = '[email protected]'
7 changes: 7 additions & 0 deletions anatqc/cli/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ def do(args):
if not os.path.exists(archive):
logger.info('creating anat-morph archive %s', archive)
anatqc.archive(morph_outdir, archive)

# artifacts directory
if not args.artifacts_dir:
args.artifacts_dir = os.path.join(
morph_outdir,
'xnat-artifacts'
)

# build data to upload to xnat
R = Report(args.bids_dir, args.sub, args.ses, args.run)
Expand Down
8 changes: 4 additions & 4 deletions scripts/anatQC.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main():
help='BIDS session')
parser_process.add_argument('--mod', default='T1w',
help='BIDS modality')
parser_process.add_argument('--run', default='1',
parser_process.add_argument('--run', default=1, type=int,
help='BIDS run')
parser_process.add_argument('--bids-dir', required=True,
help='BIDS root directory')
Expand All @@ -60,7 +60,7 @@ def main():
help='XNAT username')
parser_process.add_argument('--xnat-pass',
help='XNAT password')
parser_process.add_argument('--artifacts-dir', default='/artifacts',
parser_process.add_argument('--artifacts-dir',
help='Location for generated assessors and resources')
parser_process.add_argument('--xnat-upload', action='store_true',
help='Upload results to XNAT over REST API')
Expand All @@ -73,7 +73,7 @@ def main():
help='XNAT Project name')
parser_tandem.add_argument('--bids-dir', required=True,
help='Output BIDS directory')
parser_tandem.add_argument('--run', default='1',
parser_tandem.add_argument('--run', default=1, type=int,
help='BIDS run')
parser_tandem.add_argument('--partition', default='default',
help='Job scheduler partition')
Expand All @@ -97,7 +97,7 @@ def main():
help='XNAT username')
parser_tandem.add_argument('--xnat-pass',
help='XNAT password')
parser_tandem.add_argument('--artifacts-dir', default='/artifacts',
parser_tandem.add_argument('--artifacts-dir',
help='Location for generated assessors and resources')
parser_tandem.add_argument('--xnat-upload', action='store_true',
help='Upload results to XNAT over REST API')
Expand Down

0 comments on commit 9cc9dab

Please sign in to comment.