Struct noodles_sam::record::data::field::value::base_modifications::BaseModifications
source · 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
source§fn eq(&self, other: &BaseModifications) -> bool
fn eq(&self, other: &BaseModifications) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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<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.