Biomart datasets for the Ensembl Genes mart service
Created: 2011-10-03 10:17:40
Retrieve Biomart datasets for the Ensembl Genes mart service (one dataset per specie).
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Biomart datasets for the Ensembl Genes mart service |
Descriptions (1)
Retrieve Biomart datasets for the Ensembl Genes mart service (one dataset per specie). |
Dependencies (0)
Inputs (1)
Name |
Description |
species |
Filter datasets by specie. To query all the species query by "all" or leave the input value empty.
|
Processors (1)
Name |
Type |
Description |
GetDatasetsFromBiomartEnsemblGenes |
beanshell |
Scriptif((species == void) || (species == null) || species.size()==0) {
List speciesBackup = new ArrayList();
speciesBackup.add("all");
species = speciesBackup;
}
String biomartUrlDomain = "http://www.biomart.org";
String martName = "ensembl";
String ensemblBiomartDatasetsUrl = biomartUrlDomain + "/biomart/martservice?type=datasets&mart=" + martName;
List datasetName = new ArrayList();
List datasetSpecie = new ArrayList();
List datasetAssembly = new ArrayList();
List datasetDate = new ArrayList();
URL url = new URL(ensemblBiomartDatasetsUrl);
BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));
//read each line of text file
String line = null;
while((line = reader.readLine()) != null){
if(line.length() > 1){
StringTokenizer st = new StringTokenizer(line,"\t");
int col = 0;
boolean specieMatch = false;
String name = "";
String specie = "";
String assembly = "";
String date = "";
while (st.hasMoreTokens()){
String field = st.nextToken();
if(col==1){
name = field;
} else if(col==2){
int i = field.indexOf(" genes ");
if(i > -1){
specie = field.substring(0,i);
}
for(Object sp:species){
if(sp.toString().equalsIgnoreCase(specie)){
specieMatch = true;
}
}
if(species.contains( specie )){
specieMatch = true;
}
} else if(col==4){
assembly = field;
} else if(col==8){
date = field;
}
col++;
}
if(specieMatch == true || species.contains("all")){
datasetName.add(name);
datasetSpecie.add(specie);
datasetAssembly.add(assembly);
datasetDate.add(date);
}
}
}
reader.close(); |
Beanshells (1)
Name |
Description |
Inputs |
Outputs |
GetDatasetsFromBiomartEnsemblGenes |
|
species
|
datasetName
datasetSpecie
datasetDate
datasetAssembly
|
Outputs (4)
Name |
Description |
datasetAssembly |
Assembly
|
datasetDate |
Latest update
|
datasetName |
Dataset Name
|
datasetSpecie |
Specie
|
Datalinks (5)
Source |
Sink |
species |
GetDatasetsFromBiomartEnsemblGenes:species |
GetDatasetsFromBiomartEnsemblGenes:datasetAssembly |
datasetAssembly |
GetDatasetsFromBiomartEnsemblGenes:datasetDate |
datasetDate |
GetDatasetsFromBiomartEnsemblGenes:datasetName |
datasetName |
GetDatasetsFromBiomartEnsemblGenes:datasetSpecie |
datasetSpecie |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (0)
None
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