Closeable, AutoCloseable, Iterable<FastqRecord>, Iterator<FastqRecord>public class FastqReader extends Object implements Iterator<FastqRecord>, Iterable<FastqRecord>, Closeable
| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
FastqReader.LineType |
Enum of the types of lines we see in Fastq.
|
| Constructor | Description |
|---|---|
FastqReader(BufferedReader reader) |
|
FastqReader(File file) |
|
FastqReader(File file,
boolean skipBlankLines) |
Constructor
|
FastqReader(File file,
BufferedReader reader) |
|
FastqReader(File file,
BufferedReader reader,
boolean skipBlankLines) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
checkLine(String line,
FastqReader.LineType kind) |
Checks that the line is neither null (representing EOF) or empty (blank line in file).
|
void |
close() |
|
protected String |
error(String msg) |
Generates an error message with line number information.
|
File |
getFile() |
|
int |
getLineNumber() |
|
boolean |
hasNext() |
|
Iterator<FastqRecord> |
iterator() |
WARNING: Despite the fact that this class implements Iterable, calling iterator() method does not
start iteration from the beginning of the file.
|
FastqRecord |
next() |
|
void |
remove() |
|
String |
toString() |
forEach, spliteratorforEachRemainingpublic FastqReader(File file)
public FastqReader(File file, boolean skipBlankLines)
file - of FASTQ to read read. Will be opened with htsjdk.samtools.util.IOUtil.openFileForBufferedReadingskipBlankLines - should we skip blank lines ?public FastqReader(BufferedReader reader)
public FastqReader(File file, BufferedReader reader, boolean skipBlankLines)
file - Name of FASTQ being read, or null if not known.reader - input reader . Will be closed by the close methodskipBlankLines - should we skip blank lines ?public FastqReader(File file, BufferedReader reader)
public boolean hasNext()
hasNext in interface Iterator<FastqRecord>public FastqRecord next()
next in interface Iterator<FastqRecord>public void remove()
remove in interface Iterator<FastqRecord>public Iterator<FastqRecord> iterator()
iterator in interface Iterable<FastqRecord>public int getLineNumber()
public File getFile()
public void close()
close in interface AutoCloseableclose in interface Closeableprotected void checkLine(String line, FastqReader.LineType kind)