Compare two genomes for similarity
Created: 2010-03-17 11:01:09
Last updated: 2010-03-17 11:05:00
The workflow takes as input two nucleotide/protein sequences in FastA format, requests a minimum percentage similarity threshold and then checks this against the similarity of the two sequences as determined by the Needleman-Wunsch global alignment.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Gregg Iceton
Newcastle University |
Titles (2)
Nucleotide sequence similarity checker |
Nucleotide or protein sequence similarity checker |
Descriptions (1)
The workflow takes as input two nucleotide/protein sequences in FastA format, requests a minimum percentage similarity threshold and then checks this against the similarity of the two sequences as determined by the Needleman-Wunsch global alignment. |
Dependencies (0)
Inputs (2)
Name |
Description |
seq_for_blast_filename |
Input the first sequence in FastA format
|
Seq_for_DB_filename |
Input the second sequence in FastA format
|
Processors (15)
Name |
Type |
Description |
Regex1 |
stringconstant |
Value\n |
Byte_Array_To_String |
localworker |
Scriptstring = new String(bytes);
|
Split_string_into_string_list_by_regular_expression |
localworker |
ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
Regex2 |
stringconstant |
ValueSequences.\(1:2\).Aligned..Score:(.*).* |
Filter_list_of_strings_extracting_match_to_a_regex |
localworker |
Scriptimport java.util.regex.*;
filteredlist = new ArrayList();
Pattern thePat = Pattern.compile(regex);
int theGroup = Integer.parseInt(group);
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
Matcher matcher = thePat.matcher(item);
if (matcher.find()) {
filteredlist.add(matcher.group(theGroup));
}
}
|
Group |
stringconstant |
Value1 |
checkSimilarity |
beanshell |
Scriptimport java.lang.Double;
double seqSimDbl = Double.valueOf(seqSim.trim()).doubleValue();
double minSimDbl = Double.valueOf(minSim.trim()).doubleValue();
int i = Double.compare(seqSimDbl,minSimDbl);
if (i >= 0)
{
simBln = 1;
} else
{
simBln = 0;
} |
Ask |
localworker |
Scriptimport javax.swing.JOptionPane;
answer = JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE);
|
message_value |
stringconstant |
ValuePlease enter the minimum percentage sequence similarity required |
title_value |
stringconstant |
ValueSequence similarity |
local_create_blastdb |
localworker |
Scriptif (command == null || 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 == 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_command_defaultValue |
stringconstant |
ValueD:\bin\formatdb.exe |
create_formatdb_cmdArgs |
beanshell |
ScriptList cmdArgsList = new ArrayList();
cmdArgsList.add("-i");
cmdArgsList.add(fastAFileName);
cmdArgsList.add("-p");
cmdArgsList.add("F");
cmdArgsList.add("-n");
cmdArgsList.add("ensemblBlastDB"); |
create_blastall_cmdArgs |
beanshell |
ScriptList cmdArgsList = new ArrayList();
cmdArgsList.add("-p");
cmdArgsList.add("blastn");
cmdArgsList.add("-d");
cmdArgsList.add("./ensemblBlastDB");
cmdArgsList.add("-i");
cmdArgsList.add(sequenceFileName);
cmdArgsList.add("-o");
cmdArgsList.add("blast.out"); |
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();
|
Beanshells (3)
Name |
Description |
Inputs |
Outputs |
checkSimilarity |
|
seqSim
minSim
|
simBln
seqSimDbl
minSimDbl
|
create_formatdb_cmdArgs |
|
fastAFileName
|
cmdArgsList
|
create_blastall_cmdArgs |
|
sequenceFileName
|
cmdArgsList
|
Outputs (2)
Name |
Description |
Carry_on |
Boolean output (0 or 1) - 0 indicates the sequence similarity was lower than the input threshold, 1 indicates the similarity was equal to or higher than the threshold.
|
test |
|
Datalinks (18)
Source |
Sink |
runBlastSearch:result |
Byte_Array_To_String:bytes |
Regex1:value |
Split_string_into_string_list_by_regular_expression:regex |
Byte_Array_To_String:string |
Split_string_into_string_list_by_regular_expression:string |
Regex2:value |
Filter_list_of_strings_extracting_match_to_a_regex:regex |
Split_string_into_string_list_by_regular_expression:split |
Filter_list_of_strings_extracting_match_to_a_regex:stringlist |
Group:value |
Filter_list_of_strings_extracting_match_to_a_regex:group |
Filter_list_of_strings_extracting_match_to_a_regex:filteredlist |
checkSimilarity:seqSim |
Ask:answer |
checkSimilarity:minSim |
message_value:value |
Ask:message |
title_value:value |
Ask:title |
local_create_blastdb_command_defaultValue:value |
local_create_blastdb:command |
create_formatdb_cmdArgs:cmdArgsList |
local_create_blastdb:args |
Seq_for_DB_filename |
create_formatdb_cmdArgs:fastAFileName |
seq_for_blast_filename |
create_blastall_cmdArgs:sequenceFileName |
create_blastall_cmdArgs:cmdArgsList |
runBlastSearch:args |
local_create_blastdb:result |
runBlastSearch:command |
checkSimilarity:simBln |
Carry_on |
create_formatdb_cmdArgs:cmdArgsList |
test |
Coordinations (1)
Controller |
Target |
local_create_blastdb |
runBlastSearch |
Uploader
License
All versions of this Workflow are
licensed under:
Version 2
(of 4)
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