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 and extract reactions. Xpath Expression/ptools-xml/Compound/*/Reaction/@frameid |
XML_Error_Check |
beanshell |
Checks for known xml 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); |
Query_for_compounds_of_reaction |
beanshell |
Build the query to return compounds that participate in a given reaction. Scriptout1="[x:y:=human~" + "\"" + in1 + "\"" + ",x<-(compounds-of-reaction y)]"
|
REST_Service_Compounds_I |
rest |
REST Service: Functions to access the BioCyc database and extract the compounds for the given reactions and return an xml document. |
XML_Error_Check_2 |
beanshell |
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;
|
XPath_Service_2 |
xpath |
Xpath Expression/ptools-xml/Compound/common-name |
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);
}
}
|
Filter_compounds |
beanshell |
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("5'-deoxyadenosine") && !in1.get(i).toString().equals("a 2,3,4-saturated fatty acyl CoA") && !in1.get(i).toString().equals("a carboxylate") && !in1.get(i).toString().equals("a reduced electron acceptor") && !in1.get(i).toString().equals("a standard α amino acid") && !in1.get(i).toString().equals("a sugar") && !in1.get(i).toString().equals("acetyl-CoA") && !in1.get(i).toString().equals("an acyl-CoA") && !in1.get(i).toString().equals("an oligopeptide") && !in1.get(i).toString().equals("ammonia") && !in1.get(i).toString().equals("ADP") && !in1.get(i).toString().equals("ADP-ribose") && !in1.get(i).toString().equals("AMP") && !in1.get(i).toString().equals("ATP") && !in1.get(i).toString().equals("an aldehyde") && !in1.get(i).toString().equals("an oxidized electron acceptor") && !in1.get(i).toString().equals("bicarbonate")
&& !in1.get(i).toString().equals("CMP") && !in1.get(i).toString().equals("CO2") && !in1.get(i).toString().equals("coenzyme A") && !in1.get(i).toString().equals("CTP") && !in1.get(i).toString().equals("diphosphate") && !in1.get(i).toString().equals("GDP") && !in1.get(i).toString().equals("GMP") && !in1.get(i).toString().equals("H2O") && !in1.get(i).toString().equals("H+") && !in1.get(i).toString().equals("hydrogen peroxide")
&& !in1.get(i).toString().equals("Na+") && !in1.get(i).toString().equals("NAD+") && !in1.get(i).toString().equals("NADP+") && !in1.get(i).toString().equals("NAD(P)+") && !in1.get(i).toString().equals("NADH") && !in1.get(i).toString().equals("NADPH") && !in1.get(i).toString().equals("NAD(P)H") && !in1.get(i).toString().equals("nicotinate adenine dinucleotide") && !in1.get(i).toString().equals("nicotinate adenine mononucleotide") && !in1.get(i).toString().equals("nitric oxide") && !in1.get(i).toString().equals("oxygen") && !in1.get(i).toString().equals("phosphate") && !in1.get(i).toString().equals("S2-") && !in1.get(i).toString().equals("sulfate") && !in1.get(i).toString().equals("UDP") && !in1.get(i).toString().equals("UTP"))
{
tmp.add(in1.get(i).toString());
}
}
result = tmp; |
Query_for_reactions_of_compound |
beanshell |
Scriptout1="[x:x<-human^^compounds,x^name=" + "\"" +in1+ "\""+"]"
|
REST_Service_Reactions_II |
rest |
REST Service: Functions to access the BioCyc database and extract the reactions for the given compounds and return an xml document. |
XML_Error_Check_3 |
beanshell |
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;
|
XPath_Service_3 |
xpath |
Xpath Expression/ptools-xml/Compound/*/Reaction/@frameid |
Flatten_List_3 |
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_Genes |
rest |
REST Service: Functions to access the BioCyc database and extract the genes/enzymes that catalyze the set of input reactions and return an xml document. |
XML_Error_Check_5 |
beanshell |
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;
|
XPath_Service_5 |
xpath |
Xpath Expression/ptools-xml/Gene/common-name |
hgnc |
biomart |
Biomart service to convert HGNC symbols to entrez ids. |
Create_and_populate_temporary_file_2 |
beanshell |
ScriptFile f = File.createTempFile("taverna", ".tmp");
BufferedWriter writer = new BufferedWriter(new FileWriter(f));
writer.write(content);
writer.close();
filepath = f.getCanonicalPath(); |
Concatenate_Files_2 |
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_reaction_to_genes |
beanshell |
Scriptout1="[x:y:=human~"+"\""+ in1 + "\"" + ",x<-(reaction-to-genes y)]"
|
Remove_String_Duplicates_3 |
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_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); |
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