org.utgenome.format.fasta
Class FASTAPullParser

java.lang.Object
  extended by org.utgenome.format.fasta.FASTAPullParser

public class FASTAPullParser
extends Object

A pull parser for FASTA format files

Author:
leo

Constructor Summary
  FASTAPullParser(File fastaFile)
          Create a pull parse for the given FASTA file.
  FASTAPullParser(File fastaFile, int bufferSize)
           
  FASTAPullParser(Reader reader)
          Create a pull parser from a given text reader
protected FASTAPullParser(String fastaFile, InputStream in, int bufferSize)
           
 
Method Summary
 void close()
           
static FASTAPullParser newGZIPFileReader(InputStream gzInput)
           
static FASTAPullParser newTARFileReader(InputStream tarFileInput)
           
static FASTAPullParser newTARGZFileReader(InputStream targzInput)
           
 String nextDescriptionLine()
           
 FASTASequence nextSequence()
          read the next fasta sequence;
 String nextSequenceLine()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FASTAPullParser

public FASTAPullParser(Reader reader)
Create a pull parser from a given text reader

Parameters:
reader -

FASTAPullParser

public FASTAPullParser(File fastaFile)
                throws IOException
Create a pull parse for the given FASTA file. The file can be text (.fa, .fasta, etc.), tar.gz or gz format.

Parameters:
fastaFile -
Throws:
IOException

FASTAPullParser

public FASTAPullParser(File fastaFile,
                       int bufferSize)
                throws IOException
Throws:
IOException

FASTAPullParser

protected FASTAPullParser(String fastaFile,
                          InputStream in,
                          int bufferSize)
                   throws IOException
Throws:
IOException
Method Detail

newTARFileReader

public static FASTAPullParser newTARFileReader(InputStream tarFileInput)
                                        throws IOException
Throws:
IOException

newTARGZFileReader

public static FASTAPullParser newTARGZFileReader(InputStream targzInput)
                                          throws IOException
Throws:
IOException

newGZIPFileReader

public static FASTAPullParser newGZIPFileReader(InputStream gzInput)
                                         throws IOException
Throws:
IOException

nextSequence

public FASTASequence nextSequence()
                           throws UTGBException,
                                  IOException
read the next fasta sequence;

Returns:
the next fasta sequence, or null when there is no more sequence to read.
Throws:
InvalidFormatException - when the input fasta data format is invalid
IOException
UTGBException

nextSequenceLine

public String nextSequenceLine()
                        throws IOException
Throws:
IOException

nextDescriptionLine

public String nextDescriptionLine()
                           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException


Copyright © 2007-2012 utgenome.org. All Rights Reserved.