public final class RandomAccessFastqReader extends AbstractRandomAccessReader<SingleRead> implements SingleReader, AutoCloseable
currentRecordNumber, file, fileIndex| Constructor and Description |
|---|
RandomAccessFastqReader(File file,
FileIndex fileIndex,
boolean replaceWildcards,
boolean lazyReads)
Creates reader of specified FASTQ file with specified index.
|
RandomAccessFastqReader(RandomAccessFile file,
FileIndex fileIndex,
boolean replaceWildcards,
boolean lazyReads)
Creates reader of specified FASTQ file with specified index.
|
RandomAccessFastqReader(String file,
String fileIndex)
Creates reader of specified FASTQ file with specified index.
|
RandomAccessFastqReader(String file,
String fileIndex,
boolean replaceWildcards)
Creates reader of specified FASTQ file with specified index.
|
RandomAccessFastqReader(String file,
String fileIndex,
boolean replaceWildcards,
boolean lazyReads)
Creates reader of specified FASTQ file with specified index.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getNumberOfReads()
For sequential readers returns the number of reads read till this moment, after reader is exhausted returns total
number of reads.
|
protected void |
resetBufferOnSeek() |
protected void |
skip() |
SingleRead |
take()
Returns the next record or null if no more records exist.
|
SingleRead |
take(long recordNumber)
Returns the specified record or null if
recordNumber is greater than actual number of records in file. |
protected SingleRead |
take0() |
getCurrentRecordNumber, seekToRecordpublic RandomAccessFastqReader(String file, String fileIndex) throws IOException
file - FASTQ filefileIndex - file indexIOExceptionpublic RandomAccessFastqReader(String file, String fileIndex, boolean replaceWildcards) throws IOException
file - FASTQ filefileIndex - file indexreplaceWildcards - if true, all wildcards (like N) will be converted to a random basic letters
matching corresponding wildcards, and their corresponding quality scores will be set toIOExceptionpublic RandomAccessFastqReader(String file, String fileIndex, boolean replaceWildcards, boolean lazyReads) throws IOException
file - FASTQ filefileIndex - file indexreplaceWildcards - if true, all wildcards (like N) will be converted to a random basic letters
matching corresponding wildcards, and their corresponding quality scores will be set tolazyReads - create reads data on demandIOExceptionpublic RandomAccessFastqReader(File file, FileIndex fileIndex, boolean replaceWildcards, boolean lazyReads) throws FileNotFoundException
file - FASTQ filefileIndex - file indexreplaceWildcards - if true, all wildcards (like N) will be converted to a random basic letters
matching corresponding wildcards, and their corresponding quality scores will be set tolazyReads - create reads data on demandFileNotFoundExceptionpublic RandomAccessFastqReader(RandomAccessFile file, FileIndex fileIndex, boolean replaceWildcards, boolean lazyReads)
file - FASTQ filefileIndex - file indexreplaceWildcards - if true, all wildcards (like N) will be converted to a random basic letters
matching corresponding wildcards, and their corresponding quality scores will be set tolazyReads - create reads data on demandpublic long getNumberOfReads()
SequenceReaderThis method is thread-safe.
getNumberOfReads in interface SequenceReader<SingleRead>public SingleRead take()
AbstractRandomAccessReadertake in interface cc.redberry.pipe.OutputPort<SingleRead>take in class AbstractRandomAccessReader<SingleRead>public SingleRead take(long recordNumber)
AbstractRandomAccessReaderrecordNumber is greater than actual number of records in file.take in class AbstractRandomAccessReader<SingleRead>recordNumber - record numberrecordNumber is greater than actual number of records in
fileprotected SingleRead take0()
take0 in class AbstractRandomAccessReader<SingleRead>protected void skip()
skip in class AbstractRandomAccessReader<SingleRead>protected void resetBufferOnSeek()
resetBufferOnSeek in class AbstractRandomAccessReader<SingleRead>public void close()
close in interface cc.redberry.pipe.OutputPortCloseable<SingleRead>close in interface AutoCloseableCopyright © 2018. All rights reserved.