data
Class FASTAParser

java.lang.Object
  extended by data.FASTAParser

public class FASTAParser
extends Object

Reads sequences in (multi-)FASTA format. Deletes translation stop character (*) at the end of a sequence.

This class provides static methods only and cannot be instantiated.

Author:
Jan Krumsiek
See Also:
Sequences

Method Summary
static Sequences loadSequences(InputStream input)
          Loads sequences from a given InputStream, requires multi-FASTA format data
static Sequences loadSequences(InputStream input, String organism)
          Loads sequences from a given InputStream, requires multi-FASTA format data
static Sequences loadSequences(String file)
          Loads sequences from a given multi-FASTA file
static Sequences loadSequences(String file, String organism)
          Loads sequences from a given multi-FASTA file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

loadSequences

public static Sequences loadSequences(String file)
                               throws IOException
Loads sequences from a given multi-FASTA file

Parameters:
file - path to the FASTA file
Returns:
Sequences object containing the read sequences
Throws:
IOException - if the file could not be read

loadSequences

public static Sequences loadSequences(String file,
                                      String organism)
                               throws IOException
Loads sequences from a given multi-FASTA file

Parameters:
file - path to the FASTA file
organism - optional organism identifier, null is treated as no organism (see also: ProteinManager)
Returns:
Sequences object containing the read sequences
Throws:
IOException - if the file could not be read

loadSequences

public static Sequences loadSequences(InputStream input)
                               throws IOException
Loads sequences from a given InputStream, requires multi-FASTA format data

Parameters:
input - input stream from which the sequence data will be read
Returns:
Sequences object containing the read sequences
Throws:
IOException

loadSequences

public static Sequences loadSequences(InputStream input,
                                      String organism)
                               throws IOException
Loads sequences from a given InputStream, requires multi-FASTA format data

Parameters:
input - input stream from which the sequence data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
Returns:
Sequences object containing the read sequences
Throws:
IOException