pub struct FiberseqData {
pub record: Record,
pub annotations: MolecularAnnotations,
pub ec: f32,
pub target_name: String,
pub rg: String,
pub center_position: Option<CenterPosition>,
}Fields§
§record: Record§annotations: MolecularAnnotations§ec: f32§target_name: String§rg: String§center_position: Option<CenterPosition>Implementations§
Source§impl FiberseqData
impl FiberseqData
pub fn new( record: Record, target_name: Option<&String>, filters: &FiberFilters, ) -> Self
pub fn dict_from_head_view(head_view: &HeaderView) -> HashMap<i32, String>
pub fn target_name_from_tid( tid: i32, target_dict: &HashMap<i32, String>, ) -> Option<&String>
pub fn from_records( records: Vec<Record>, head_view: &HeaderView, filters: &FiberFilters, ) -> Vec<Self>
Sourcepub fn msp(&self) -> AnnotationTypeView<'_>
pub fn msp(&self) -> AnnotationTypeView<'_>
View over msp annotations derived from self.annotations.
Sourcepub fn nuc(&self) -> AnnotationTypeView<'_>
pub fn nuc(&self) -> AnnotationTypeView<'_>
View over nuc annotations derived from self.annotations.
Sourcepub fn m6a(&self) -> AnnotationTypeView<'_>
pub fn m6a(&self) -> AnnotationTypeView<'_>
View over m6a annotations derived from self.annotations.
Sourcepub fn cpg(&self) -> AnnotationTypeView<'_>
pub fn cpg(&self) -> AnnotationTypeView<'_>
View over cpg annotations derived from self.annotations.
Sourcepub fn fire(&self) -> AnnotationTypeView<'_>
pub fn fire(&self) -> AnnotationTypeView<'_>
View over fire annotations derived from self.annotations.
Sourcepub fn serialize_annotations(&mut self)
pub fn serialize_annotations(&mut self)
Flush self.annotations onto the record’s MA-family aux tags. The
single write path for subcommands that edit nuc/msp/fire annotations;
call this, then hand the record to the BAM writer.
MM/ML are deliberately left untouched: this is an edit path, not a
basemod producer, so the record’s original MM/ML bytes pass through
byte-identically. Basemod types (m6a/cpg) are Encoding::MmMl (set when
they were read), so write_record excludes them from the MA tag rather
than writing basemod calls there too. Producers that synthesize or
modify basemods must use ma_io::write_record_with_basemods instead.
pub fn get_qname(&self) -> String
pub fn get_rq(&self) -> Option<f32>
Sourcepub fn platform(&self) -> SeqPlatform
pub fn platform(&self) -> SeqPlatform
Detect the sequencing platform (PacBio vs ONT) for this read from its aux tags, falling back to the read name if those were stripped.
pub fn get_hp(&self) -> String
pub fn write_msp(&self, reference: bool) -> String
pub fn write_nuc(&self, reference: bool) -> String
pub fn write_m6a(&self, reference: bool) -> String
pub fn write_cpg(&self, reference: bool) -> String
pub fn to_bed12( &self, reference: bool, starts: &[Option<i64>], lengths: &[Option<i64>], color: &str, ) -> String
pub fn all_header(simplify: bool, quality: bool) -> String
pub fn write_all(&self, simplify: bool, quality: bool) -> String
Trait Implementations§
Source§impl Clone for FiberseqData
impl Clone for FiberseqData
Source§fn clone(&self) -> FiberseqData
fn clone(&self) -> FiberseqData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FiberseqData
impl Debug for FiberseqData
Source§impl PartialEq for FiberseqData
impl PartialEq for FiberseqData
impl StructuralPartialEq for FiberseqData
Auto Trait Implementations§
impl Freeze for FiberseqData
impl RefUnwindSafe for FiberseqData
impl Send for FiberseqData
impl Sync for FiberseqData
impl Unpin for FiberseqData
impl UnsafeUnpin for FiberseqData
impl UnwindSafe for FiberseqData
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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
impl<T> Scalar 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.