pub struct Sequence {
pub id: String,
pub sequence: Vec<u8>,
pub quality: Vec<u8>,
pub is_filtered: bool,
pub colorspace: Option<Vec<u8>>,
}Expand description
A single sequence record with ID, bases, quality scores, and filter status.
Mirrors Sequence.Sequence in Java. The sequence field stores
uppercase ASCII bases as bytes (matching Java’s toUpperCase() in the constructor).
The quality field stores raw ASCII quality characters as bytes.
Fields§
§id: String§sequence: Vec<u8>Uppercase ASCII nucleotide bases (A, C, G, T, N).
quality: Vec<u8>Raw ASCII quality characters (not yet offset-adjusted).
is_filtered: boolWhether this sequence was flagged as filtered (e.g. CASAVA filtered).
colorspace: Option<Vec<u8>>Colorspace representation, if applicable (SOLiD data).
Implementations§
Source§impl Sequence
impl Sequence
Sourcepub fn new(id: String, sequence: Vec<u8>, quality: Vec<u8>) -> Self
pub fn new(id: String, sequence: Vec<u8>, quality: Vec<u8>) -> Self
Create a new Sequence, converting the base sequence to uppercase.
The Java constructor calls sequence.toUpperCase() on the
sequence string, so we replicate that here.
Sourcepub fn heap_bytes(&self) -> usize
pub fn heap_bytes(&self) -> usize
Roughly how much heap this record holds, for the analysis pipeline’s
memory budgeting. The Sequence itself is not counted — only what it
owns, which is everything that scales with read length.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sequence
impl RefUnwindSafe for Sequence
impl Send for Sequence
impl Sync for Sequence
impl Unpin for Sequence
impl UnsafeUnpin for Sequence
impl UnwindSafe for Sequence
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.