pub struct Record { /* private fields */ }
Expand description
An instance of a Fastx Record. This is a two attribute object containing the sequence ID and the Sequence.
Implementations
sourceimpl Record
impl Record
sourcepub fn new() -> Self
pub fn new() -> Self
Usage
Creates a new instance of a [Record]
let record = fxread::Record::new();
assert!(record.empty());
sourcepub fn set_id(&mut self, token: String)
pub fn set_id(&mut self, token: String)
Usage
Sets the ID of the record
let mut record = fxread::Record::new();
record.set_id("some_id".to_string());
assert_eq!(record.id(), "some_id");
sourcepub fn set_seq(&mut self, token: String)
pub fn set_seq(&mut self, token: String)
Usage
Sets the Sequence of the record
let mut record = fxread::Record::new();
record.set_seq("ACGT".to_string());
assert_eq!(record.seq(), "ACGT");
sourcepub fn valid(&self) -> bool
pub fn valid(&self) -> bool
Validates that the record is not partially constructed or composed of unexpected nucleotides
sourcepub fn seq_rev_comp(&self) -> Result<String>
pub fn seq_rev_comp(&self) -> Result<String>
Reverse Complements the sequence This will also convert the sequence to uppercase
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more