parseargs¶
Argument parsing for the executable scripts in dms_tools2
.
-
dms_tools2.parseargs.
batch_bcsubampParser
()[source]¶ Returns argparse.ArgumentParser for
dms2_batch_bcsubamp
.
-
dms_tools2.parseargs.
batch_diffselParser
()[source]¶ Returns argparse.ArgumentParser for
dms2_batch_diffsel
.
-
dms_tools2.parseargs.
batch_fracsurviveParser
()[source]¶ Returns argparse.ArgumentParser for
dms2_batch_fracsurvive
-
dms_tools2.parseargs.
batch_prefsParser
()[source]¶ Returns argparse.ArgumentParser for
dms2_batch_prefs
.
-
dms_tools2.parseargs.
bcsubampParentParser
()[source]¶ Parent parser for
dms2_bcsubamp
/dms2_batch_bcsubamp
.
-
dms_tools2.parseargs.
checkName
(name, nametype)[source]¶ Check if name is an allowable name.
Allowed names can contain most characters but not LaTex special characters.
- Args:
- name (str)
Name to check
- nametype (str)
If we print an exception what do we call the parameter that failed? For instance, name or group.
- Returns:
Returns True if name is an allowable name. Otherwise raises a ValueError explaining why the name is invalid.
>>> checkName('sample-1', 'name') True
>>> checkName('sample 1', 'name') True
>>> checkName('PGT151 - 5 nM', 'name') True
>>> checkName('sample_1', 'name') Traceback (most recent call last): ... ValueError: name sample_1 contains following illegal characters: _
>>> checkName('sample_1', 'group') Traceback (most recent call last): ... ValueError: group sample_1 contains following illegal characters: _
-
dms_tools2.parseargs.
diffselParentParser
()[source]¶ Parent parser for
dms2_diffsel
/dms2_batch_diffsel
.
-
dms_tools2.parseargs.
fracsurviveParentParser
()[source]¶ Parent parser
dms2_fracsurvive
/dms2_batch_fracsurvive
-
dms_tools2.parseargs.
fracsurviveParser
()[source]¶ Returns argparse.ArgumentParser for
dms2_fracsurvive
.
-
dms_tools2.parseargs.
parentParser
()[source]¶ Returns parent parser with some common options added.
- Returns:
argparse.ArgumentParser with the following arguments already added:
--outdir
--ncpus
--use_existing
-v / --version