Skip to content

Commit 26b790a

Browse files
authored
Merge pull request #159 from dartmouth-pbs/enh-locator
Allow to override locator path from the cmdline
2 parents 8fefd5c + 4327ad7 commit 26b790a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

heudiconv/cli/run.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ def get_parser():
150150
help='output directory for conversion setup (for '
151151
'further customization and future reference. This '
152152
'directory will refer to non-anonymized subject IDs')
153+
parser.add_argument('-l', '--locator', default=None,
154+
help='study path under outdir. If provided, '
155+
'it overloads the value provided by the heuristic. '
156+
'If --datalad is enabled, every directory within '
157+
'locator becomes a super-dataset thus establishing a '
158+
'hierarchy. Setting to "unknown" will skip that dataset')
153159
parser.add_argument('-a', '--conv-outdir', default=None,
154160
help='output directory for converted files. By default '
155161
'this is identical to --outdir. This option is most '
@@ -248,6 +254,8 @@ def process_args(args):
248254
# Allow for session to be overloaded from command line
249255
if args.session is not None:
250256
session = args.session
257+
if args.locator is not None:
258+
locator = args.locator
251259
if not len(files_or_seqinfo):
252260
raise ValueError("nothing to process?")
253261
# that is how life is ATM :-/ since we don't do sorting if subj

0 commit comments

Comments
 (0)