|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mssm.crover.tools.blast.BlastCommand
This implementation wraps around Blast. It is responsible for knowing the peculiarities of the Blast installation (executable location, database directory path, etc.).
| Field Summary | |
static int |
OUTPUT_PAIRWISE
|
static int |
OUTPUT_XML
Selects the XML Blast output. |
static int |
TYPE_DNA
Sequence is nucleotide. |
static int |
TYPE_PROTEIN
Sequence is a protein. |
| Constructor Summary | |
BlastCommand()
|
|
BlastCommand(BlastContext ctx)
|
|
| Method Summary | |
BlastResult |
blast(int seqType,
BiologicalSequence seq,
java.lang.String database)
Runs BLAST. |
BlastResult |
blast(java.lang.String blastType,
BiologicalSequence querySequence,
java.lang.String database)
|
boolean |
checkSequenceDB(java.lang.String dbname,
java.lang.String path)
Checks if the command is installed on this machine. |
void |
copy(java.io.File from,
java.io.File dest)
|
void |
copy(java.io.InputStream is,
java.io.File dest)
|
BlastResult |
createBlastResult(java.io.StringReader sr)
Creates a BlastResult from a StringReader. |
void |
dispose(java.io.File Output)
|
java.lang.String |
getBlastType(int seqType,
java.lang.String database)
Predicts the BLAST program to be used depending on the sequence type (DNA or protein) and the type of sequence in the database. |
BlastContext |
getContext()
|
boolean |
installed(java.lang.String cmdPath,
java.lang.String execName)
Checks if the command is installed on this machine. |
static void |
main(java.lang.String[] args)
|
void |
read(java.io.InputStream is)
|
java.io.File |
run(int seqType,
java.io.File seqFile,
java.lang.String database)
Run BLAST with a (multiple) sequence file. |
java.io.File |
run(java.lang.String blastType,
BiologicalSequence querySequence,
java.lang.String database)
Run BLAST with a query sequence. |
java.io.File |
run(java.lang.String blastType,
BiologicalSequence querySequence,
java.lang.String database,
int mValue)
Predicts the product of the genes encoded by the sequence passed as argument. |
java.io.File |
run(java.lang.String blastType,
java.io.File seqFile,
java.lang.String database,
int mValue)
Runs BLAST on the sequences encoded by the sequence(s) in the File seqFile passed as argument. |
java.io.File |
runbl2(java.lang.String blastType,
BiologicalSequence querySequence,
BiologicalSequence subjSequence)
|
void |
setContext(BlastContext ctx)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int OUTPUT_PAIRWISE
public static final int OUTPUT_XML
public static final int TYPE_PROTEIN
public static final int TYPE_DNA
| Constructor Detail |
public BlastCommand()
public BlastCommand(BlastContext ctx)
| Method Detail |
public boolean installed(java.lang.String cmdPath,
java.lang.String execName)
public boolean checkSequenceDB(java.lang.String dbname,
java.lang.String path)
throws DatabaseNotFound
DatabaseNotFound
public BlastResult blast(int seqType,
BiologicalSequence seq,
java.lang.String database)
throws java.io.FileNotFoundException,
UnsupportedFormat,
CommandNotInstalled,
DatabaseNotFound
java.io.FileNotFoundException
UnsupportedFormat
CommandNotInstalled
DatabaseNotFoundblast(int, edu.mssm.crover.representation.BiologicalSequence, java.lang.String)
public BlastResult blast(java.lang.String blastType,
BiologicalSequence querySequence,
java.lang.String database)
throws java.io.FileNotFoundException,
UnsupportedFormat,
CommandNotInstalled,
DatabaseNotFound
java.io.FileNotFoundException - Thrown when there is a Runtime error
during the execution of run, such as the tmp directory becoming full or if the execution of BLAST fails.
UnsupportedFormat - Thrown when the output file is not in XML format
CommandNotInstalled
DatabaseNotFound
public java.lang.String getBlastType(int seqType,
java.lang.String database)
throws DatabaseNotFound
DatabaseNotFound
public java.io.File run(java.lang.String blastType,
BiologicalSequence querySequence,
java.lang.String database)
throws CommandNotInstalled,
DatabaseNotFound
CommandNotInstalled
DatabaseNotFoundrun(java.lang.String, edu.mssm.crover.representation.BiologicalSequence, java.lang.String)
public java.io.File run(int seqType,
java.io.File seqFile,
java.lang.String database)
throws CommandNotInstalled,
DatabaseNotFound
CommandNotInstalled
DatabaseNotFoundrun(java.lang.String, edu.mssm.crover.representation.BiologicalSequence, java.lang.String)
public java.io.File run(java.lang.String blastType,
java.io.File seqFile,
java.lang.String database,
int mValue)
throws CommandNotInstalled,
DatabaseNotFound
CommandNotInstalled
DatabaseNotFound
public BlastResult createBlastResult(java.io.StringReader sr)
throws CommandNotInstalled,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
CommandNotInstalled
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public java.io.File run(java.lang.String blastType,
BiologicalSequence querySequence,
java.lang.String database,
int mValue)
throws CommandNotInstalled,
DatabaseNotFound
blastType - The type of blast analysis to be performed (blastp, tblastn, tblastx, blastx, blastn).querySequence - File that contains the sequence to be used as query.
CommandNotInstalled
DatabaseNotFoundpublic void read(java.io.InputStream is)
public void copy(java.io.InputStream is,
java.io.File dest)
public void copy(java.io.File from,
java.io.File dest)
public void dispose(java.io.File Output)
public BlastContext getContext()
public void setContext(BlastContext ctx)
public java.io.File runbl2(java.lang.String blastType,
BiologicalSequence querySequence,
BiologicalSequence subjSequence)
throws CommandNotInstalled
CommandNotInstalledpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||