|
7 | 7 | # ----------------------------------------------------------------------------
|
8 | 8 |
|
9 | 9 | from qiime2.plugin import (Plugin, Citations, Bool, Int, Range, Choices, Str,
|
10 |
| - Float, List) |
| 10 | + Float, List, Threads) |
11 | 11 | from q2_types.feature_table import (FeatureTable, Frequency, RelativeFrequency,
|
12 | 12 | PresenceAbsence)
|
13 | 13 | from q2_types.tree import Phylogeny, Rooted
|
|
56 | 56 | inputs={'table': FeatureTable[Frequency | RelativeFrequency
|
57 | 57 | | PresenceAbsence],
|
58 | 58 | 'phylogeny': Phylogeny[Rooted]},
|
59 |
| - parameters={'threads': Int % Range(1, None) | Str % Choices(['auto'])}, |
| 59 | + parameters={'threads': Threads}, |
60 | 60 | outputs=[('vector', SampleData[AlphaDiversity])],
|
61 | 61 | input_descriptions={
|
62 | 62 | 'table': "The feature table containing the samples for which Faith's "
|
|
146 | 146 | plugin.methods.register_function(
|
147 | 147 | function=beta.bray_curtis,
|
148 | 148 | inputs={'table': FeatureTable[Frequency | RelativeFrequency]},
|
149 |
| - parameters={'n_jobs': Int % Range(1, None) | Str % Choices(['auto'])}, |
| 149 | + parameters={'n_jobs': Threads}, |
150 | 150 | outputs=[('distance_matrix', DistanceMatrix)],
|
151 | 151 | input_descriptions={
|
152 | 152 | 'table': "The feature table containing the samples for which "
|
|
174 | 174 | function=beta.jaccard,
|
175 | 175 | inputs={'table': FeatureTable[Frequency | RelativeFrequency
|
176 | 176 | | PresenceAbsence]},
|
177 |
| - parameters={'n_jobs': Int % Range(1, None) | Str % Choices(['auto'])}, |
| 177 | + parameters={'n_jobs': Threads}, |
178 | 178 | outputs=[('distance_matrix', DistanceMatrix)],
|
179 | 179 | input_descriptions={
|
180 | 180 | 'table': "The feature table containing the samples for which "
|
|
202 | 202 | inputs={'table': FeatureTable[Frequency | RelativeFrequency
|
203 | 203 | | PresenceAbsence],
|
204 | 204 | 'phylogeny': Phylogeny[Rooted]},
|
205 |
| - parameters={'threads': Int % Range(1, None) | Str % Choices(['auto']), |
| 205 | + parameters={'threads': Threads, |
206 | 206 | 'bypass_tips': Bool},
|
207 | 207 | outputs=[('distance_matrix', DistanceMatrix)],
|
208 | 208 | input_descriptions={
|
|
246 | 246 | function=beta.weighted_unifrac,
|
247 | 247 | inputs={'table': FeatureTable[Frequency | RelativeFrequency],
|
248 | 248 | 'phylogeny': Phylogeny[Rooted]},
|
249 |
| - parameters={'threads': Int % Range(1, None) | Str % Choices(['auto']), |
| 249 | + parameters={'threads': Threads, |
250 | 250 | 'bypass_tips': Bool},
|
251 | 251 | outputs=[('distance_matrix', DistanceMatrix)],
|
252 | 252 | input_descriptions={
|
|
310 | 310 | function=beta.beta_passthrough,
|
311 | 311 | inputs={'table': FeatureTable[Frequency]},
|
312 | 312 | parameters={'metric': Str % Choices(beta.METRICS['NONPHYLO']['UNIMPL']),
|
313 |
| - 'pseudocount': Int % Range(1, None), |
314 |
| - 'n_jobs': Int % Range(1, None) | Str % Choices(['auto'])}, |
| 313 | + 'pseudocount': Int % Range(1, None), 'n_jobs': Threads}, |
315 | 314 | outputs=[('distance_matrix', DistanceMatrix)],
|
316 | 315 | input_descriptions={
|
317 | 316 | 'table': 'The feature table containing the samples over which beta '
|
|
347 | 346 | inputs={'table': FeatureTable[Frequency],
|
348 | 347 | 'phylogeny': Phylogeny[Rooted]},
|
349 | 348 | parameters={'metric': Str % Choices(beta.METRICS['PHYLO']['UNIMPL']),
|
350 |
| - 'threads': Int % Range(1, None) | Str % Choices(['auto']), |
| 349 | + 'threads': Threads, |
351 | 350 | 'variance_adjusted': Bool,
|
352 | 351 | 'alpha': Float % Range(0, 1, inclusive_end=True),
|
353 | 352 | 'bypass_tips': Bool},
|
|
412 | 411 | ]
|
413 | 412 | )
|
414 | 413 |
|
415 |
| - |
416 | 414 | plugin.methods.register_function(
|
417 | 415 | function=beta.beta_phylogenetic_meta_passthrough,
|
418 | 416 | inputs={'tables': List[FeatureTable[Frequency]],
|
419 | 417 | 'phylogenies': List[Phylogeny[Rooted]]},
|
420 | 418 | parameters={'metric': Str % Choices(beta.METRICS['PHYLO']['UNIMPL']),
|
421 |
| - 'threads': Int % Range(1, None) | Str % Choices(['auto']), |
| 419 | + 'threads': Threads, |
422 | 420 | 'variance_adjusted': Bool,
|
423 | 421 | 'alpha': Float % Range(0, 1, inclusive_end=True),
|
424 | 422 | 'bypass_tips': Bool,
|
|
0 commit comments