-
Notifications
You must be signed in to change notification settings - Fork 2
/
KBaseDataObjectToFileUtils.spec
234 lines (202 loc) · 7.16 KB
/
KBaseDataObjectToFileUtils.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
/*
** A KBase module: KBaseDataObjectToFileUtils
**
** This module contains methods for converting KBase Data Objects to common bioinformatics file formats
**
*/
module KBaseDataObjectToFileUtils {
/*
** The workspace object refs are of form:
**
** objects = ws.get_objects([{'ref': params['workspace_id']+'/'+params['obj_name']}])
**
** "ref" means the entire name combining the workspace id and the object name
** "id" is a numerical identifier of the workspace or object, and should just be used for workspace
** "name" is a string identifier of a workspace or object. This is received from Narrative.
*/
typedef string workspace_name;
typedef string sequence;
typedef string data_obj_name;
typedef string data_obj_ref;
typedef string feature_id;
typedef string genome_id;
typedef string path_type;
typedef string pattern_type;
typedef string log_msg;
typedef string true_false;
typedef int bool;
/* TranslateNucToProtSeq() Params
*/
typedef structure {
string nuc_seq;
string genetic_code;
bool write_off_code_prot_seq;
} TranslateNucToProtSeq_Params;
/* TranslateNucToProtSeq() Output
*/
typedef structure {
string prot_seq;
} TranslateNucToProtSeq_Output;
/* ParseFastaStr() Params
*/
typedef structure {
string fasta_str;
string residue_type;
string case;
log_msg console;
log_msg invalid_msgs;
} ParseFastaStr_Params;
/* ParseFastaStr() Output
*/
typedef structure {
string id;
string desc;
string seq;
} ParseFastaStr_Output;
/* GenomeToFASTA() Params
*/
typedef structure {
data_obj_ref genome_ref;
path_type file;
path_type dir;
list<log_msg> console;
list<log_msg> invalid_msgs;
string residue_type;
string feature_type;
pattern_type record_id_pattern;
pattern_type record_desc_pattern;
string case;
int linewrap;
int id_len_limit;
bool write_off_code_prot_seq;
} GenomeToFASTA_Params;
/* GenomeToFASTA() Output
*/
typedef structure {
path_type fasta_file_path;
list<feature_id> feature_ids;
mapping<feature_id,string> feature_id_to_function;
mapping<string,string> short_id_to_rec_id;
mapping<data_obj_ref,string> genome_ref_to_sci_name;
mapping<data_obj_ref,string> genome_ref_to_obj_name;
} GenomeToFASTA_Output;
/* GenomeSetToFASTA() Params
*/
typedef structure {
data_obj_ref genomeSet_ref;
path_type file;
path_type dir;
list<log_msg> console;
list<log_msg> invalid_msgs;
string residue_type;
string feature_type;
pattern_type record_id_pattern;
pattern_type record_desc_pattern;
string case;
int linewrap;
int id_len_limit;
bool write_off_code_prot_seq;
true_false merge_fasta_files;
} GenomeSetToFASTA_Params;
/* GenomeSetToFASTA() Output
*/
typedef structure {
list<path_type> fasta_file_path_list;
mapping<genome_id, list<feature_id>> feature_ids_by_genome_id;
mapping<feature_id,string> feature_id_to_function;
mapping<string,string> short_id_to_rec_id;
mapping<data_obj_ref,string> genome_ref_to_sci_name;
mapping<data_obj_ref,string> genome_ref_to_obj_name;
} GenomeSetToFASTA_Output;
/* SpeciesTreeToFASTA() Params
*/
typedef structure {
data_obj_ref tree_ref;
path_type file;
path_type dir;
list<log_msg> console;
list<log_msg> invalid_msgs;
string residue_type;
string feature_type;
pattern_type record_id_pattern;
pattern_type record_desc_pattern;
string case;
int linewrap;
int id_len_limit;
bool write_off_code_prot_seq;
true_false merge_fasta_files;
} SpeciesTreeToFASTA_Params;
/* SpeciesTreeToFASTA() Output
*/
typedef structure {
list<path_type> fasta_file_path_list;
mapping<genome_id, list<feature_id>> feature_ids_by_genome_id;
mapping<feature_id,string> feature_id_to_function;
mapping<string,string> short_id_to_rec_id;
mapping<data_obj_ref,string> genome_ref_to_sci_name;
mapping<data_obj_ref,string> genome_ref_to_obj_name;
} SpeciesTreeToFASTA_Output;
/* FeatureSetToFASTA() Params
*/
typedef structure {
data_obj_ref featureSet_ref;
path_type file;
path_type dir;
list<log_msg> console;
list<log_msg> invalid_msgs;
string residue_type;
string feature_type;
pattern_type record_id_pattern;
pattern_type record_desc_pattern;
string case;
int linewrap;
int id_len_limit;
bool write_off_code_prot_seq;
} FeatureSetToFASTA_Params;
/* FeatureSetToFASTA() Output
*/
typedef structure {
path_type fasta_file_path;
mapping<data_obj_ref, list<feature_id>> feature_ids_by_genome_ref;
mapping<feature_id,string> feature_id_to_function;
mapping<string,string> short_id_to_rec_id;
mapping<data_obj_ref,string> genome_ref_to_sci_name;
mapping<data_obj_ref,string> genome_ref_to_obj_name;
} FeatureSetToFASTA_Output;
/* AnnotatedMetagenomeAssemblyToFASTA() Params
*/
typedef structure {
data_obj_ref ama_ref;
path_type file;
path_type dir;
list<log_msg> console;
list<log_msg> invalid_msgs;
string residue_type;
string feature_type;
pattern_type record_id_pattern;
pattern_type record_desc_pattern;
string case;
int linewrap;
int id_len_limit;
bool write_off_code_prot_seq;
} AnnotatedMetagenomeAssemblyToFASTA_Params;
/* AnnotatedMetagenomeAssemblyToFASTA() Output
*/
typedef structure {
path_type fasta_file_path;
list<feature_id> feature_ids;
mapping<feature_id,string> feature_id_to_function;
mapping<string,string> short_id_to_rec_id;
mapping<data_obj_ref,string> ama_ref_to_obj_name;
} AnnotatedMetagenomeAssemblyToFASTA_Output;
/* Methods for converting KBase Data Objects to common bioinformatics format files
**
*/
funcdef TranslateNucToProtSeq (TranslateNucToProtSeq_Params params) returns (TranslateNucToProtSeq_Output) authentication required;
funcdef ParseFastaStr (ParseFastaStr_Params params) returns (ParseFastaStr_Output) authentication required;
funcdef GenomeToFASTA (GenomeToFASTA_Params params) returns (GenomeToFASTA_Output) authentication required;
funcdef GenomeSetToFASTA (GenomeSetToFASTA_Params params) returns (GenomeSetToFASTA_Output) authentication required;
funcdef SpeciesTreeToFASTA (SpeciesTreeToFASTA_Params params) returns (SpeciesTreeToFASTA_Output) authentication required;
funcdef FeatureSetToFASTA (FeatureSetToFASTA_Params params) returns (FeatureSetToFASTA_Output) authentication required;
funcdef AnnotatedMetagenomeAssemblyToFASTA (AnnotatedMetagenomeAssemblyToFASTA_Params params) returns (AnnotatedMetagenomeAssemblyToFASTA_Output) authentication required;
};