Name |
Type |
Description |
REST_Service_Reactions_I |
rest |
REST service: The function of this component is to access the BioCyc database with the user input compound and return the details of the compound in the form of an xml document |
XPath_Service |
xpath |
Parse the XML document to extract reactions that the compound participates in. Xpath Expression/ptools-xml/Compound/*/Reaction/@frameid |
XML_Error_Check |
beanshell |
Parse the xml document for possible errors Scriptimport java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.List;
import java.util.ArrayList;
List tmp = new ArrayList();
for(int i=0; i < in1.size(); i++) {
tmp.add(in1.get(i).toString().replace("#<","#"));
}
result = tmp;
|
Flatten_List |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
REST_Service_Pathways |
rest |
REST Service: Functions to access the BioCyc database and extract the pathways for the given reactions and return an xml document. |
XML_Error_Check_2 |
beanshell |
Check for know errors in the xml document. Scriptimport java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.List;
import java.util.ArrayList;
List tmp = new ArrayList();
for(int i=0; i < in1.size(); i++) {
tmp.add(in1.get(i).toString().replace("#<","#"));
}
result = tmp;
|
Flatten_List_2 |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
Remove_String_Duplicates |
localworker |
ScriptList strippedlist = new ArrayList();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
if (strippedlist.contains(item) == false) {
strippedlist.add(item);
}
}
|
REST_Service_Genes |
rest |
REST Service: Functions to access the BioCyc database and extracts the genes for the given set of pathways and returns an xml document. |
XML_Error_Check_3 |
beanshell |
Check for known errors in the xml document. Scriptimport java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.List;
import java.util.ArrayList;
List tmp = new ArrayList();
for(int i=0; i < in1.size(); i++) {
tmp.add(in1.get(i).toString().replace("#<","#"));
}
result = tmp;
|
hgnc |
biomart |
Biomart service to convert HGNC symbols to entrez ids. |
Flatten_List_6 |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
Remove_String_Duplicates_4 |
localworker |
ScriptList strippedlist = new ArrayList();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
if (strippedlist.contains(item) == false) {
strippedlist.add(item);
}
}
|
Flatten_List_7 |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
Create_and_populate_temporary_file_Genes |
beanshell |
ScriptFile f = File.createTempFile("taverna", ".tmp");
BufferedWriter writer = new BufferedWriter(new FileWriter(f));
writer.write(content);
writer.close();
filepath = f.getCanonicalPath(); |
Concatenate_Files_Genes |
localworker |
ScriptBufferedReader getReader (String fileUrl) throws IOException {
InputStreamReader reader;
try {
reader = new FileReader(fileUrl);
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
reader = new InputStreamReader (url.openStream());
}
return new BufferedReader(reader);
}
String NEWLINE = System.getProperty("line.separator");
boolean displayResults = false;
if (displayresults != void) {
displayResults = Boolean.valueOf(displayresults).booleanValue();
}
StringBuffer sb = new StringBuffer(2000);
if (outputfile == void) {
throw new RuntimeException("The 'outputfile' parameter cannot be null");
}
if (filelist == null) {
throw new RuntimeException("The 'filelist' parameter cannot be null");
}
String str = null;
Writer writer = new FileWriter(outputfile);
for (int i = 0; i < filelist.size(); i++) {
BufferedReader reader = getReader(filelist.get(i));
while ((str = reader.readLine()) != null) {
writer.write(str);
writer.write(NEWLINE);
if (displayResults) {
sb.append(str);
sb.append(NEWLINE);
}
}
reader.close();
}
writer.flush();
writer.close();
if (displayResults) {
results= sb.toString();
}
|
Query_for_pathways_of_reaction |
beanshell |
Build a query to extract the pathways that the reactions participate in. Scriptout1="[x:y:=human~" + "\"" + in1 + "\"" + ",x<-(pathways-of-reaction y)]"
|
XPath_Service_2 |
xpath |
Parse the xml file Xpath Expression/ptools-xml/Pathway/@frameid |
XPath_Service_3 |
xpath |
Parse the xml document and extract the list of genes. Xpath Expression/ptools-xml/Gene/common-name |
Filter_pathways |
beanshell |
Remove certain pathways like "tRNA charging pathway" from consideration. Scriptimport java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.List;
import java.util.ArrayList;
List tmp = new ArrayList();
for(int i=0; i < in1.size(); i++) {
if(!in1.get(i).toString().equals("TRNA-CHARGING-PWY"))
{
tmp.add(in1.get(i).toString());
}
}
result = tmp;
|
Query_for_genes_of_pathway |
beanshell |
Build a query to extract genes in the given pathway. Scriptout1="[x:y:=human~" + "\"" + in1 + "\"" + ",x<-(genes-of-pathway y)]"
|
query_for_REST_service |
beanshell |
This builds the query with the input compound for the REST interface. Scriptout1="[x:x<-human^^compounds,x^name=" + "\"" + in1 + "\"]" |
Comments (0)
No comments yet
Log in to make a comment