pub struct SequenceCollection {
pub metadata: SequenceCollectionMetadata,
pub sequences: Vec<SequenceRecord>,
}Expand description
A single Sequence Collection, which may or may not hold data.
Fields§
§metadata: SequenceCollectionMetadataCollection metadata (digest, level 1 digests, n_sequences, file_path)
sequences: Vec<SequenceRecord>Vector of SequenceRecords, which contain metadata (name, length, digests, alphabet) and optionally the actual sequence data.
Implementations§
Source§impl SequenceCollection
impl SequenceCollection
Sourcepub fn from_records(records: Vec<SequenceRecord>) -> Self
pub fn from_records(records: Vec<SequenceRecord>) -> Self
Create a SequenceCollection from a vector of SequenceRecords.
Trait Implementations§
Source§impl Clone for SequenceCollection
impl Clone for SequenceCollection
Source§fn clone(&self) -> SequenceCollection
fn clone(&self) -> SequenceCollection
Returns a duplicate 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 SequenceCollection
impl Debug for SequenceCollection
Source§impl Display for SequenceCollection
impl Display for SequenceCollection
Source§impl From<SequenceCollection> for SequenceCollectionRecord
impl From<SequenceCollection> for SequenceCollectionRecord
Source§fn from(collection: SequenceCollection) -> Self
fn from(collection: SequenceCollection) -> Self
Converts to this type from the input type.
Source§impl<'a> IntoIterator for &'a SequenceCollection
impl<'a> IntoIterator for &'a SequenceCollection
Source§impl IntoIterator for SequenceCollection
impl IntoIterator for SequenceCollection
Source§impl SequenceCollectionExt for SequenceCollection
impl SequenceCollectionExt for SequenceCollection
Source§fn from_fasta<P: AsRef<Path>>(file_path: P) -> Result<SequenceCollection>
fn from_fasta<P: AsRef<Path>>(file_path: P) -> Result<SequenceCollection>
Default behavior: read and write cache
Source§fn from_path_no_cache<P: AsRef<Path>>(
file_path: P,
) -> Result<SequenceCollection>
fn from_path_no_cache<P: AsRef<Path>>( file_path: P, ) -> Result<SequenceCollection>
No caching at all
Source§fn write_collection_rgsi<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
fn write_collection_rgsi<P: AsRef<Path>>(&self, file_path: P) -> Result<()>
Write the SequenceCollection to an RGSI file.
Source§fn write_rgsi(&self) -> Result<()>
fn write_rgsi(&self) -> Result<()>
Write the SequenceCollection to an RGSI file using the stored file path.
Source§fn to_record(&self) -> SequenceCollectionRecord
fn to_record(&self) -> SequenceCollectionRecord
Convert to a SequenceCollectionRecord for storage.
Source§fn write_fasta<P: AsRef<Path>>(
&self,
file_path: P,
line_width: Option<usize>,
) -> Result<()>
fn write_fasta<P: AsRef<Path>>( &self, file_path: P, line_width: Option<usize>, ) -> Result<()>
Write the SequenceCollection to a FASTA file.
fn from_rgsi<P: AsRef<Path>>(file_path: P) -> Result<SequenceCollection>
fn from_path_with_cache<P: AsRef<Path>>( file_path: P, read_cache: bool, write_cache: bool, ) -> Result<SequenceCollection>
Auto Trait Implementations§
impl Freeze for SequenceCollection
impl RefUnwindSafe for SequenceCollection
impl Send for SequenceCollection
impl Sync for SequenceCollection
impl Unpin for SequenceCollection
impl UnwindSafe for SequenceCollection
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