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

Function make_argument_parser

src/python/bin/vcf2paragraph.py:29–65  ·  view source on GitHub ↗

:return: one argument parser

()

Source from the content-addressed store, hash-verified

27
28
29def make_argument_parser():
30 """
31 :return: one argument parser
32 """
33
34 parser = argparse.ArgumentParser("vcf2paragraph.py")
35
36 parser.add_argument("input", help="Input VCF / BCF file", nargs=1)
37 parser.add_argument("output", help="Output JSON file", nargs=1)
38
39 parser.add_argument("-r", "--reference-sequence", type=str, dest="ref", required=True,
40 help="Reference FASTA for checking REF and resolving <DEL>")
41 parser.add_argument("-v", "--verbose", action="count", default=0,
42 help="More logging; May be given twice for even more logging.")
43 common = parser.add_argument_group("Common VCF graph options")
44 common.add_argument("-g", "--graph-type", choices=["alleles", "haplotypes"],
45 default="haplotypes", dest="graph_type",
46 help="Select the type of graph to generate.")
47 common.add_argument("-R", "--retrieve-reference-sequence", action="store_true",
48 dest="retrieve_reference_sequence", default=False,
49 help="Retrieve reference sequence for REF nodes")
50 common.add_argument("-l", "--max-ref-node-length", dest="max_ref_len", type=int, default=1000,
51 help="Maximum length of reference nodes before they get padded and truncated.")
52 common.add_argument("-p", "--read-length", dest="read_len", type=int, default=150,
53 help="Read length -- this can be used to add reference padding for disambiguation.")
54 common.add_argument("-T", "--target-region", dest="target_regions", default=[], action="append",
55 help="Target regions for read retrieval")
56 common.add_argument("--ins-info-key", dest="ins_info_key", default="SEQ",
57 type=str, help="Key for symbolic <INS> in INFO field")
58 common.add_argument("--alt-paths", dest="alt_paths", default=False, action="store_true",
59 help="Create all possible ALT paths in addition to reference paths.")
60 common.add_argument("--alt-splitting", dest="alt_splitting", default=False, action="store_true",
61 help="Also split long alternate alleles (e.g. long insertions)")
62 common.add_argument("--recursion-limit", dest="recursion_limit", default=None, type=int,
63 help="Set the recursion limit ( O(expected number of nodes of the graph) for large graphs"
64 " -- this is required for sorting )")
65 return parser
66
67
68def run(args):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected