public class FastaIterator extends Object implements ProteinIterator
Modifier and Type | Field and Description |
---|---|
static char |
FORBIDDEN_CHARACTER
Character forbidden in protein sequences, will be removed.
|
Constructor and Description |
---|
FastaIterator(File fastaFile)
Constructor without sanity check.
|
FastaIterator(File fastaFile,
boolean sanityCheck)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the iterator.
|
Header |
getLastHeader()
Returns the header corresponding to the last protein.
|
Protein |
getNextProtein()
Returns the next protein.
|
double |
getProgressInPercent()
Returns the progress reading the file in percent.
|
public static final char FORBIDDEN_CHARACTER
public FastaIterator(File fastaFile) throws FileNotFoundException
fastaFile
- the FASTA fileFileNotFoundException
- exception thrown if the file could not be
foundpublic FastaIterator(File fastaFile, boolean sanityCheck) throws FileNotFoundException
fastaFile
- the FASTA filesanityCheck
- boolean indicating whether sanity check should be
conductedFileNotFoundException
- exception thrown if the file could not be
foundpublic double getProgressInPercent()
public Protein getNextProtein()
ProteinIterator
getNextProtein
in interface ProteinIterator
public Header getLastHeader()
public void close()
Copyright © 2021. All rights reserved.