Read SwissProt file
Created: 2010-10-28 14:24:51
Last updated: 2010-10-28 14:25:36
The Read_SwissProt_file service reads the file at the swiss_prot_file_url and converts the SwissProt data into Agave format. The result is then sent to the workflow's swiss_prot_data port.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (3)
Read SwissProt file |
Read SwissProt file |
Read SwissProt file |
Descriptions (3)
The Get_web_page_from_URL downloads a file from myExperiment that contains SwissProt data. That data is then saved to a temporary file generated by the create_and_populate_temporary_file beanshell. The path to the temporary file is then passed to the Read_SwissProt_file service. That service reads the file and converts the SwissProt data into Agave format. The result is then sent to the workflow's out port. |
The Read_SwissProt_file service reads the file at the swiss_prot_file_url and converts the SwissProt data into Agave format. The result is then sent to the workflow's swiss_prot_data port. |
The Read_SwissProt_file service reads the file at the swiss_prot_file_url and converts the SwissProt data into Agave format. The result is then sent to the workflow's out port. |
Dependencies (0)
Processors (2)
Name |
Type |
Description |
swiss_prot_file_url |
stringconstant |
Valuehttp://www.myexperiment.org/blobs/136/download/P30512.txt?version=1 |
Read_Swiss_Prot_File |
localworker |
Scriptimport org.biojava.bio.seq.Sequence;
import org.biojava.bio.seq.SequenceIterator;
import org.biojava.bio.seq.io.SeqIOTools;
import org.biojava.bio.seq.io.agave.AgaveWriter;
BufferedReader getReader (String fileUrl) throws IOException {
InputStreamReader reader;
try {
reader = new FileReader(fileUrl);
}
catch (FileNotFoundException e) {
// try a real URL instead
URL url = new URL(fileUrl);
reader = new InputStreamReader (url.openStream());
}
return new BufferedReader(reader);
}
BufferedReader br = getReader(fileUrl);
// read the EMBL File
SequenceIterator sequences = SeqIOTools.readSwissprot(br);
// Prepare the writer
AgaveWriter writer = new AgaveWriter();
ByteArrayOutputStream os = new ByteArrayOutputStream();
StringBuffer sb = new StringBuffer();
PrintStream ps = new PrintStream(os);
// iterate through the sequences
while (sequences.hasNext()) {
Sequence seq = sequences.nextSequence();
writer.writeSequence(seq, ps);
sb.append(os.toString());
}
results = sb.toString();
|
Outputs (1)
Name |
Description |
swiss_prot_data |
|
Datalinks (2)
Source |
Sink |
swiss_prot_file_url:value |
Read_Swiss_Prot_File:fileUrl |
Read_Swiss_Prot_File:results |
swiss_prot_data |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (0)
(People/Groups)
None
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