Kegg:Reactions Scheme
The purpose of this workflow is to determine all the enzymes/genes that participate in a radius of 2 reaction steps around a given metabolite. Broadly, the scheme involves the following steps:
- determine all the reactions that the given metabolite participates in
- determine all the compounds that participate in these reactions
- filter certain compounds like H2O, ATP etc to avoid non-specific connections
- determine all the reactions that the compounds passing through step 3 participate in
- determine the enzymes that drive the reactions from step 4
- determine genes corresponding to the enzymes in step 5
- store the entrez gene ids as a text file
Preview
Run
Run this Workflow in the Taverna Workbench...
Option 1:
Copy and paste this link into File > 'Open workflow location...'
http://myexperiment.org/workflows/3107/download?version=1
[ More Info ]
Taverna is available from http://taverna.sourceforge.net/
If you are having problems downloading it in Taverna, you may need to provide your username and password in the URL so that Taverna can access the Workflow:
Replace http:// in the link above with http://yourusername:yourpassword@
Workflow Components
Harish Dharuri |
Kegg:Reactions Scheme |
The purpose of this workflow is to determine all the enzymes/genes that participate in a radius of 2 reaction steps around a given metabolite. Broadly, the scheme involves the following steps: 1. determine all the reactions that the given metabolite participates in 2. determine all the compounds that participate in these reactions 3. filter certain compounds like H2O, ATP etc to avoid non-specific connections 4. determine all the reactions that the compounds passing through step 3 participate in 5. determine the enzymes that drive the reactions from step 4 6. determine genes corresponding to the enzymes in step 5 7. store the entrez gene ids as a text file |
None
Name | Description |
---|---|
Compound_ID | The input for the workflow is a Kegg compound ID. |
path_to_output_file | This takes the input of the local directory where the user wants to store the output result of the workflow. |
Name | Type | Description |
---|---|---|
convert_to_entrez_id | beanshell |
The Kegg gene IDs begin with the organism code, for example, hsa:2746. The numerical part corresponds to the entrez gene id, the beanshell removes 'hsa:' to convert the Kegg gene id to entrez gene id. 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("hsa:","")); } result = tmp; |
Split_string_into_string_list_by_regular_expression_2 | localworker |
This service splits the string value into a string list at every occurrence of the specified regular expression. The regular expression provided in this case is a new line: "\n" 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]); } } |
regex_value_1 | stringconstant |
Value\n |
Flatten_List_2 | localworker |
This service flattens the inputlist by one level. It returns the result of the flattening. 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); |
get_reactions_by_compound_1 | wsdl |
Retrieve all reactions which have a link to a given compound_id Wsdlhttp://soap.genome.jp/KEGG.wsdlWsdl Operationget_reactions_by_compound |
Remove_String_Duplicates_2 | localworker |
This service consumes a list of strings and outputs the string list with duplicate entries removed. ScriptList strippedlist = new ArrayList(); for (Iterator i = stringlist.iterator(); i.hasNext();) { String item = (String) i.next(); if (strippedlist.contains(item) == false) { strippedlist.add(item); } } |
get_compounds_by_reaction | wsdl |
Retrieve all compounds which have a link to a given reaction_id Wsdlhttp://soap.genome.jp/KEGG.wsdlWsdl Operationget_compounds_by_reaction |
Flatten_List_6 | localworker |
This service flattens the inputlist by one level. It returns the result of the flattening. 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 |
This service consumes a list of strings and outputs the string list with duplicate entries removed. 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 |
Certain compounds like H2O, ATP, ADP etc are removed from consideration for the next step to prevent non-specific or too general connections. The bean shell contains all the compounds with their Kegg Ids, the names of all these compounds are provided in the supplementary section of the publication. 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("cpd:C00001") && !in1.get(i).toString().equals("cpd:C00002") && !in1.get(i).toString().equals("cpd:C00003") && !in1.get(i).toString().equals("cpd:C00004") && !in1.get(i).toString().equals("cpd:C00005") && !in1.get(i).toString().equals("cpd:C00006") && !in1.get(i).toString().equals("cpd:C00007") && !in1.get(i).toString().equals("cpd:C00008") && !in1.get(i).toString().equals("cpd:C00009") && !in1.get(i).toString().equals("cpd:C00010") && !in1.get(i).toString().equals("cpd:C00011") && !in1.get(i).toString().equals("cpd:C00012") && !in1.get(i).toString().equals("cpd:C00013") && !in1.get(i).toString().equals("cpd:C00014") && !in1.get(i).toString().equals("cpd:C00015") && !in1.get(i).toString().equals("cpd:C00016") && !in1.get(i).toString().equals("cpd:C00019") && !in1.get(i).toString().equals("cpd:C00020") && !in1.get(i).toString().equals("cpd:C00024") && !in1.get(i).toString().equals("cpd:C00027") && !in1.get(i).toString().equals("cpd:C00028") && !in1.get(i).toString().equals("cpd:C00030") && !in1.get(i).toString().equals("cpd:C00033") && !in1.get(i).toString().equals("cpd:C00035") && !in1.get(i).toString().equals("cpd:C00044") && !in1.get(i).toString().equals("cpd:C00046") && !in1.get(i).toString().equals("cpd:C00055") && !in1.get(i).toString().equals("cpd:C00063") && !in1.get(i).toString().equals("cpd:C00067") && !in1.get(i).toString().equals("cpd:C00075") && !in1.get(i).toString().equals("cpd:C00080") && !in1.get(i).toString().equals("cpd:C00084") && !in1.get(i).toString().equals("cpd:C00086") && !in1.get(i).toString().equals("cpd:C00091") && !in1.get(i).toString().equals("cpd:C00105") && !in1.get(i).toString().equals("cpd:C00106") && !in1.get(i).toString().equals("cpd:C00112") && !in1.get(i).toString().equals("cpd:C00113") && !in1.get(i).toString().equals("cpd:C00125") && !in1.get(i).toString().equals("cpd:C00126") && !in1.get(i).toString().equals("cpd:C00131") && !in1.get(i).toString().equals("cpd:C00144") && !in1.get(i).toString().equals("cpd:C00147") && !in1.get(i).toString().equals("cpd:C00151") && !in1.get(i).toString().equals("cpd:C00161") && !in1.get(i).toString().equals("cpd:C00162") && !in1.get(i).toString().equals("cpd:C00177") && !in1.get(i).toString().equals("cpd:C00212") && !in1.get(i).toString().equals("cpd:C00178") && !in1.get(i).toString().equals("cpd:C00206") && !in1.get(i).toString().equals("cpd:C00214") && !in1.get(i).toString().equals("cpd:C00239") && !in1.get(i).toString().equals("cpd:C00240") && !in1.get(i).toString().equals("cpd:C00227") && !in1.get(i).toString().equals("cpd:C00242") && !in1.get(i).toString().equals("cpd:C00286") && !in1.get(i).toString().equals("cpd:C00288") && !in1.get(i).toString().equals("cpd:C00299") && !in1.get(i).toString().equals("cpd:C00330") && !in1.get(i).toString().equals("cpd:C00360") && !in1.get(i).toString().equals("cpd:C00361") && !in1.get(i).toString().equals("cpd:C00362") && !in1.get(i).toString().equals("cpd:C00363") && !in1.get(i).toString().equals("cpd:C00364") && !in1.get(i).toString().equals("cpd:C00365") && !in1.get(i).toString().equals("cpd:C00380") && !in1.get(i).toString().equals("cpd:C00387") && !in1.get(i).toString().equals("cpd:C00458") && !in1.get(i).toString().equals("cpd:C00459") && !in1.get(i).toString().equals("cpd:C00460") && !in1.get(i).toString().equals("cpd:C00475") && !in1.get(i).toString().equals("cpd:C00512") && !in1.get(i).toString().equals("cpd:C00526") && !in1.get(i).toString().equals("cpd:C00533") && !in1.get(i).toString().equals("cpd:C00556") && !in1.get(i).toString().equals("cpd:C00559") && !in1.get(i).toString().equals("cpd:C00575") && !in1.get(i).toString().equals("cpd:C00698") && !in1.get(i).toString().equals("cpd:C00705") && !in1.get(i).toString().equals("cpd:C00725") && !in1.get(i).toString().equals("cpd:C00742") && !in1.get(i).toString().equals("cpd:C00821") && !in1.get(i).toString().equals("cpd:C00856") && !in1.get(i).toString().equals("cpd:C00881") && !in1.get(i).toString().equals("cpd:C00941") && !in1.get(i).toString().equals("cpd:C00942") && !in1.get(i).toString().equals("cpd:C00943") && !in1.get(i).toString().equals("cpd:C00968") && !in1.get(i).toString().equals("cpd:C01021") && !in1.get(i).toString().equals("cpd:C01346") && !in1.get(i).toString().equals("cpd:C01352") && !in1.get(i).toString().equals("cpd:C01642") && !in1.get(i).toString().equals("cpd:C01647") && !in1.get(i).toString().equals("cpd:C01764") && !in1.get(i).toString().equals("cpd:C01794") && !in1.get(i).toString().equals("cpd:C01977") && !in1.get(i).toString().equals("cpd:C02353") && !in1.get(i).toString().equals("cpd:C02354") && !in1.get(i).toString().equals("cpd:C02355") && !in1.get(i).toString().equals("cpd:C02412") && !in1.get(i).toString().equals("cpd:C02430") && !in1.get(i).toString().equals("cpd:C02507") && !in1.get(i).toString().equals("cpd:C03110") && !in1.get(i).toString().equals("cpd:C03391") && !in1.get(i).toString().equals("cpd:C03446") && !in1.get(i).toString().equals("cpd:C03395") && !in1.get(i).toString().equals("cpd:C04152") && !in1.get(i).toString().equals("cpd:C04153") && !in1.get(i).toString().equals("cpd:C04154") && !in1.get(i).toString().equals("cpd:C04156") && !in1.get(i).toString().equals("cpd:C04157") && !in1.get(i).toString().equals("cpd:C04158") && !in1.get(i).toString().equals("cpd:C04159") && !in1.get(i).toString().equals("cpd:C04160") && !in1.get(i).toString().equals("cpd:C04268") && !in1.get(i).toString().equals("cpd:C04545") && !in1.get(i).toString().equals("cpd:C04728") && !in1.get(i).toString().equals("cpd:C04779") && !in1.get(i).toString().equals("cpd:C05167") && !in1.get(i).toString().equals("cpd:C05198") && !in1.get(i).toString().equals("cpd:C05337") && !in1.get(i).toString().equals("cpd:C05338")&& !in1.get(i).toString().equals("cpd:C05777") && !in1.get(i).toString().equals("cpd:C05359") && !in1.get(i).toString().equals("cpd:C05924") && !in1.get(i).toString().equals("cpd:C06194") && !in1.get(i).toString().equals("cpd:C11378") && !in1.get(i).toString().equals("cpd:C15670") && !in1.get(i).toString().equals("cpd:C15672") && !in1.get(i).toString().equals("cpd:C15817") && !in1.get(i).toString().equals("cpd:C11478") && !in1.get(i).toString().equals("cpd:C17023") && !in1.get(i).toString().equals("cpd:C17322") && !in1.get(i).toString().equals("cpd:C17323") && !in1.get(i).toString().equals("cpd:C17324") && !in1.get(i).toString().equals("cpd:C19637")) { tmp.add(in1.get(i).toString()); } } result = tmp; |
get_reactions_by_compound_2 | wsdl |
Retrieve all reactions which have a link to a given compound_id Wsdlhttp://soap.genome.jp/KEGG.wsdlWsdl Operationget_reactions_by_compound |
Flatten_List_7 | localworker |
This service flattens the inputlist by one level. It returns the result of the flattening. 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); |
get_enzymes_by_reaction | wsdl |
Retrieve all enzymes which have a link to a given reaction_id Wsdlhttp://soap.genome.jp/KEGG.wsdlWsdl Operationget_enzymes_by_reaction |
Flatten_List_8 | localworker |
This service flattens the inputlist by one level. It returns the result of the flattening. 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); |
Flatten_List_9 | localworker |
This service flattens the inputlist by one level. It returns the result of the flattening. 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 |
This service consumes a list of strings and outputs the string list with duplicate entries removed. ScriptList strippedlist = new ArrayList(); for (Iterator i = stringlist.iterator(); i.hasNext();) { String item = (String) i.next(); if (strippedlist.contains(item) == false) { strippedlist.add(item); } } |
get_genes_by_enzyme | wsdl |
Retrieve all genes of a given organism and enzyme_id Wsdlhttp://soap.genome.jp/KEGG.wsdlWsdl Operationget_genes_by_enzyme |
org_value | stringconstant |
This is to provide the organism code for determining genes given an enzyme code. The organism in this case is homo sapiens and the code is hsa Valuehsa |
Flatten_List_10 | localworker |
This service flattens the inputlist by one level. It returns the result of the flattening. 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); |
Concatenate_Files_2 | localworker |
This service examines the files whose paths or URLs are specified in the filelist. The content of those files is concatenated. 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(); } |
Remove_String_Duplicates_3 | localworker |
This service consumes a list of strings and outputs the string list with duplicate entries removed. ScriptList strippedlist = new ArrayList(); for (Iterator i = stringlist.iterator(); i.hasNext();) { String item = (String) i.next(); if (strippedlist.contains(item) == false) { strippedlist.add(item); } } |
Create_and_populate_temporary_file_2 | beanshell |
This service creates a temporary file in a local tmp directory. ScriptFile f = File.createTempFile("taverna", ".tmp"); BufferedWriter writer = new BufferedWriter(new FileWriter(f)); writer.write(content); writer.close(); filepath = f.getCanonicalPath(); |
Remove_String_Duplicates_7 | localworker |
This service consumes a list of strings and outputs the string list with duplicate entries removed. ScriptList strippedlist = new ArrayList(); for (Iterator i = stringlist.iterator(); i.hasNext();) { String item = (String) i.next(); if (strippedlist.contains(item) == false) { strippedlist.add(item); } } |
Name | Description | Inputs | Outputs |
---|---|---|---|
convert_to_entrez_id | The Kegg gene IDs begin with the organism code, for example, hsa:2746. The numerical part corresponds to the entrez gene id, the beanshell removes 'hsa:' to convert the Kegg gene id to entrez gene id. | in1 | result |
FILTER_COMPOUNDS | Certain compounds like H2O, ATP, ADP etc are removed from consideration for the next step to prevent non-specific or too general connections. The bean shell contains all the compounds with their Kegg Ids, the names of all these compounds are provided in the supplementary section of the publication. | in1 | result |
Create_and_populate_temporary_file_2 | This service creates a temporary file in a local tmp directory. | content | filepath |
None
Source | Sink |
---|---|
Split_string_into_string_list_by_regular_expression_2:split | convert_to_entrez_id:in1 |
regex_value_1:value | Split_string_into_string_list_by_regular_expression_2:regex |
Flatten_List_10:outputlist | Split_string_into_string_list_by_regular_expression_2:string |
convert_to_entrez_id:result | Flatten_List_2:inputlist |
Compound_ID | get_reactions_by_compound_1:compound_id |
get_reactions_by_compound_1:return | Remove_String_Duplicates_2:stringlist |
Remove_String_Duplicates_2:strippedlist | get_compounds_by_reaction:reaction_id |
get_compounds_by_reaction:return | Flatten_List_6:inputlist |
Flatten_List_6:outputlist | Remove_String_Duplicates:stringlist |
Remove_String_Duplicates:strippedlist | FILTER_COMPOUNDS:in1 |
FILTER_COMPOUNDS:result | get_reactions_by_compound_2:compound_id |
get_reactions_by_compound_2:return | Flatten_List_7:inputlist |
Remove_String_Duplicates_3:strippedlist | get_enzymes_by_reaction:reaction_id |
get_enzymes_by_reaction:return | Flatten_List_8:inputlist |
Flatten_List_8:outputlist | Flatten_List_9:inputlist |
Flatten_List_9:outputlist | Remove_String_Duplicates_4:stringlist |
Remove_String_Duplicates_4:strippedlist | get_genes_by_enzyme:enzyme_id |
org_value:value | get_genes_by_enzyme:org |
get_genes_by_enzyme:return | Flatten_List_10:inputlist |
Create_and_populate_temporary_file_2:filepath | Concatenate_Files_2:filelist |
path_to_output_file | Concatenate_Files_2:outputfile |
Flatten_List_7:outputlist | Remove_String_Duplicates_3:stringlist |
Remove_String_Duplicates_7:strippedlist | Create_and_populate_temporary_file_2:content |
Flatten_List_2:outputlist | Remove_String_Duplicates_7:stringlist |
None
Workflow Type
Version 1 (earliest) (of 2)
Shared with Groups (1)
Log in to add to one of your Packs
Statistics
In chronological order:
-
Created by Harish Dharuri on Monday 20 August 2012 22:09:15 (UTC)
-
Created by Harish Dharuri on Tuesday 27 August 2013 08:06:54 (UTC)
Reviews (0)
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