-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path_mash
executable file
·181 lines (171 loc) · 5.17 KB
/
_mash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#compdef mash
_mash-bounds() {
integer ret=1
local -a args
args+=(
"1: :"
"(- *)-h[print help]"
"(-h)-k[k-mer size (1-32, default: 21)]:int:"
"(-h)-p[limit error bounds of distance estimates]:probability:"
)
_arguments $args[@] && ret=0
return ret
}
_mash-dist() {
integer ret=1
local -a args
args+=(
"1: :"
"(- *)-h[Help]"
"(-h)-p[Parallelism. This many threads will be spawned for processing]:int:"
"(-h)-l[List input]"
"(-h)-t[Table output]"
"(-h)-v[Maximum p-value to report]:num:"
"(-h)-d[Maximum distance to report]:num:"
"(-h)-k[K-mer size (1-32, default: 21)]:int:"
"(-h)-s[Sketch size]:int:"
"(-h -r)-i[Sketch individual sequences rather than whole files]"
"(-h)-S[Seed to provide to the hash function]:int:"
"(-h)-w[Probability threshold for warning about low k-mer size]:num:"
"(-h -i)-r[Input is a read set]"
"(-h -r)-b[Use a Bloom filter of this size to filter out unique k-mers]:size:"
"(-h -r)-m[Minimum copies of each k-mer required to pass noise filter for reads]:int:"
"(-h -r)-c[Target coverage]:num:"
"(-h -r)-g[Genome size]:size:"
"(-h)-n[Preserve strand]"
"(-h -n -k)-a[Use amino acid alphabet]"
"(-h -n)-z[Alphabet to base hashes on]:string:"
"(-h)-Z[Preserve case in k-mers and alphabet]"
'*:file:_files'
)
_arguments $args[@] && ret=0
return ret
}
_mash-info() {
integer ret=1
local -a args
args+=(
"1: :"
"(- *)-h[Help]"
"(-)-H[Only show header info]"
"(-)-t[Tabular output (rather than padded), with no header]"
"(-)-c[Show hash count histograms for each sketch]"
"(-)-d[Dump sketches in JSON format]"
'*:file:_files'
)
_arguments $args[@] && ret=0
return ret
}
_mash-paste() {
integer ret=1
local -a args
args+=(
"1: :"
"(- *)-h[Help]"
"(-)-l[Input files are lists of file names]"
'*:file:_files'
)
_arguments $args[@] && ret=0
return ret
}
_mash-screen() {
integer ret=1
local -a args
args+=(
"1: :"
"(- *)-h[Help]"
"(-h)-p[Parallelism. This many threads will be spawned for processing]:int:"
"(-h)-w[Winner-takes-all strategy for identity estimates]"
"(-h)-i[Minimum identity to report]:num:"
"(-h)-v[Maximum p-value to report]:num:"
'*:file:_files'
)
_arguments $args[@] && ret=0
return ret
}
_mash-sketch() {
integer ret=1
local -a args
args+=(
"1: :"
"(-h)-p[Parallelism. This many threads will be spawned for processing]:int:"
"(-h)-l[List input]"
"(-h)-o[Output prefix]:string:"
"(-h)-I[ID field for sketch of reads]:path:_files"
"(-h)-C[Comment for a sketch of reads]:path:_files"
"(-h)-k[K-mer size (1-32, default: 21)]:int:"
"(-h)-s[Sketch size]:int:"
"(-h -r)-i[Sketch individual sequences rather than whole files]"
"(-h)-S[Seed to provide to the hash function]:int:"
"(-h)-w[Probability threshold for warning about low k-mer size]:num:"
"(-h -i)-r[Input is a read set]"
"(-h -r)-b[Use a Bloom filter of this size to filter out unique k-mers]:size:"
"(-h -r)-m[Minimum copies of each k-mer required to pass noise filter for reads]:int:"
"(-h -r)-c[Target coverage]:num:"
"(-h -r)-g[Genome size]:size:"
"(-h)-n[Preserve strand]"
"(-h -n -k)-a[Use amino acid alphabet]"
"(-h -n)-z[Alphabet to base hashes on]:string:"
"(-h)-Z[Preserve case in k-mers and alphabet]"
'*:file:_files'
)
_arguments $args[@] && ret=0
return ret
}
_mash-triangle() {
integer ret=1
local -a args
args+=(
'1: :'
"(-h)-p[Parallelism. This many threads will be spawned for processing]:int:"
"(-h)-l[List input]"
"(-h)-C[Use comment fields for sequence names instead of IDs]"
"(-h)-k[K-mer size (1-32, default: 21)]:int:"
"(-h)-s[Sketch size]:int:"
"(-h -r)-i[Sketch individual sequences rather than whole files]"
"(-h)-S[Seed to provide to the hash function]:int:"
"(-h)-w[Probability threshold for warning about low k-mer size]:num:"
"(-h -i)-r[Input is a read set]"
"(-h -r)-b[Use a Bloom filter of this size to filter out unique k-mers]:size:"
"(-h -r)-m[Minimum copies of each k-mer required to pass noise filter for reads]:int:"
"(-h -r)-c[Target coverage]:num:"
"(-h -r)-g[Genome size]:size:"
"(-h)-n[Preserve strand]"
"(-h -n -k)-a[Use amino acid alphabet]"
"(-h -n)-z[Alphabet to base hashes on]:string:"
"(-h)-Z[Preserve case in k-mers and alphabet]"
'*:file:_files'
)
_arguments $args[@] && ret=0
return ret
}
_mash() {
local ret=1
local -a args
if ((CURRENT == 2)); then
# complete args and commands
args+=(
'(- *)--license[print license and copyright information]'
# '(- *)--help[print help]'
)
_arguments -w -s -S $args[@]
_describe 'mash command' '(
bounds\:Print\ a\ table\ of\ Mash\ error\ bounds
dist\:Estimate\ the\ distance\ of\ query\ sequences\ to\ references
info\:Display\ information\ about\ sketch\ files
paste\:Create\ a\ single\ sketch\ file\ from\ multiple\ sketch\ files
screen\:Determine\ whether\ query\ sequences\ are\ within\ a\ larger\ pool\ of\ sequences
sketch\:Create\ sketches\ \(reduced\ representations\ for\ fast\ operations\)
triangle\:Estimate\ a\ lower-triangular\ distance\ matrix
)'
ret=0
else
# delegate to sub commands
local subcmd=_mash-$words[2]
if ! _call_function ret $subcmd ; then
_message "unknown sub-command: $words[2]"
fi
fi
return ret
}
_mash