Class FastaReader<S extends Sequence<?>,C extends Compound>

java.lang.Object
org.biojava3.core.sequence.io.FastaReader<S,C>

public class FastaReader<S extends Sequence<?>,C extends Compound> extends Object
Use FastaReaderHelper as an example of how to use this class where FastaReaderHelper should be the primary class used to read Fasta files
Author:
Scooter Willis
  • Constructor Details

    • FastaReader

      public FastaReader(InputStream is, FastaHeaderParserInterface<S,C> headerParser, SequenceCreatorInterface<C> sequenceCreator)
      If you are going to use FileProxyProteinSequenceCreator then do not use this constructor because we need details about local file offsets for quick reads. InputStreams does not give you the name of the stream to access quickly via file seek. A seek in an inputstream is forced to read all the data so you don't gain anything.
      Parameters:
      br -
      headerParser -
      sequenceCreator -
    • FastaReader

      public FastaReader(File file, FastaHeaderParserInterface<S,C> headerParser, SequenceCreatorInterface<C> sequenceCreator) throws FileNotFoundException
      If you are going to use the FileProxyProteinSequenceCreator then you need to use this constructor because we need details about the location of the file.
      Parameters:
      file -
      headerParser -
      sequenceCreator -
      Throws:
      FileNotFoundException - if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
      SecurityException - if a security manager exists and its checkRead method denies read access to the file.
  • Method Details