-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
43 lines (32 loc) · 1.02 KB
/
test.js
File metadata and controls
43 lines (32 loc) · 1.02 KB
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
var StackFrontend = require('./lib/stack-frontend');
var stack = new StackFrontend('http://biocad.ncl.ac.uk/igem')
stack.countComponents(function(err, numComponents) {
console.log(numComponents + ' components');
});
stack.countSequences(function(err, numSequences) {
console.log(numSequences + ' sequences');
});
stack.countModules(function(err, numModules) {
console.log(numModules + ' modules');
});
stack.countModules(function(err, numCollections) {
console.log(numCollections + ' collections');
});
stack.searchComponentMetadata([
{
key: 'name',
value: '*R00*',
exactMatch: false
}
], function(err, results) {
console.log('Search component metadata returned ' + results.length + ' results');
});
stack.searchComponentSBOL([
{
key: 'name',
value: '*R00*',
exactMatch: false
}
], function(err, sbol) {
console.log('Search component SBOL returned a valid SBOL document with ' + sbol.componentDefinitions.length + ' component definitions');
});