-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsample_uploader.spec
261 lines (205 loc) · 7.28 KB
/
sample_uploader.spec
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
/*
A KBase module: sample_uploader
*/
module sample_uploader {
typedef string sample_id;
typedef structure {
string sample_set_ref;
string sample_file;
string workspace_name;
int workspace_id;
string file_format;
string description;
string set_name;
int header_row_index;
string name_field;
string output_format;
string taxonomy_source;
int num_otus;
int incl_seq;
string otu_prefix;
int share_within_workspace;
int prevalidate;
int incl_input_in_output;
int ignore_warnings;
int keep_existing_samples;
int propagate_links;
} ImportSampleInputs;
typedef structure {
sample_id id;
string name;
} sample_info;
typedef structure {
list<sample_info> samples;
string description;
} SampleSet;
typedef structure {
string report_name;
string report_ref;
SampleSet sample_set;
string sample_set_ref;
} ImportSampleOutputs;
funcdef import_samples(ImportSampleInputs params) returns (ImportSampleOutputs output) authentication required;
typedef structure {
string sample_set_ref;
list<string> external_ids;
string workspace_name;
int workspace_id;
string description;
string set_name;
string output_format;
string taxonomy_source;
int num_otus;
int incl_seq;
string otu_prefix;
int share_within_workspace;
int prevalidate;
int incl_input_in_output;
} ImportExternalSampleInputs;
funcdef import_samples_from_IGSN(ImportExternalSampleInputs params) returns (ImportSampleOutputs output) authentication required;
funcdef import_samples_from_NCBI(ImportExternalSampleInputs params) returns (ImportSampleOutputs output) authentication required;
/*
Generate a customized OTU worksheet using a SampleSet
input to generate the appropriate columns.
*/
typedef structure {
string workspace_name;
int workspace_id;
string sample_set_ref;
string output_name;
string output_format;
int num_otus;
string taxonomy_source;
int incl_seq;
string otu_prefix;
} GenerateOTUSheetParams;
typedef structure {
string report_name;
string report_ref;
} GenerateOTUSheetOutputs;
funcdef generate_OTU_sheet(GenerateOTUSheetParams params) returns (GenerateOTUSheetOutputs output) authentication required;
typedef structure {
string workspace_name;
int workspace_id;
string sample_set_ref;
list<string> new_users;
int is_reader;
int is_writer;
int is_admin;
int is_none;
int share_within_workspace;
} update_sample_set_acls_params;
typedef structure {
string status;
} update_sample_set_acls_output;
funcdef update_sample_set_acls(update_sample_set_acls_params params) returns (update_sample_set_acls_output output) authentication required;
/*
export function for samples
*/
typedef structure {
string input_ref;
string file_format;
} ExportParams;
typedef structure {
string shock_id;
} ExportOutput;
funcdef export_samples(ExportParams params) returns (ExportOutput output) authentication required;
/*
Create links between samples and other workspace objects.
currently support:
KBaseFile.PairedEndLibrary/SingleEndLibrary,
KBaseAssembly.PairedEndLibrary/SingleEndLibrary,
KBaseGenomes.Genome,
KBaseMetagenomes.AnnotatedMetagenomeAssembly,
KBaseMetagenomes.BinnedContigs
KBaseGenomeAnnotations.Assembly,
KBaseSearch.GenomeSet,
KBaseSets.AssemblySet,
KBaseSets.GenomeSet
*/
typedef structure {
string sample_name;
string obj_ref;
} ObjsLink;
typedef structure {
string workspace_name;
string workspace_id;
string sample_set_ref;
list<ObjsLink> links;
} LinkObjsParams;
/*
input_staging_file_path: tsv or csv file with sample_name and object_name headers
*/
typedef structure {
string workspace_name;
string workspace_id;
string sample_set_ref;
string input_staging_file_path;
} BatchLinkObjsParams;
typedef structure {
string report_name;
string report_ref;
list<UnspecifiedObject> links;
} LinkObjsOutput;
funcdef link_samples(LinkObjsParams params) returns (LinkObjsOutput output) authentication required;
funcdef batch_link_samples(BatchLinkObjsParams params) returns (LinkObjsOutput output) authentication required;
/*
Filter SampleSets
*/
typedef structure {
string metadata_field; /* full metadata field name (e.g. "enigma:foo") */
string comparison_operator; /* "==", "!=", "in", "not in", ">", "<", ">=", "<=" */
string value; /* string, number string for numeric comparisons, comma seperated for (not)in */
string logical_operator; /* "and", "or" */
} FilterCondition;
typedef structure {
string workspace_name;
string workspace_id;
string out_sample_set_name;
list<string> sample_set_ref;
list<FilterCondition> filter_conditions;
} FilterSampleSetsParams;
typedef structure {
string report_name;
string report_ref;
SampleSet sample_set;
} FilterSampleSetsOutput;
funcdef filter_samplesets(FilterSampleSetsParams params) returns (FilterSampleSetsOutput output) authentication required;
/*
Get list of metadata keys/columns from a given list of samplesets. Used to populate filter_sampleset dynamic
dropdown with valid options from a given list of samples.
*/
typedef structure {
list<string> sample_set_refs;
} GetSamplesetMetaParams;
funcdef get_sampleset_meta(GetSamplesetMetaParams params) returns (list<string> results) authentication required;
typedef structure {
string output_object_name;
string object_type;
string description;
} CreateDataSetFromLinksItem;
typedef structure {
list<string> sample_set_refs;
string collision_resolution; /* how to resolve conflicting linked versions, currently "newest" only supported */
int ws_id;
list<CreateDataSetFromLinksItem> set_items;
} CreateDataSetFromLinksParams;
typedef tuple<int objid, string name, string type,
string save_date, int version, string saved_by,
int ws_id, string workspace, string chsum, int size, mapping<string, string> meta>
ObjectInfo;
funcdef create_data_set_from_links(CreateDataSetFromLinksParams params) returns (list<ObjectInfo> results) authentication required;
typedef structure {
string workspace_name;
string workspace_id;
list<string> obj_refs;
} ExpireDataLinkParams;
typedef structure {
string report_name;
string report_ref;
} ExpireDataLinkOutput;
/*
Expire data links for a list of given workspace objects.
*/
funcdef expire_data_link(ExpireDataLinkParams params) returns (ExpireDataLinkOutput output) authentication required;
};