|
8 | 8 |
|
9 | 9 | import importlib
|
10 | 10 |
|
11 |
| -from qiime2.plugin import Citations, List, Metadata, Plugin, Str |
| 11 | +from qiime2.plugin import Citations, Int, List, Metadata, Plugin, Str |
12 | 12 | from q2_types.feature_table import FeatureTable, Frequency
|
13 | 13 |
|
14 | 14 | from q2_qsip2 import __version__
|
15 |
| -from q2_qsip2.workflow import standard_workflow, create_qsip_data |
16 | 15 | from q2_qsip2.types import QSIP2Data, Unfiltered, Filtered, EAF
|
| 16 | +from q2_qsip2.workflow import ( |
| 17 | + standard_workflow, create_qsip_data, subset_and_filter |
| 18 | +) |
17 | 19 | from q2_qsip2.visualizers._visualizers import (
|
18 | 20 | plot_weighted_average_densities, plot_sample_curves, plot_density_outliers,
|
19 | 21 | show_comparison_groups
|
|
78 | 80 | outputs=[
|
79 | 81 | ('qsip_data', QSIP2Data[Unfiltered])
|
80 | 82 | ],
|
81 |
| - input_descriptions={}, |
| 83 | + input_descriptions={ |
| 84 | + 'table': 'The qSIP feature table.' |
| 85 | + }, |
82 | 86 | parameter_descriptions={
|
83 | 87 | 'sample_metadata': 'The sample-level metadata.',
|
84 | 88 | 'source_metadata': 'The source-level metadata.',
|
|
98 | 102 | )
|
99 | 103 | )
|
100 | 104 |
|
| 105 | +plugin.methods.register_function( |
| 106 | + function=subset_and_filter, |
| 107 | + inputs={ |
| 108 | + 'qsip_data': QSIP2Data[Unfiltered] |
| 109 | + }, |
| 110 | + parameters={ |
| 111 | + 'unlabeled_sources': List[Str], |
| 112 | + 'labeled_sources': List[Str], |
| 113 | + 'min_unlabeled_sources': Int, |
| 114 | + 'min_labeled_sources': Int, |
| 115 | + 'min_unlabeled_fractions': Int, |
| 116 | + 'min_labeled_fractions': Int |
| 117 | + }, |
| 118 | + outputs=[ |
| 119 | + ('filtered_qsip_data', QSIP2Data[Filtered]) |
| 120 | + ], |
| 121 | + input_descriptions={ |
| 122 | + 'qsip_data': 'Your unfiltered qSIP2 data.' |
| 123 | + }, |
| 124 | + parameter_descriptions={ |
| 125 | + 'unlabeled_sources': 'The IDs of the unlabeled sources to retain.', |
| 126 | + 'labeled_sources': 'The IDs of the labeled sources to retain.', |
| 127 | + 'min_unlabeled_sources': ( |
| 128 | + 'The minimum number of unlabeled sources a feature must be ' |
| 129 | + 'present in to be retained.' |
| 130 | + ), |
| 131 | + 'min_labeled_sources': ( |
| 132 | + 'The minimum number of labeled sources a feature must be present ' |
| 133 | + 'in to be retained.' |
| 134 | + ), |
| 135 | + 'min_unlabeled_fractions': ( |
| 136 | + 'The minimum number of fractions a feature must be present in ' |
| 137 | + 'to be considered present in an unlabeled source.' |
| 138 | + ), |
| 139 | + 'min_labeled_fractions': ( |
| 140 | + 'The minimum number of fractions a feature must be present in ' |
| 141 | + 'to be considered present in a labeled source.' |
| 142 | + ) |
| 143 | + }, |
| 144 | + output_descriptions={ |
| 145 | + 'filtered_qsip_data': 'Your subsetted and filtered qSIP2 data.' |
| 146 | + }, |
| 147 | + name='Subset sources and filter features to prepare for comparison.', |
| 148 | + description=( |
| 149 | + 'Placeholder.' |
| 150 | + ) |
| 151 | +) |
| 152 | + |
101 | 153 | plugin.visualizers.register_function(
|
102 | 154 | function=plot_weighted_average_densities,
|
103 | 155 | inputs={
|
|
0 commit comments