blastp of target vs source database
Created: 2010-03-19 13:57:32
Last updated: 2010-03-19 14:05:40
This worlflow allows the user to input two sets of proteins in fasta format. One file is converted to a database using formatdb, the set is blasted against this database to test for Blast hits. Users is able to set eValue and destination of files for database and blast file. Arguments can be added to either formatdb or blast in beanshell supplied. Blast and formatdb must be installed locally and the correct filepaths for these applications must entered into the workflow accordingly.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (3)
Bela Tiwari |
nclteamc
and
Bela Tiwari - fetchEnsemblSeqsAndBlast |
nclteamc
and
Bela Tiwari |
Titles (2)
blastp of target vs source database |
fetchEnsemblSeqsAndBlast |
Descriptions (2)
This workflow allows you to configure a BioMart query to fetch sequences you want from Ensembl. These sequences are retrieved and a blast database of them is created (by default, in the directory you ran taverna from).
Warning: This workflow assumes that you have blastall and formatdb installed on the machine, and that by default, these are both found or linked in /usr/local/bin. It also assumes that you have write permission to the directory you have run taverna from. The beanshells "create_blastall_cmdArgs" and "create_formatdb_cmdArgs" are what you need to edit if the default locations are not appropriate for you.
Shortcomings:
The names of all the files created and used is hard coded in this workflow. This means that if you run this workflow more than once without editing anything, you will overwrite files you have previously created.
All files created in the working directory are not yet coded to be deleted via the workflow. Ideally there would be an option that a user could choose that would set the files to be kept or deleted after use. |
"This workflow allows you to configure a BioMart query to fetch sequences you want from Ensembl. These sequences are retrieved and a blast database of them is created (by default, in the directory you ran taverna from).
Warning: This workflow assumes that you have blastall and formatdb installed on the machine, and that by default, these are both found or linked in /usr/local/bin. It also assumes that you have write permission to the directory you have run taverna from. The beanshells "create_blastall_cmdArgs" and "create_formatdb_cmdArgs" are what you need to edit if the default locations are not appropriate for you.
Shortcomings:
The names of all the files created and used is hard coded in this workflow. This means that if you run this workflow more than once without editing anything, you will overwrite files you have previously created.
All files created in the working directory are not yet coded to be deleted via the workflow. Ideally there would be an option that a user could choose that would set the files to be kept or deleted after use." |
Dependencies (0)
Inputs (5)
Name |
Description |
targetProteins |
Provide the name, and if not in your working directory, the location of the file of fasta sequence(s) that you wish to use to search the blast database created in this workflow.
|
sourceProteins |
Filepath for source proteins
Provide the name, and if not in your working directory, the location of the file of fasta sequence(s) that you wish to use to create the blast database in this workflow.
|
dbSave |
name and filepath of created blast database
|
eValue |
e value used for the blast
|
blastFile |
filepath used to store the blast results in text format
|
Processors (7)
Name |
Type |
Description |
create_blastall_cmdArgs |
beanshell |
ScriptList cmdArgsList = new ArrayList();
cmdArgsList.add("-p");
cmdArgsList.add("blastp");
cmdArgsList.add("-e");
cmdArgsList.add(eValue);
cmdArgsList.add("-d");
cmdArgsList.add(dbSave);
cmdArgsList.add("-i");
cmdArgsList.add(inputFilePath);
cmdArgsList.add("-o");
cmdArgsList.add(outputFilePath);
cmdArgsList.add("-m");
cmdArgsList.add("7"); |
create_formatdb_cmdArgs |
beanshell |
ScriptList cmdArgsList = new ArrayList();
cmdArgsList.add("-i");
cmdArgsList.add(seqFile1);
cmdArgsList.add("-p");
cmdArgsList.add("T");
cmdArgsList.add("-n");
cmdArgsList.add(dbSave); |
runBlastSearch |
localworker |
Scriptif (command == void || command.equals("")) {
throw new RuntimeException("The 'command' port cannot be null.");
}
Process proc = null;
Runtime rt = Runtime.getRuntime();
String osName = System.getProperty("os.name");
String[] cmdArray = null;
if (osName.equals("Windows NT") || osName.equals("Windows XP")) {
cmdArray = new String[] { "cmd.exe", "/c", command };
} else if (osName.equals("Windows 95")) {
cmdArray = new String[] { "command.exe", "/c", command };
} else {// TODO: investigate if this will work in Linux and OSX
cmdArray = new String[] { command };
}
// concatenate the arrays
if ((args == void) || (args == null)) {
args = new ArrayList();
}
int argSize = cmdArray.length + args.size();
ArrayList appArray = new ArrayList(argSize);
for (int i = 0; i < cmdArray.length; i++) {
appArray.add(cmdArray[i]);
}
for (int i = 0; i < args.size(); i++) {
appArray.add(args.get(i));
}
String[] applist = new String[argSize];
appArray.toArray(applist);
proc = rt.exec(applist);
// Get the input stream and read from it
InputStream in = proc.getInputStream();
int c;
StringBuffer sb = new StringBuffer();
while ((c = in.read()) != -1) {
sb.append((char) c);
}
in.close();
result = sb.toString();
|
local_create_blastdb |
localworker |
Scriptif (command == void || command.equals("")) {
throw new RuntimeException("The 'command' port cannot be null.");
}
Process proc = null;
Runtime rt = Runtime.getRuntime();
String osName = System.getProperty("os.name");
String[] cmdArray = null;
if (osName.equals("Windows NT") || osName.equals("Windows XP")) {
cmdArray = new String[] { "cmd.exe", "/c", command };
} else if (osName.equals("Windows 95")) {
cmdArray = new String[] { "command.exe", "/c", command };
} else {// TODO: investigate if this will work in Linux and OSX
cmdArray = new String[] { command };
}
// concatenate the arrays
if ((args == void) || (args == null)) {
args = new ArrayList();
}
int argSize = cmdArray.length + args.size();
ArrayList appArray = new ArrayList(argSize);
for (int i = 0; i < cmdArray.length; i++) {
appArray.add(cmdArray[i]);
}
for (int i = 0; i < args.size(); i++) {
appArray.add(args.get(i));
}
String[] applist = new String[argSize];
appArray.toArray(applist);
proc = rt.exec(applist);
// Get the input stream and read from it
InputStream in = proc.getInputStream();
int c;
StringBuffer sb = new StringBuffer();
while ((c = in.read()) != -1) {
sb.append((char) c);
}
in.close();
result = sb.toString();
|
runBlastSearch_command_defaultValue |
stringconstant |
ValueC:\Users\RLWarrender-LT\Desktop\Jennifer\blast\bin\blastall.exe |
local_create_blastdb_command_defaultValue |
stringconstant |
ValueC:\Users\RLWarrender-LT\Desktop\Jennifer\blast\bin\formatdb.exe |
Read_Text_File |
localworker |
ScriptBufferedReader 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);
}
StringBuffer sb = new StringBuffer(4000);
BufferedReader in = getReader(fileurl);
String str;
String lineEnding = System.getProperty("line.separator");
while ((str = in.readLine()) != null) {
sb.append(str);
sb.append(lineEnding);
}
in.close();
filecontents = sb.toString();
|
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
create_blastall_cmdArgs |
|
inputFilePath
eValue
dbSave
outputFilePath
|
cmdArgsList
|
create_formatdb_cmdArgs |
|
seqFile1
dbSave
|
cmdArgsList
|
Outputs (1)
Name |
Description |
Result |
blast results of target against a source database in xml format
|
Datalinks (12)
Source |
Sink |
eValue |
create_blastall_cmdArgs:eValue |
dbSave |
create_blastall_cmdArgs:dbSave |
targetProteins |
create_blastall_cmdArgs:inputFilePath |
blastFile |
create_blastall_cmdArgs:outputFilePath |
sourceProteins |
create_formatdb_cmdArgs:seqFile1 |
dbSave |
create_formatdb_cmdArgs:dbSave |
create_blastall_cmdArgs:cmdArgsList |
runBlastSearch:args |
runBlastSearch_command_defaultValue:value |
runBlastSearch:command |
create_formatdb_cmdArgs:cmdArgsList |
local_create_blastdb:args |
local_create_blastdb_command_defaultValue:value |
local_create_blastdb:command |
blastFile |
Read_Text_File:fileurl |
Read_Text_File:filecontents |
Result |
Coordinations (2)
Controller |
Target |
runBlastSearch |
Read_Text_File |
local_create_blastdb |
runBlastSearch |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (2)
(People/Groups)
Attributions (1)
(Workflows/Files)
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