pub struct CollectionV3 { /* private fields */ }Expand description
Collection V3 - manages metadata for AGC archives
Implementations§
Source§impl CollectionV3
impl CollectionV3
pub fn new() -> Self
pub fn set_config( &mut self, segment_size: u32, kmer_length: u32, batch_size: Option<usize>, )
pub fn prepare_for_compression(&mut self, archive: &mut Archive) -> Result<()>
pub fn prepare_for_decompression(&mut self, archive: &Archive) -> Result<()>
Sourcepub fn register_sample_contig(
&mut self,
sample_name: &str,
contig_name: &str,
) -> Result<bool>
pub fn register_sample_contig( &mut self, sample_name: &str, contig_name: &str, ) -> Result<bool>
Register a sample and contig (idempotent - adds contig to existing sample if needed)
Sourcepub fn add_segment_placed(
&mut self,
sample_name: &str,
contig_name: &str,
place: usize,
group_id: u32,
in_group_id: u32,
is_rev_comp: bool,
raw_length: u32,
) -> Result<()>
pub fn add_segment_placed( &mut self, sample_name: &str, contig_name: &str, place: usize, group_id: u32, in_group_id: u32, is_rev_comp: bool, raw_length: u32, ) -> Result<()>
Add segment placement information
Sourcepub fn get_samples_list(&self, sorted: bool) -> Vec<String>
pub fn get_samples_list(&self, sorted: bool) -> Vec<String>
Get list of samples
Sourcepub fn get_no_samples(&self) -> usize
pub fn get_no_samples(&self) -> usize
Get number of samples
Sourcepub fn get_no_contigs(&self, sample_name: &str) -> Option<usize>
pub fn get_no_contigs(&self, sample_name: &str) -> Option<usize>
Get number of contigs in a sample
Sourcepub fn get_no_contig_batches(&self, archive: &Archive) -> Result<usize>
pub fn get_no_contig_batches(&self, archive: &Archive) -> Result<usize>
Get number of contig batches from archive
Sourcepub fn get_contig_list(&self, sample_name: &str) -> Option<Vec<String>>
pub fn get_contig_list(&self, sample_name: &str) -> Option<Vec<String>>
Get contig list for a sample
Sourcepub fn get_sample_desc(
&self,
sample_name: &str,
) -> Option<Vec<(String, Vec<SegmentDesc>)>>
pub fn get_sample_desc( &self, sample_name: &str, ) -> Option<Vec<(String, Vec<SegmentDesc>)>>
Get sample descriptor with all contigs and segments
Sourcepub fn get_contig_desc(
&self,
sample_name: &str,
contig_name: &str,
) -> Option<Vec<SegmentDesc>>
pub fn get_contig_desc( &self, sample_name: &str, contig_name: &str, ) -> Option<Vec<SegmentDesc>>
Get contig descriptor for a specific contig in a sample
Sourcepub fn get_params(&self) -> (u32, u32)
pub fn get_params(&self) -> (u32, u32)
Get configuration parameters (segment_size, kmer_length)
Sourcepub fn store_batch_sample_names(&mut self, archive: &mut Archive) -> Result<()>
pub fn store_batch_sample_names(&mut self, archive: &mut Archive) -> Result<()>
Store sample names batch (with ZSTD compression)
Sourcepub fn load_batch_sample_names(&mut self, archive: &mut Archive) -> Result<()>
pub fn load_batch_sample_names(&mut self, archive: &mut Archive) -> Result<()>
Load sample names batch (with ZSTD decompression)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CollectionV3
impl RefUnwindSafe for CollectionV3
impl Send for CollectionV3
impl Sync for CollectionV3
impl Unpin for CollectionV3
impl UnwindSafe for CollectionV3
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