23
23
# Defaults for mappability output
24
24
DEFAULT_KMER_SIZE = 24
25
25
26
+ INDEX_SUBCOMMAND = "index"
27
+ UNIQUE_LENGTHS_SUBCOMMAND = "search"
28
+ GENERATE_MAPPABILITY_SUBCOMMAND = "track"
29
+
26
30
27
31
def parse_subcommands ():
28
32
parser = ArgumentParser (
@@ -35,16 +39,16 @@ def parse_subcommands():
35
39
version = f"%(prog)s { __version__ } " )
36
40
37
41
subparsers = parser .add_subparsers (
38
- title = "Newmap subcommands" ,
39
- description = "Valid subcommands " ,
40
- help = "see --help on each command for additional information " ,
42
+ title = "To generate mappability data, the following subcommands must "
43
+ "be run in order " ,
44
+ metavar = " " ,
41
45
required = True )
42
46
43
47
# Create a subparser for the "generate-index" command
44
48
generate_index_parser = subparsers .add_parser (
45
- "generate-index" ,
46
- description = "Generate a FM index from a fasta "
47
- "file " )
49
+ INDEX_SUBCOMMAND ,
50
+ help = "Create an FM index from a "
51
+ "sequence to generate mappability data for. " )
48
52
generate_index_parser .set_defaults (func = generate_index .main )
49
53
50
54
# TODO: Consider changing to -i and -o for input and output
@@ -81,11 +85,10 @@ def parse_subcommands():
81
85
82
86
# Create a subparser for the "unique-lengths" command
83
87
unique_length_parser = subparsers .add_parser (
84
- "unique-lengths" ,
85
- description = "Creates a binary file with the "
86
- "shortest unique k-mer length at each "
87
- "sequence position from the range of "
88
- "k-mer lengths given" )
88
+ UNIQUE_LENGTHS_SUBCOMMAND ,
89
+ help = "Finds the shortest unique sequence length "
90
+ "at each position in the input fasta file. "
91
+ "Saves the results to a binary array." )
89
92
90
93
unique_length_parser .set_defaults (func = unique_counts .main )
91
94
@@ -130,7 +133,7 @@ def parse_subcommands():
130
133
default = DEFAULT_KMER_BATCH_SIZE ,
131
134
type = int ,
132
135
help = "Maximum number of kmers to batch per reference sequence from "
133
- "given fasta file. "
136
+ "input fasta file. "
134
137
"Use to control memory usage. "
135
138
"Default is {}" .format (DEFAULT_KMER_BATCH_SIZE ))
136
139
@@ -148,9 +151,9 @@ def parse_subcommands():
148
151
149
152
# Create a subparser for the "generate-mappability" command
150
153
generate_mappability_parser = subparsers .add_parser (
151
- "generate-mappability" ,
152
- description = "Converts unique kmer length files to mappability "
153
- "file output " )
154
+ GENERATE_MAPPABILITY_SUBCOMMAND ,
155
+ help = "Converts a binary array of unique sequence length files to "
156
+ "mappability file output(s) for a given length " )
154
157
155
158
generate_mappability_parser .set_defaults (
156
159
func = unique_counts_conversion .main )
0 commit comments