Read GenBank file
Created: 2010-10-28 14:20:12
Last updated: 2010-10-28 14:20:51
The Read_GenBank_file service reads the file at the genbank_file_url and converts the GenBank data into Agave format. The result is then sent to the workflow's gen_bank_data port.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (3)
Read GenBank file |
Read GenBank file |
Read GenBank file |
Descriptions (3)
The Read_GenBank_file service reads the file at the genbank_file_url and converts the GenBank data into Agave format. The result is then sent to the workflow's gen_bank_data port. |
The Get_web_page_from_URL downloads a file from myExperiment that contains GenBank 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_GenBank_file service. That service reads the file and converts the GenBank data into Agave format. The result is then sent to the workflow's out port. |
The Read_GenBank_file service reads the file at the genbank_file_url and converts the GenBank data into Agave format. The result is then sent to the workflow's out port. |
Dependencies (0)
Processors (2)
Name |
Type |
Description |
genbank_file_url |
stringconstant |
Valuehttp://www.myexperiment.org/blobs/135/download/franck.txt?version=1 |
Read_Gen_Bank_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 GenBank File
SequenceIterator sequences = SeqIOTools.readGenbank(br);
// iterate through the sequences
ByteArrayOutputStream os = new ByteArrayOutputStream();
StringBuffer sb = new StringBuffer();
AgaveWriter writer = new AgaveWriter();
PrintStream ps = new PrintStream(os);
while (sequences.hasNext()) {
Sequence seq = sequences.nextSequence();
writer.writeSequence(seq, ps);
sb.append(os.toString());
}
genbankdata = sb.toString()
|
Outputs (1)
Name |
Description |
gen_bank_data |
|
Datalinks (2)
Source |
Sink |
genbank_file_url:value |
Read_Gen_Bank_File:fileUrl |
Read_Gen_Bank_File:genbankdata |
gen_bank_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