pub struct BaseModifications(/* private fields */);
Expand description
Base modifications.
Implementations§
Source§impl BaseModifications
impl BaseModifications
Sourcepub fn parse(
s: &str,
is_reverse_complemented: bool,
sequence: &Sequence,
) -> Result<Self, ParseError>
pub fn parse( s: &str, 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(
"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 copy of the value. Read more
1.0.0 · 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
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 Eq 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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.