procope.methods.interologs.blast
Class BlastHitFileParser

java.lang.Object
  extended by procope.methods.interologs.blast.BlastHitFileParser

public class BlastHitFileParser
extends Object

Contains static methods to parse hits from a BLAST hit file.

Note: The functions assume the output format generated by the -m 8 option in BLAST 2.x (tabular output).

This class is not instantiatble.

Author:
Jan Krumsiek

Method Summary
static BlastHits parseBlastHits(File hitfile)
          Parse BLAST hits from a given BLAST hit file in tabular format.
static BlastHits parseBlastHits(InputStream input)
          Parse BLAST hits from a given input stream.
static BlastHits parseBlastHits(String hitfile)
          Parse BLAST hits from a given BLAST hit file in tabular format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseBlastHits

public static BlastHits parseBlastHits(String hitfile)
                                throws IOException,
                                       ProCopeException
Parse BLAST hits from a given BLAST hit file in tabular format.

Parameters:
hitfile - BLAST hit file
Returns:
BLAST hits read from the hit file
Throws:
IOException - if the file could not be opened
ProCopeException - if the BLAST hit file format is not valid

parseBlastHits

public static BlastHits parseBlastHits(File hitfile)
                                throws IOException,
                                       ProCopeException
Parse BLAST hits from a given BLAST hit file in tabular format.

Parameters:
hitfile - BLAST hit file
Returns:
BLAST hits read from the hit file
Throws:
IOException - if the file could not be opened
ProCopeException - if the BLAST hit file format is not valid

parseBlastHits

public static BlastHits parseBlastHits(InputStream input)
                                throws ProCopeException
Parse BLAST hits from a given input stream.

Parameters:
input - input stream from which the BLAST hits will be read
Returns:
BLAST hits read from the stream
Throws:
ProCopeException - if the BLAST hit file format is not valid