pub struct BaseModifications(/* private fields */);Expand description
Base modifications.
Implementations§
Source§impl BaseModifications
impl BaseModifications
Sourcepub fn parse(
src: &[u8],
is_reverse_complemented: bool,
sequence: &Sequence,
) -> Result<Self, ParseError>
pub fn parse( src: &[u8], is_reverse_complemented: bool, sequence: &Sequence, ) -> Result<Self, ParseError>
Parses base modifications from a string.
§Examples
use noodles_sam::{
alignment::record_buf::Sequence,
record::data::field::value::{
base_modifications::{
group::{modification, Strand, UnmodifiedBase},
Group,
},
BaseModifications,
},
};
let is_reverse_complemented = false;
let sequence = Sequence::from(b"CACCCGATGACCGGCT");
let base_modifications = BaseModifications::parse(
b"C+m,1,3,0;",
is_reverse_complemented,
&sequence,
)?;
assert_eq!(base_modifications, BaseModifications::from(vec![
Group::new(
UnmodifiedBase::C,
Strand::Forward,
vec![modification::FIVE_METHYLCYTOSINE],
None,
vec![2, 11, 14],
)
]));Trait Implementations§
Source§impl AsRef<[Group]> for BaseModifications
impl AsRef<[Group]> for BaseModifications
Source§impl Clone for BaseModifications
impl Clone for BaseModifications
Source§fn clone(&self) -> BaseModifications
fn clone(&self) -> BaseModifications
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BaseModifications
impl Debug for BaseModifications
impl Eq for BaseModifications
Source§impl From<BaseModifications> for Vec<Group>
impl From<BaseModifications> for Vec<Group>
Source§fn from(base_modifications: BaseModifications) -> Self
fn from(base_modifications: BaseModifications) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BaseModifications
impl PartialEq for BaseModifications
impl StructuralPartialEq for BaseModifications
Auto Trait Implementations§
impl Freeze for BaseModifications
impl RefUnwindSafe for BaseModifications
impl Send for BaseModifications
impl Sync for BaseModifications
impl Unpin for BaseModifications
impl UnsafeUnpin for BaseModifications
impl UnwindSafe for BaseModifications
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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