Fetch Fasta and Genbank files
Created: 2010-03-19 13:32:07
Fetches fasta and genbank files for a given identifier.,
e.g., CP000256
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Fetch Fasta and GenBank files. |
Descriptions (1)
Fetches fasta and genbank files for a given identifier.,e.g., CP000256 |
Dependencies (0)
Inputs (1)
Name |
Description |
sequence_id |
The id to get the Fasta format
The ID to get the Fasta format
|
Processors (4)
Name |
Type |
Description |
fetch_fasta_from_ncbi |
localworker |
ScriptString base = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=";String arg1 = "fasta";String mid = "&db=nucleotide&retmode=text&id=";// http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gp&db=nucleotide&retmode=text&id=CP000257URL url = new URL( base + arg1 + mid + id);BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));StringWriter writer = new StringWriter();char[] buffer = new char[1024]; while (true) { int r = reader.read(buffer); if (r <= 0) { break; } writer.write(buffer, 0, r); }ext = "fasta";content = writer.toString(); |
fetch_genbank_from_ncbi |
localworker |
ScriptString base = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=";String arg1 = "gp";String mid = "&db=nucleotide&retmode=text&id=";// http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?rettype=gp&db=nucleotide&retmode=text&id=CP000257URL url = new URL( base + arg1 + mid + id);BufferedReader reader = new BufferedReader (new InputStreamReader(url.openStream()));StringWriter writer = new StringWriter();char[] buffer = new char[1024]; while (true) { int r = reader.read(buffer); if (r <= 0) { break; } writer.write(buffer, 0, r); }ext = "gb";content = writer.toString(); |
save_fasta_file |
beanshell |
ScriptStringBuffer sb = new StringBuffer();sb.append("D:/DATA/demo/");sb.append(id);sb.append("." + ext);File f = new File( sb.toString() );BufferedWriter writer = new BufferedWriter(new FileWriter(f));writer.write(content);writer.close();String file_location = f.getCanonicalPath(); |
save_genbank_file |
beanshell |
ScriptStringBuffer sb = new StringBuffer();sb.append("D:/DATA/demo/");sb.append(id);sb.append("." + ext);File f = new File( sb.toString() );BufferedWriter writer = new BufferedWriter(new FileWriter(f));writer.write(content);writer.close();String filePath = f.getCanonicalPath(); |
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
save_fasta_file |
|
id
ext
content
|
content
file_location
|
save_genbank_file |
|
id
ext
content
|
content
|
Outputs (3)
Name |
Description |
genbank_nucleotide |
GenBank File
GenBank
|
fasta_nucleotide |
Fasta File
Nucelot
Nucelotide
|
file_location |
Location of the files generated
Location
|
Datalinks (11)
Source |
Sink |
sequence_id |
fetch_fasta_from_ncbi:id |
sequence_id |
fetch_genbank_from_ncbi:id |
fetch_fasta_from_ncbi:ext |
save_fasta_file:ext |
fetch_fasta_from_ncbi:id |
save_fasta_file:id |
fetch_fasta_from_ncbi:content |
save_fasta_file:content |
fetch_genbank_from_ncbi:content |
save_genbank_file:content |
fetch_genbank_from_ncbi:ext |
save_genbank_file:ext |
fetch_genbank_from_ncbi:id |
save_genbank_file:id |
save_genbank_file:content |
genbank_nucleotide |
save_fasta_file:content |
fasta_nucleotide |
save_fasta_file:file_location |
file_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