aboutsummaryrefslogtreecommitdiff
path: root/scripts/rqtl2/cli_parser.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-01-15 06:07:05 +0300
committerFrederick Muriuki Muriithi2024-01-15 06:07:05 +0300
commit8fe991c20f27702ee34ffcdd0cbc96e411db8c90 (patch)
tree509c0d1a00bf96bc3308802765e5ae63cfeb123c /scripts/rqtl2/cli_parser.py
parentf89c08c392182b669d058a4c21feffde64b15ebb (diff)
downloadgn-uploader-8fe991c20f27702ee34ffcdd0cbc96e411db8c90.tar.gz
Extract common structure into separate modules.
Diffstat (limited to 'scripts/rqtl2/cli_parser.py')
-rw-r--r--scripts/rqtl2/cli_parser.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/rqtl2/cli_parser.py b/scripts/rqtl2/cli_parser.py
new file mode 100644
index 0000000..bcc7a4f
--- /dev/null
+++ b/scripts/rqtl2/cli_parser.py
@@ -0,0 +1,13 @@
+"""Utilities for CLI parsers specific to R/qtl2 parsing scripts."""
+from pathlib import Path
+from argparse import ArgumentParser
+
+def add_common_arguments(parser: ArgumentParser) -> ArgumentParser:
+ """Add common arguments to the CLI parser."""
+ parser.add_argument("datasetid",
+ type=int,
+ help="The dataset to which the data belongs.")
+ parser.add_argument("rqtl2bundle",
+ type=Path,
+ help="Path to R/qtl2 bundle zip file.")
+ return parser