PDB2KEGG step 1done during BH2010
Created: 2010-02-13 09:37:39
No description has been set
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Francois.Belleau@yahoo.ca
mitsuteru.nakao@gmail.com |
Titles (1)
PDB2KEGG step 1done during BH2010 |
Descriptions (0)
Dependencies (0)
Processors (15)
Name |
Type |
Description |
String_constant |
stringconstant |
Valuehttp://192.168.11.61:8892/sparql?default-graph-uri=&should-sponge=&query=select+%3Fpdb%0D%0Awhere+%7B%0D%0A+++%3Fpdb+%3Chttp%3A%2F%2Ftogordf.dbcls.jp%2Fkegg%3Agene%3E+%3Fkegg+.+%0D%0A%7D%0D%0Alimit+10&format=text%2Fhtml&debug=on&timeout= |
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();
|
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]);
}
}
|
String_constant_2 |
stringconstant |
Value\n |
Filter_list_of_strings_extracting_match_to_a_regex |
localworker |
Scriptimport java.util.regex.*;
filteredlist = new ArrayList();
Pattern thePat = Pattern.compile(regex);
int theGroup = Integer.parseInt(group);
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
Matcher matcher = thePat.matcher(item);
if (matcher.find()) {
filteredlist.add(matcher.group(theGroup));
}
}
|
String_constant_3 |
stringconstant |
Value1 |
String_constant_4 |
stringconstant |
Value.* | http(.*) |
Beanshell |
beanshell |
Script//out0 = "http" + in0.toLowerCase();
out0 = "http" + in0; |
String_constant_6 |
stringconstant |
Valuehttp://192.168.11.61:8892/sparql |
Beanshell_2 |
beanshell |
Scriptimport com.hp.hpl.jena.rdf.model.*;
Model model = ModelFactory.createDefaultModel();
//CONSTRUCT {?s ?p ?o . } WHERE {?s ?p ?o . FILTER (?s = )}
model.read(sparql_endpoint + "?default-graph-uri=&query=CONSTRUCT+{%3Fs+%3Fp+%3Fo+.+}+WHERE+{%3Fs+%3Fp+%3Fo+.+FILTER+(%3Fs+%3D+%3C" + bmuri + "%3E)}&format=application%2Frdf%2Bxml&debug=on&timeout=");
StringWriter writer = new StringWriter ( ) ;
model.write( writer, "N-TRIPLE");
ntriples = writer.toString ( ) ; |
dataflow0 |
workflow |
|
String_constant_5 |
stringconstant |
Valuehttp://pdb2kegg |
String_constant_7 |
stringconstant |
Valuehttp://192.168.11.61:8893/sparql |
dataflow0_2 |
workflow |
|
Beanshell_3 |
beanshell |
Scriptntriples = "<"+uri+"> .";
ntriples = ntriples + "\n<"+uri+"> \"type_structure\" .";
ntriples = ntriples + "\n<"+uri+"> <"+uri.replace("http://pdbj.org/","http://bio2rdf.org/pdb:")+"> .";
|
Beanshells (6)
Name |
Description |
Inputs |
Outputs |
Beanshell |
|
in0
|
out0
|
Beanshell_2 |
|
bmuri
sparql_endpoint
|
ntriples
|
Beanshell_3 |
|
uri
|
ntriples
|
Concat_log_message |
|
msg
graph
sparql_url
subject
|
log
|
Split_sparql_url |
|
sparql_url
|
host
port
|
First_subject |
|
ntriples
|
subject
|
Outputs (7)
Name |
Description |
o1 |
|
o2 |
|
o3 |
|
o4 |
|
o5 |
|
o6 |
|
o7 |
|
Datalinks (23)
Source |
Sink |
String_constant:value |
Get_Web_Page_from_URL:url |
Get_Web_Page_from_URL:contents |
Split_string_into_string_list_by_regular_expression:string |
String_constant_2:value |
Split_string_into_string_list_by_regular_expression:regex |
Split_string_into_string_list_by_regular_expression:split |
Filter_list_of_strings_extracting_match_to_a_regex:stringlist |
String_constant_4:value |
Filter_list_of_strings_extracting_match_to_a_regex:regex |
String_constant_3:value |
Filter_list_of_strings_extracting_match_to_a_regex:group |
Filter_list_of_strings_extracting_match_to_a_regex:filteredlist |
Beanshell:in0 |
Beanshell:out0 |
Beanshell_2:bmuri |
String_constant_6:value |
Beanshell_2:sparql_endpoint |
Beanshell_2:ntriples |
dataflow0:ntriples |
String_constant_5:value |
dataflow0:graph |
String_constant_7:value |
dataflow0:sparql_endpoint_url |
String_constant_5:value |
dataflow0_2:graph |
String_constant_7:value |
dataflow0_2:sparql_endpoint_url |
Beanshell_3:ntriples |
dataflow0_2:ntriples |
Beanshell:out0 |
Beanshell_3:uri |
Get_Web_Page_from_URL:contents |
o1 |
Split_string_into_string_list_by_regular_expression:split |
o2 |
Filter_list_of_strings_extracting_match_to_a_regex:filteredlist |
o3 |
Beanshell:out0 |
o4 |
Beanshell_2:ntriples |
o5 |
dataflow0:sparql_insert_ntriples_log |
o6 |
dataflow0_2:sparql_insert_ntriples_log |
o7 |
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