public final class SingleFastqReader extends Object implements SingleReader, CanReportProgress, SequenceReaderCloseable<SingleRead>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE |
static QualityFormat |
DEFAULT_QUALITY_FORMAT
If FastqReader fails to guess file format, this value will be used by default.
|
| Constructor and Description |
|---|
SingleFastqReader(File file)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(File file,
boolean replaceWildcards)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(File file,
boolean replaceWildcards,
boolean lazyReads)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(File file,
CompressionType ct)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(File file,
QualityFormat format,
CompressionType ct)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(InputStream stream)
Creates a
SingleRead stream from a FASTQ stream with single-end reads data |
SingleFastqReader(InputStream stream,
boolean replaceWildcards)
Creates a
SingleRead stream from a FASTQ stream with single-end reads data |
SingleFastqReader(InputStream stream,
CompressionType ct)
Creates a
SingleRead stream from a FASTQ stream with single-end reads data |
SingleFastqReader(InputStream stream,
QualityFormat format,
CompressionType ct)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(InputStream stream,
QualityFormat format,
CompressionType ct,
boolean guessQualityFormat,
int bufferSize,
boolean replaceWildcards,
boolean lazyReads)
Creates a
SingleFastqReader stream from a FASTQ files with single-end read data |
SingleFastqReader(String file)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(String file,
boolean replaceWildcards)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(String file,
boolean replaceWildcards,
boolean lazyReads)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(String file,
CompressionType ct)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
SingleFastqReader(String file,
QualityFormat format,
CompressionType ct)
Creates a
SingleRead stream from a FASTQ files with single-end read data |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the output port
|
long |
getNumberOfReads()
For sequential readers returns the number of reads read till this moment, after reader is exhausted returns total
number of reads.
|
double |
getProgress() |
QualityFormat |
getQualityFormat() |
boolean |
isFinished() |
SingleFastqReader |
setTotalSize(long totalSize) |
SingleRead |
take() |
public static final int DEFAULT_BUFFER_SIZE
public static final QualityFormat DEFAULT_QUALITY_FORMAT
WrongQualityFormat exception in case of
failed format guessing.public SingleFastqReader(String file, boolean replaceWildcards, boolean lazyReads) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsreplaceWildcards - 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
to a minimum possible valueslazyReads - allow lazy initialization of single readsIOException - in case there is problem with reading from filespublic SingleFastqReader(String file, boolean replaceWildcards) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsreplaceWildcards - 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
to a minimum possible valuesIOException - in case there is problem with reading from filespublic SingleFastqReader(String file) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsIOException - in case there is problem with reading from filespublic SingleFastqReader(String file, CompressionType ct) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsct - type of compression (NONE, GZIP, etc)IOException - in case there is problem with reading from filespublic SingleFastqReader(String file, QualityFormat format, CompressionType ct) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsformat - read quality encoding format (use null to guess format automatically)ct - type of compression (NONE, GZIP, etc)IOException - in case there is problem with reading from filespublic SingleFastqReader(File file, boolean replaceWildcards, boolean lazyReads) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsreplaceWildcards - 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
to a minimum possible valueslazyReads - allow lazy initialization of single readsIOException - in case there is problem with reading from filespublic SingleFastqReader(File file, boolean replaceWildcards) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsreplaceWildcards - 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
to a minimum possible valuesIOException - in case there is problem with reading from filespublic SingleFastqReader(File file) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsIOException - in case there is problem with reading from filespublic SingleFastqReader(File file, CompressionType ct) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsct - type of compression (NONE, GZIP, etc)IOException - in case there is problem with reading from filespublic SingleFastqReader(File file, QualityFormat format, CompressionType ct) throws IOException
SingleRead stream from a FASTQ files with single-end read datafile - file with readsformat - read quality encoding format (use null to guess format automatically)ct - type of compression (NONE, GZIP, etc)IOException - in case there is problem with reading from filespublic SingleFastqReader(InputStream stream, CompressionType ct) throws IOException
SingleRead stream from a FASTQ stream with single-end reads datastream - stream with readsct - type of compression (NONE, GZIP, etc)IOException - in case there is problem with reading from filespublic SingleFastqReader(InputStream stream) throws IOException
SingleRead stream from a FASTQ stream with single-end reads datastream - stream with readsIOException - in case there is problem with reading from filespublic SingleFastqReader(InputStream stream, boolean replaceWildcards) throws IOException
SingleRead stream from a FASTQ stream with single-end reads datastream - stream with readsIOException - in case there is problem with reading from filespublic SingleFastqReader(InputStream stream, QualityFormat format, CompressionType ct) throws IOException
SingleRead stream from a FASTQ files with single-end read datastream - stream with readsformat - read quality encoding formatct - type of compression (NONE, GZIP, etc)IOException - in case there is problem with reading from filespublic SingleFastqReader(InputStream stream, QualityFormat format, CompressionType ct, boolean guessQualityFormat, int bufferSize, boolean replaceWildcards, boolean lazyReads) throws IOException
SingleFastqReader stream from a FASTQ files with single-end read datastream - stream with readsformat - read quality encoding format, if guessQualityFormat is true this value is used
as a default formatct - type of compression (NONE, GZIP, etc)guessQualityFormat - if true reader will try to guess quality string format, if guess fails format
will be used as a default quality string format, if format==null exception
will be thrownbufferSize - size of bufferreplaceWildcards - 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
to a minimum possible valueslazyReads - specifies whether created reads should be lazy initialized @throws
java.io.IOExceptionIOExceptionpublic SingleFastqReader setTotalSize(long totalSize)
public QualityFormat getQualityFormat()
public double getProgress()
getProgress in interface CanReportProgresspublic boolean isFinished()
isFinished in interface CanReportProgresspublic SingleRead take()
take in interface cc.redberry.pipe.OutputPort<SingleRead>public long getNumberOfReads()
SequenceReaderThis method is thread-safe.
getNumberOfReads in interface SequenceReader<SingleRead>public void close()
close in interface cc.redberry.pipe.OutputPortCloseable<SingleRead>close in interface AutoCloseableCopyright © 2018. All rights reserved.