Triplify GO database external reference [myexperiment:go_xref_namespace2rdf]
Created: 2009-12-01 06:28:26
Last updated: 2009-12-01 06:29:35
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Triplify GO database external reference [myexperiment:go_xref_namespace2rdf] |
Descriptions (6)
Get GO external database list from http://www.geneontology.org/doc/GO.xrf_abbs
TAG: banff_manifesto, go, xref, bio2rdf, rdf
|
test values:
bmuri = http://bio2rdf.org/geneid:15275 |
Get Gene Ontology external database list from http://www.geneontology.org/doc/GO.xrf_abbs
TAG: banff_manifesto, go, xref, bio2rdf, rdf
|
|
http://www.geneontology.org/doc/GO.xrf_abbs |
test values:
bmuri = http://bio2rdf.orf/geneid:15275 |
Dependencies (0)
Processors (8)
Name |
Type |
Description |
go_dbxref_url |
stringconstant |
Valuehttp://www.geneontology.org/doc/GO.xrf_abbs |
abbrev |
stringconstant |
Valueabbrev |
go_build_ntriples |
beanshell |
Scriptimport java.util.regex.*;
String line, id, desc, url, urlPattern, category;
line = "";
namespace = "";
Pattern thePat = Pattern.compile("(?m)^iation: (.*)$");
Matcher matcher = thePat.matcher(in);
if (matcher.find()) {
id = matcher.group(1);
id = id.toLowerCase();
namespace = id;
line = line + "\n .";
line = line + "\n .";
line = line + "\n \"bm:ns:"+id+"\" .";
line = line + "\n \""+id+"\" .";
}
thePat = Pattern.compile("(?m)^database: (.*)$");
matcher = thePat.matcher(in);
if (matcher.find()) {
desc = matcher.group(1);
line = line + "\n \""+desc+" [bm:ns:"+id+"]\" .";
line = line + "\n \""+desc+"\" .";
}
thePat = Pattern.compile("(?m)^generic_url: (.*)$");
matcher = thePat.matcher(in);
if (matcher.find()) {
url = matcher.group(1);
line = line + "\n \""+url+"\" .";
}
thePat = Pattern.compile("(?m)^url_syntax: (.*)$");
matcher = thePat.matcher(in);
if (matcher.find()) {
urlPattern = matcher.group(1);
line = line + "\n \""+urlPattern+"\" .";
}
ntriples = line; |
Merge_String_List_to_a_String |
localworker |
ScriptString seperatorString = "\n";
if (seperator != void) {
seperatorString = seperator;
}
StringBuffer sb = new StringBuffer();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
sb.append(item);
if (i.hasNext()) {
sb.append(seperatorString);
}
}
concatenated = sb.toString();
|
Split_string_into_string_list_by_regular_expression |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
Get_Web_Page_from_URL |
localworker |
ScriptURL inputURL = null;
if (base != void) {
inputURL = new URL(new URL(base), url);
}
else {
inputURL = new URL(url);
}
URLConnection con = inputURL.openConnection();
InputStream in = con.getInputStream();
InputStreamReader isr = new InputStreamReader(in);
Reader inReader = new BufferedReader(isr);
StringBuffer buf = new StringBuffer();
int ch;
while ((ch = inReader.read()) > -1) {
buf.append((char)ch);
}
inReader.close();
contents = buf.toString();
//String NEWLINE = System.getProperty("line.separator");
//
//URL inputURL = null;
//if (base != void) {
// inputURL = new URL(new URL(base), url);
//} else {
// inputURL = new URL(url);
//}
//StringBuffer result = new StringBuffer();
//BufferedReader reader = new BufferedReader(new InputStreamReader(inputURL.openStream()));
//String line = null;
//while ((line = reader.readLine()) != null) {
// result.append(line);
// result.append(NEWLINE);
//}
//
//contents = result.toString();
|
GO_ntriples |
beanshell |
ScriptString id = "go";
String title = "Gene Ontology";
ntriples = "\n .";
ntriples = ntriples + "\n \"bm:ns:"+id+"\" .";
ntriples = ntriples + "\n \"" + title + " [bm:ns:"+id+"]\" .";
ntriples = ntriples + "\n \"" + title + "\" .";
ntriples = ntriples + "\n \""+id+"\" .";
ntriples = ntriples + "\n";
|
Concatenate_two_strings |
localworker |
Scriptoutput = string1 + string2; |
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
go_build_ntriples |
|
in
|
ntriples
namespace
|
GO_ntriples |
|
|
ntriples
|
Outputs (3)
Name |
Description |
go_xref_namespace_ntriples |
|
url |
|
namespace_list |
|
Datalinks (10)
Source |
Sink |
Split_string_into_string_list_by_regular_expression:split |
go_build_ntriples:in |
go_build_ntriples:ntriples |
Merge_String_List_to_a_String:stringlist |
abbrev:value |
Split_string_into_string_list_by_regular_expression:regex |
Get_Web_Page_from_URL:contents |
Split_string_into_string_list_by_regular_expression:string |
go_dbxref_url:value |
Get_Web_Page_from_URL:url |
GO_ntriples:ntriples |
Concatenate_two_strings:string1 |
Merge_String_List_to_a_String:concatenated |
Concatenate_two_strings:string2 |
Concatenate_two_strings:output |
go_xref_namespace_ntriples |
go_dbxref_url:value |
url |
go_build_ntriples:namespace |
namespace_list |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment