-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSBMLTools.spec
66 lines (57 loc) · 2.39 KB
/
SBMLTools.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
/*
A KBase module: SBMLTools
This sample module contains one small method - filter_contigs.
*/
module SBMLTools {
/*
A 'typedef' allows you to provide a more specific name for
a type. Built-in primitive types include 'string', 'int',
'float'. Here we define a type named assembly_ref to indicate
a string that should be set to a KBase ID reference to an
Assembly data object.
*/
typedef string assembly_ref;
/*
A 'typedef' can also be used to define compound or container
objects, like lists, maps, and structures. The standard KBase
convention is to use structures, as shown here, to define the
input and output of your function. Here the input is a
reference to the Assembly data object, a workspace to save
output, and a length threshold for filtering.
To define lists and maps, use a syntax similar to C++ templates
to indicate the type contained in the list or map. For example:
list <string> list_of_strings;
mapping <string, int> map_of_ints;
*/
typedef structure {
assembly_ref assembly_input_ref;
string workspace_name;
int min_length;
} FilterContigsParams;
/*
Here is the definition of the output of the function. The output
can be used by other SDK modules which call your code, or the output
visualizations in the Narrative. 'report_name' and 'report_ref' are
special output fields- if defined, the Narrative can automatically
render your Report.
*/
typedef structure {
string report_name;
string report_ref;
assembly_ref assembly_output;
int n_initial_contigs;
int n_contigs_removed;
int n_contigs_remaining;
} FilterContigsResults;
/*
The actual function is declared using 'funcdef' to specify the name
and input/return arguments to the function. For all typical KBase
Apps that run in the Narrative, your function should have the
'authentication required' modifier.
*/
funcdef filter_contigs_changed(FilterContigsParams params)
returns (FilterContigsResults output) authentication required;
funcdef do_nothing() returns ();
funcdef do_nothing_but_auth() returns () authentication required;
funcdef import_sbml_model() returns () authentication required;
};