MCPcopy Create free account
hub / github.com/Illumina/paragraph / make_argument_parser

Function make_argument_parser

src/python/bin/multiparagraph.py:130–182  ·  view source on GitHub ↗

:return: an argument parser

()

Source from the content-addressed store, hash-verified

128
129
130def make_argument_parser():
131 """
132 :return: an argument parser
133 """
134 parser = argparse.ArgumentParser("Multiparagraph")
135
136 parser.add_argument("input", nargs="+")
137
138 parser.add_argument("-b", "--bam", help="BAM file name",
139 type=str, dest="bam", required=True)
140
141 parser.add_argument("-o", "--output", help="Output file name",
142 type=str, dest="output", required=True)
143
144 parser.add_argument("-r", "--reference-sequence", help="Reference FASTA",
145 type=str, dest="ref", required=True)
146
147 parser.add_argument("-E", "--extended-output", help="Run paragraph with -E 1",
148 dest="extended_output", action="store_true", default=False)
149
150 parser.add_argument("--max-events", dest="max_events", type=int, default=None,
151 help="Only do the first n events.")
152
153 parser.add_argument("--min-length", dest="min_length", type=int, default=0,
154 help="Minimum event length.")
155
156 parser.add_argument("--event-threads", "-t", dest="threads", type=int, default=multiprocessing.cpu_count(),
157 help="Number of events to process in parallel.")
158
159 parser.add_argument("--paragraph-threads", "-T", dest="paragraph_threads", type=int, default=1,
160 help="Number of threads for parallel read processing.")
161
162 parser.add_argument("--keep-scratch", dest="keep_scratch", default=None, action="store_true",
163 help="Do not delete temp files.")
164
165 parser.add_argument("--scratch-dir", dest="scratch_dir", default=None,
166 help="Directory for temp files")
167
168 parser.add_argument("--paragraph", dest="paragraph", default=os.path.join(findgrm.GRM_BASE, "bin", "paragraph"),
169 help="Path to the paragraph executable")
170
171 parser.add_argument("--logfile", dest="logfile", default=None,
172 help="Write logging information into file rather than to stderr")
173
174 verbosity_options = parser.add_mutually_exclusive_group(required=False)
175
176 verbosity_options.add_argument("--verbose", dest="verbose", default=False, action="store_true",
177 help="Raise logging level from warning to info.")
178
179 verbosity_options.add_argument("--quiet", dest="quiet", default=False, action="store_true",
180 help="Set logging level to output errors only.")
181
182 return parser
183
184
185def run(args):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected