Render gene via BioGPS
Created: 2012-02-10 20:06:56
Last updated: 2012-02-15 21:12:35
This workflow uses the REST API of BioGPS to
list the plugins and then allow the user to select which
plugin to use to display the input gene id
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Descriptions (1)
This workflow uses the REST API of BioGPS to
list the plugins and then allow the user to select which
plugin to use to display the input gene id |
Dependencies (0)
Inputs (1)
Name |
Description |
gene_id |
The gene id. The required format of the id depends upon the plugin chosen.
|
Processors (10)
Name |
Type |
Description |
list_biogps_plugins |
rest |
|
extract_plugins |
xpath |
Xpath Expression//item[@key='_type'][.='plugin']/.. |
extract_id_of_plugin |
xpath |
Xpath Expression/item/item/item[@key='id'] |
choose_plugin_by_name |
localworker |
Scriptimport javax.swing.BoxLayout;
import javax.swing.ButtonGroup;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
if ((selectionValues == void) || (selectionValues == null) || (selectionValues.isEmpty())) {
throw new RuntimeException("selectionValues must be specified and non-empty");
}
ButtonGroup group = new ButtonGroup();
JPanel messagePanel = new JPanel();
messagePanel.setLayout(new BoxLayout(messagePanel,BoxLayout.Y_AXIS));
messagePanel.add(new JLabel((message == void ? null : message)));
JRadioButton[] buttonArray = new JRadioButton[selectionValues.size()];
for (int i = 0; i < buttonArray.length; i++) {
buttonArray[i] = new JRadioButton(selectionValues.get(i));
if (i==0) buttonArray[i].setSelected(true);
group.add(buttonArray[i]);
messagePanel.add(buttonArray[i]);
}
JOptionPane.showOptionDialog(null, messagePanel, (title == void ? null : title),
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"OK"}, null);
String answer="";
for (int i = 0; i < buttonArray.length; i++) {
JRadioButton button = buttonArray[i];
if (button.isSelected()) {
answer="" + i;
}
}
|
flatten_name_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); |
extract_name_of_plugin |
xpath |
Xpath Expression/item/item/item[@key='name'] |
flatten_id_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); |
find_corresponding_id |
beanshell |
ScriptObject the_element = the_list.get(Integer.valueOf(the_index)); |
create_render_url |
beanshell |
ScriptString url="http://biogps.org/plugin_v1/" + plugin_id +
"/renderurl/?geneid=" + gene_id + "&redirect"; |
open_render_url |
beanshell |
Scriptimport java.awt.Desktop;
import java.net.URI;
Desktop.getDesktop().browse(new URI(the_url)); |
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
find_corresponding_id |
|
the_list
the_index
|
the_element
|
create_render_url |
|
plugin_id
gene_id
|
url
|
open_render_url |
|
the_url
|
|
Datalinks (11)
Source |
Sink |
list_biogps_plugins:responseBody |
extract_plugins:xml_text |
extract_plugins:nodelistAsXML |
extract_id_of_plugin:xml_text |
flatten_name_list:outputlist |
choose_plugin_by_name:selectionValues |
extract_name_of_plugin:nodelist |
flatten_name_list:inputlist |
extract_plugins:nodelistAsXML |
extract_name_of_plugin:xml_text |
extract_id_of_plugin:nodelist |
flatten_id_list:inputlist |
choose_plugin_by_name:answer |
find_corresponding_id:the_index |
flatten_id_list:outputlist |
find_corresponding_id:the_list |
gene_id |
create_render_url:gene_id |
find_corresponding_id:the_element |
create_render_url:plugin_id |
create_render_url:url |
open_render_url:the_url |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1 (earliest)
(of 2)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (1)
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