DAS features retrieval and parsing with JDAS
Created: 2011-06-01 18:06:35
Last updated: 2011-06-02 10:24:13
Retrieve Protein or Genome features using the Distributed Annotation System (DAS) and create your own text output by modifying the JDAS component. To be able to use this workflow with JDAS copy this file …
http://www.ebi.ac.uk/~maven/m2repo/uk/ac/ebi/das/jdas/1.0.3/jdas-1.0.3.jar
… to the lib folder inside the Taverna application. This jar file is a dependency needed to parse DAS outputs.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (0)
Titles (1)
DAS features retrieval and parsing with JDAS |
Descriptions (1)
Retrieve Protein or Genome features using the Distributed Annotation System (DAS) and create your own text output by modifying the JDAS component. To be able to use this workflow with JDAS copy this file …
http://www.ebi.ac.uk/~maven/m2repo/uk/ac/ebi/das/jdas/1.0.3/jdas-1.0.3.jar
… to the lib folder inside the Taverna application. This jar file is a dependency needed to parse DAS outputs. |
Dependencies (0)
Inputs (4)
Name |
Description |
IDs |
You can input more than one ID using comma-separated values. You can use different types of IDs depending on the DAS coordinate system (http://www.dasregistry.org/help_coordsys.jsp) you decided to use. If you selected a DAS source of type "Protein Sequence" and authority "UniProt" you could use UniProt (TrEMBL and SwissProt) accessions. For instance "P37173". If you selected a DAS source of type "Chromosome", authority "GRCh_37" and organism "Homo sapiens" you could use a chromosome ID. For instance "1".
|
DasSource |
Input a DAS reference source following this format "http://www.server.com/das/source/". Find a public list of available DAS reference sources providing sequence information in the DAS registry … http://www.dasregistry.org/listSources.jsp … or create your own DAS source with easyDAS … http://www.ebi.ac.uk/panda-srv/easydas/
|
start |
The start and stop attributes indicate the range of the segment to query. In this workflow is optional. Set an empty value to get the whole sequence.
|
stop |
The start and stop attributes indicate the range of the segment to query. In this workflow is optional. Set an empty value to get the whole sequence.
|
Processors (4)
Name |
Type |
Description |
DAS_features_retrieval |
workflow |
|
split_by_regex |
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].replaceAll(" ",""));
}
}
|
regex_value |
stringconstant |
Value, |
JDAS |
beanshell |
Scriptimport uk.ac.ebi.das.jdas.schema.features.DASGFF;
import uk.ac.ebi.das.jdas.schema.features.SEGMENT;
import uk.ac.ebi.das.jdas.adapters.features.DasGFFAdapter;
import uk.ac.ebi.das.jdas.adapters.features.FeatureAdapter;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import java.io.ByteArrayInputStream;
/* Use JAXB and JDAS to parse the DAS format*/
String featuresText = "";
String newline = "\n";
String tab = "\t";
String header = "ID" + tab + "LABEL" + tab + "TYPE CV I" + tab + "METHOD CV I" + tab + "START" + tab + "END";
ByteArrayInputStream input = new ByteArrayInputStream(featuresXML.getBytes());
JAXBContext jc = JAXBContext.newInstance("uk.ac.ebi.das.jdas.schema.features");
Unmarshaller unmarshaller = jc.createUnmarshaller();
DasGFFAdapter dasGFF = new DasGFFAdapter((DASGFF) unmarshaller.unmarshal(input));
DasGFFAdapter.SegmentAdapter segment = dasGFF.getGFF().getSegment().get(0);
/* Chose what to print and how to print it */
featuresText += header + newline;
for (FeatureAdapter feature:segment.getFeature()) {
featuresText += feature.getId() + tab;
featuresText += feature.getLabel() + tab;
featuresText += feature.getType().getCvId() + tab;
featuresText += feature.getMethod().getCvId() + tab;
featuresText += String.valueOf(feature.getStart()) + tab;
featuresText += String.valueOf(feature.getEnd()) + tab;
featuresText += newline;
} |
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
JDAS |
|
featuresXML
|
featuresText
|
create_range |
|
start
stop
|
range
|
Outputs (3)
Name |
Description |
Features_DAS_format |
Have a look to the specification to know more about the DAS format ... http://www.biodas.org/documents/spec-1.6.html#features
|
Service_status |
HTTP response status codes ... http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
|
Features_custom_format |
This output was achieved using the JDAS library …
http://code.google.com/p/jdas/
To be able to use this workflow with JDAS copy this file …
http://www.ebi.ac.uk/~maven/m2repo/uk/ac/ebi/das/jdas/1.0.3/jdas-1.0.3.jar
… to the lib folder inside the Taverna application. This jar file is a dependency needed to parse DAS outputs.
|
Datalinks (10)
Source |
Sink |
split_by_regex:split |
DAS_features_retrieval:ID |
DasSource |
DAS_features_retrieval:DasSource |
start |
DAS_features_retrieval:start |
stop |
DAS_features_retrieval:stop |
regex_value:value |
split_by_regex:regex |
IDs |
split_by_regex:string |
DAS_features_retrieval:Features_DAS_format |
JDAS:featuresXML |
DAS_features_retrieval:Features_DAS_format |
Features_DAS_format |
DAS_features_retrieval:Service_status |
Service_status |
JDAS:featuresText |
Features_custom_format |
Uploader
License
All versions of this Workflow are
licensed under:
Version 2 (latest)
(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