pub struct DryIceReader<R, S = RawAsciiCodec, Q = RawQualityCodec, N = RawNameCodec, K = NoRecordKey> { /* private fields */ }Expand description
Reads sequencing records from a dryice file.
Implementations§
Source§impl DryIceReader<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
impl DryIceReader<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
Sourcepub fn builder() -> DryIceReaderBuilder<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey, ReadAllFields>
pub fn builder() -> DryIceReaderBuilder<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey, ReadAllFields>
Start building a new reader.
Source§impl<R: Read> DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
impl<R: Read> DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
Sourcepub fn new(inner: R) -> Result<Self, DryIceError>
pub fn new(inner: R) -> Result<Self, DryIceError>
Open a dryice file for reading with default codecs.
§Errors
Returns an error if the file header is missing, corrupt, or uses an unsupported format version.
Sourcepub fn with_two_bit_exact(
inner: R,
) -> Result<DryIceReader<R, TwoBitExactCodec, RawQualityCodec, RawNameCodec, NoRecordKey>, DryIceError>
pub fn with_two_bit_exact( inner: R, ) -> Result<DryIceReader<R, TwoBitExactCodec, RawQualityCodec, RawNameCodec, NoRecordKey>, DryIceError>
Open a reader configured for the built-in 2-bit exact sequence codec.
§Errors
Returns an error if the file header is missing, corrupt, or uses an unsupported format version.
Sourcepub fn with_codecs<S: SequenceCodec, Q: QualityCodec, N: NameCodec>(
inner: R,
) -> Result<DryIceReader<R, S, Q, N, NoRecordKey>, DryIceError>
pub fn with_codecs<S: SequenceCodec, Q: QualityCodec, N: NameCodec>( inner: R, ) -> Result<DryIceReader<R, S, Q, N, NoRecordKey>, DryIceError>
Open a reader configured for user-defined codecs.
§Errors
Returns an error if the file header is missing, corrupt, or uses an unsupported format version.
Sourcepub fn with_record_key<K2: RecordKey>(
inner: R,
) -> Result<DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, K2>, DryIceError>
pub fn with_record_key<K2: RecordKey>( inner: R, ) -> Result<DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, K2>, DryIceError>
Open a reader configured for a user-defined record-key type with default codecs.
§Errors
Returns an error if the file header is missing, corrupt, or uses an unsupported format version.
Sourcepub fn with_bytes8_key(
inner: R,
) -> Result<DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, Bytes8Key>, DryIceError>
pub fn with_bytes8_key( inner: R, ) -> Result<DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, Bytes8Key>, DryIceError>
Open a reader configured for the built-in 8-byte key type.
§Errors
Returns an error if the file header is missing, corrupt, or uses an unsupported format version.
Sourcepub fn with_bytes16_key(
inner: R,
) -> Result<DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, Bytes16Key>, DryIceError>
pub fn with_bytes16_key( inner: R, ) -> Result<DryIceReader<R, RawAsciiCodec, RawQualityCodec, RawNameCodec, Bytes16Key>, DryIceError>
Open a reader configured for the built-in 16-byte key type.
§Errors
Returns an error if the file header is missing, corrupt, or uses an unsupported format version.
Source§impl<R: Read> DryIceReader<R>
impl<R: Read> DryIceReader<R>
Sourcepub fn open<S: SequenceCodec, Q: QualityCodec, N: NameCodec, K: RecordKey>(
inner: R,
) -> Result<DryIceReader<R, S, Q, N, K>, DryIceError>
pub fn open<S: SequenceCodec, Q: QualityCodec, N: NameCodec, K: RecordKey>( inner: R, ) -> Result<DryIceReader<R, S, Q, N, K>, DryIceError>
Open a reader with fully user-specified codec and key type parameters.
This is the most general constructor, intended for library
authors who need to configure all four type parameters at
once. Most users should prefer new,
with_codecs, or the convenience
constructors instead.
§Errors
Returns an error if the file header is missing, corrupt, or uses an unsupported format version.
Source§impl<R: Read, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K: RecordKey> DryIceReader<R, S, Q, N, K>
impl<R: Read, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K: RecordKey> DryIceReader<R, S, Q, N, K>
Sourcepub fn record_key(&self) -> Result<K, DryIceError>
pub fn record_key(&self) -> Result<K, DryIceError>
Decode the current record’s accelerator key.
§Errors
Returns an error if no record key is present in the current block, if the
configured key type does not match the block’s key metadata, or if the key
bytes cannot be decoded into K.
Source§impl<R: Read, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K> DryIceReader<R, S, Q, N, K>
impl<R: Read, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K> DryIceReader<R, S, Q, N, K>
Sourcepub fn next_record(&mut self) -> Result<bool, DryIceError>
pub fn next_record(&mut self) -> Result<bool, DryIceError>
Advance to the next record in the file.
§Errors
Returns an error if a block header or block payload cannot be read or decoded, or if the block’s codec tags do not match the reader’s configured codecs.
Sourcepub fn into_records(self) -> DryIceRecords<R, S, Q, N, K> ⓘ
pub fn into_records(self) -> DryIceRecords<R, S, Q, N, K> ⓘ
Consume this reader into an iterator of owned SeqRecord values.
Trait Implementations§
Source§impl<R: Read, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K> SeqRecordLike for DryIceReader<R, S, Q, N, K>
impl<R: Read, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K> SeqRecordLike for DryIceReader<R, S, Q, N, K>
Auto Trait Implementations§
impl<R, S, Q, N, K> Freeze for DryIceReader<R, S, Q, N, K>where
R: Freeze,
impl<R, S, Q, N, K> RefUnwindSafe for DryIceReader<R, S, Q, N, K>
impl<R, S, Q, N, K> Send for DryIceReader<R, S, Q, N, K>
impl<R, S, Q, N, K> Sync for DryIceReader<R, S, Q, N, K>
impl<R, S, Q, N, K> Unpin for DryIceReader<R, S, Q, N, K>
impl<R, S, Q, N, K> UnsafeUnpin for DryIceReader<R, S, Q, N, K>where
R: UnsafeUnpin,
impl<R, S, Q, N, K> UnwindSafe for DryIceReader<R, S, Q, N, K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more