Get homologous from NCBI homoloGene
Created: 2011-10-13 18:35:58
Last updated: 2011-10-13 18:36:01
Get homologous from NCBI homoloGene for a list of Refseq protein accessions. Be patient, the workflows has to bring a file around 11Mb. ftp://ftp.ncbi.nlm.nih.gov/pub/HomoloGene/README
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Get homologous from NCBI homoloGene |
Descriptions (1)
Get homologous from NCBI homoloGene for a list of Refseq protein accessions. Be patient, the workflows has to bring a file around 11Mb. ftp://ftp.ncbi.nlm.nih.gov/pub/HomoloGene/README |
Dependencies (0)
Inputs (2)
Name |
Description |
proteinAccs |
A list of Refseq protein accessions to query. Use comma-separated values (CSV)
|
specie |
Specie where to find homologous. Use a taxonomy accession. Input "all" if you would like to find homologous in all the species.
|
Processors (4)
Name |
Type |
Description |
getHomologousFrom_homoloGene |
beanshell |
Script Map protein2group = new HashMap();
Map protein2taxonomy = new HashMap();
HashMap group2protein = new HashMap();
URL url = null;
BufferedReader reader = null;
try {
url = new URL(homologeneUrlNCBI);
reader = new BufferedReader(new InputStreamReader(url.openStream()));
} catch ( MalformedURLException e ) {
e.printStackTrace();
} catch ( IOException e ) {
e.printStackTrace();
}
//read each line of text file
String line = null;
try {
while((line = reader.readLine()) != null){
if(line.length() > 1){
String[] el = line.split("\t");
String group = el[0];
String taxonomy = el[1];
String accession = el[5];
protein2group.put(accession,group);
protein2taxonomy.put(accession,taxonomy);
if(group2protein.containsKey(group)){
((ArrayList) group2protein.get(group)).add(accession);
} else {
List accList = new ArrayList();
accList.add(accession);
group2protein.put(group,accList);
}
}
}
} catch ( IOException e ) {
e.printStackTrace();
}
/* Find homologs */
//List queryAccs = new ArrayList();
//queryAccs.add("XP_524741.2");
//queryAccs.add("NP_001003746.1");
//String specie = "9606";
List listOfResults = new ArrayList();
for(Object acc:queryAccs){
String group = (String) protein2group.get(acc);
List results = new ArrayList();
if(group == null){
// No homologous for this acc
} else {
List homologs = (List) group2protein.get(group);
if(specie.equalsIgnoreCase("all")){
results.addAll(homologs);
} else {
for(Object homolog:homologs){
if(((String)protein2taxonomy.get(homolog)).equalsIgnoreCase(specie)){
results.add(homolog);
}
}
}
}
listOfResults.add(results);
} |
homologeneUrlNCBI_value |
stringconstant |
Valueftp://ftp.ncbi.nlm.nih.gov/pub/HomoloGene/current/homologene.data |
Split_string_into_string_list_by_regular_expression |
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]);
}
}
|
regex_value |
stringconstant |
Value, |
Beanshells (1)
Name |
Description |
Inputs |
Outputs |
getHomologousFrom_homoloGene |
|
homologeneUrlNCBI
queryAccs
specie
|
listOfResults
|
Outputs (2)
Name |
Description |
Beanshell_listOfResults |
|
listOfproteinAccs |
|
Datalinks (7)
Source |
Sink |
specie |
getHomologousFrom_homoloGene:specie |
Split_string_into_string_list_by_regular_expression:split |
getHomologousFrom_homoloGene:queryAccs |
homologeneUrlNCBI_value:value |
getHomologousFrom_homoloGene:homologeneUrlNCBI |
regex_value:value |
Split_string_into_string_list_by_regular_expression:regex |
proteinAccs |
Split_string_into_string_list_by_regular_expression:string |
getHomologousFrom_homoloGene:listOfResults |
Beanshell_listOfResults |
Split_string_into_string_list_by_regular_expression:split |
listOfproteinAccs |
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