The blat workflow invokes the blat services provided at www.bioinformatics.nl (author Pieter Neerincx).
As input, it takes a database name (for example, Danio_rerio_Genome for Zebra Fish) and one or more sequences in Fasta format. The output will be a tab separated output of the blat. An eValue string constant is added to filter on the e-Value.
Note, the e-Value is not exactly the same as the blast e-Value.
org.embl.ebi.escience.scuflworkers.java.StringListMerge
This Beanshell downloads a file to disk. The standard download local Java widgets don't handle URLs with HTTP(S) Basic Authentication, but this Beanshell can. When a webserver uses BasicAuth, a login and password can be coded as part of the URL using the following syntax: http(s)://login:password@www.some.website/my/great/tool/result.xml. This beanshel extracts the login and password from the URL and supplies them automatically to the webserver. This prevents Taverna from showing popup dialogs requesting the login and password from the user as this will be problematic for large workflows.
Please note that the path where the downloaded file will be stored must be an absolute path to a folder ended with a slash. (Slash backward on Windows or a slash forward on Linux/Unix/Mac OS X.) The filename for the result is automatically extracted from the URL.
//
// Import modules;
//
import java.io.*;
import java.net.*;
import java.util.regex.*;
// Connect to URL.
URL oURL = new URL(URL);
URLConnection oURLConnection = oURL.openConnection();
// Check if we are are dealing with a site
// that uses basic http(s) authentication.
oPattern = Pattern.compile("(\\w+://)??([^:]+):([^:@]+)@.*");
oMatcher = oPattern.matcher(URL);
vHit = oMatcher.matches();
if (vHit) {
//String vProtocol = oMatcher.group(1);
String vUser = oMatcher.group(2);
String vPass = oMatcher.group(3);
String vAuth = vUser + ":" + vPass;
String vEncodedUserPassword = new sun.misc.BASE64Encoder().encode(vAuth.getBytes());
oURLConnection.setRequestProperty ("Authorization", "Basic " + vEncodedUserPassword);
}
// get input stream
InputStream inputStream = oURLConnection.getInputStream();
// download all results and filter
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
List blatResults = new ArrayList();
double ev = Double.parseDouble(eValue);
String line;
while((line = reader.readLine()) != null){
String[] values = line.split("\t");
double currentEValue = Double.parseDouble(values[values.length-2]);
if(currentEValue < ev){
blatResults.add(line);
}
}
reader.close();
URL
eValue
blatResults
0.00015
Processor to parse the datatype URL
http://moby.ucalgary.ca/moby/MOBY-Central.pl
URL
result
Processor to parse the datatype URL
BioMOBY web service wrapper for the command line query tool 'BLAT'.
http://moby.ucalgary.ca/moby/MOBY-Central.pl
MobyBlat
www.bioinformatics.nl
blast8
dna
0
0
1000000
An e-mail address object.
www.bioinformatics.nl
some.user@domain.nl
email
http://moby.ucalgary.ca/moby/MOBY-Central.pl
Email
A BLAT job.
http://moby.ucalgary.ca/moby/MOBY-Central.pl
BlatJob
A database object.
blat
dataBase
http://moby.ucalgary.ca/moby/MOBY-Central.pl
DataBase
A generic user object.
www.bioinformatics.nl
client
user
http://moby.ucalgary.ca/moby/MOBY-Central.pl
User
FASTA formatted sequence
1
http://moby.ucalgary.ca/moby/MOBY-Central.pl
FASTA
a string
fasta
http://moby.ucalgary.ca/moby/MOBY-Central.pl
String
A generic password object.
www.bioinformatics.nl
testing
password
http://moby.ucalgary.ca/moby/MOBY-Central.pl
Password
Database name (Danio_rerio_Genome for Zebra Fish)
Sequences in fasta format