Test for Orthologues
Created: 2010-03-19 13:53:54
Warning: The files are hardcoded in to the beanshell of this workflow.
Given an orthlog file for an organism from
http://www.ebi.ac.uk/integr8/FtpSearch.do?
orgProteomeId=22602,
find proteins that are orthologous to proteins
in another oragnsims, e.g., B.subtils. Outputs
percent.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (2)
Test for orthologs. |
Test for orthologs |
Descriptions (2)
Given an orthlog file for an organism fromhttp://www.ebi.ac.uk/integr8/FtpSearch.do?orgProteomeId=22602,find proteins that are orthologous to proteinsin another oragnsims, e.g., B.subtils. Outputspercent. |
Give an orthlog file for an organism fromhttp://www.ebi.ac.uk/integr8/FtpSearch.do?orgProteomeId=22602,find proteins that are orthologous to proteinsin ano |
Dependencies (0)
Inputs (1)
Name |
Description |
test_or_not |
Test files or not
|
Processors (2)
Name |
Type |
Description |
test_for_orthologs |
beanshell |
Scriptimport java.io.*;import java.util.*;path = "D:/DATA/demo/orthoResults.txt"; File f1,f2,f3;if( arg.equals("test") ){ f1 = new File("D:/DATA/proteome/sa.fasta"); f2 = new File("D:/DATA/proteome/sa.ortho");}else{ f1 = new File("D:/DATA/proteome/22602.S_aureus_USA300.fasta"); f2 = new File("D:/DATA/proteome/22602.S_aureus_USA300.orthologues");}HashSet targetHashSet = new HashSet();HashSet sourceHashSet = new HashSet();readTargetFile(File f) { try { BufferedReader br = new BufferedReader(new FileReader(f)); String line = br.readLine(); while (line != null) { // Note: many lines will contain "Putative uncharacterized protein" int start = line.indexOf("|"); int end = line.indexOf("|", start+1); if(start >= 0 && end >= 0) { String proteinID = line.substring(start+1,end); targetHashSet.add(proteinID); // would need HashMap for K,V pair //System.out.println("target >>" + proteinID + "<<"); } line = br.readLine(); } br.close(); } catch(Exception ex) { System.out.println(ex); }}readOrthoFile(File f) { try { BufferedReader br = new BufferedReader(new FileReader(f)); String line = br.readLine(); while (line != null) { String [] fields = line.split("\t"); //int start = line.indexOf("|"); //int end = line.indexOf("|", start+1); //String proteinID = line.substring(start+1,end); if (fields != null && fields.length > 2) { if(fields[5].contains("B.subtilis") ) { sourceHashSet.add(fields[2]); // System.out.println("source >>" + fields[2] + "<<"); // String orthoProteinID = fields[7].replace(";",""); //System.out.println("ortho >>" + orthoProteinID + "<<"); } } line = br.readLine(); } br.close(); } catch(Exception ex) { System.out.println(ex); }}purge(HashSet target, HashSet source) { int i = 0; Iterator it = source.iterator(); while( it.hasNext() ) { String s = (String) it.next(); target.remove(s); } }readTargetFile(f1);readOrthoFile(f2);File f = new File("D:/DATA/demo/orthoResults.txt");try{ FileWriter fw = new FileWriter(f); fw.write("target proteins = " + targetHashSet.size() + ", orthologous source proteins = " + sourceHashSet.size() + "\n"); fw.write("Percent orthologs = " + (100 * sourceHashSet.size())/targetHashSet.size() + "%\n\n" ); purge(targetHashSet, sourceHashSet); fw.write("target proteins = " + targetHashSet.size() + " if orthologs removed.\n\n"); fw.flush(); fw.close(); System.out.println("done");}catch(Exception ex) { System.err.println(ex); } |
read_report |
beanshell |
Scriptimport java.io.*;StringBuffer sb = new StringBuffer();try { BufferedReader br = new BufferedReader(new FileReader(path)); String line = br.readLine(); while(line != null) { sb.append(line + "\n"); line = br.readLine(); } br.close();}catch(Exception ex) { System.out.println(ex); }content = sb.toString(); |
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
test_for_orthologs |
|
arg
|
path
|
read_report |
|
path
|
content
path
|
Outputs (2)
Name |
Description |
output |
Report generated
Report
|
report_location |
Report Location, where it is found
|
Datalinks (4)
Source |
Sink |
test_or_not |
test_for_orthologs:arg |
test_for_orthologs:path |
read_report:path |
read_report:content |
output |
read_report:path |
report_location |
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 (1)
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