CollectionV3

Struct CollectionV3 

Source
pub struct CollectionV3 { /* private fields */ }
Expand description

Collection V3 - manages metadata for AGC archives

Implementations§

Source§

impl CollectionV3

Source

pub fn new() -> Self

Source

pub fn set_config( &mut self, segment_size: u32, kmer_length: u32, batch_size: Option<usize>, )

Source

pub fn prepare_for_compression(&mut self, archive: &mut Archive) -> Result<()>

Source

pub fn prepare_for_decompression(&mut self, archive: &Archive) -> Result<()>

Source

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)

Source

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

Source

pub fn get_samples_list(&self, sorted: bool) -> Vec<String>

Get list of samples

Source

pub fn get_no_samples(&self) -> usize

Get number of samples

Source

pub fn get_no_contigs(&self, sample_name: &str) -> Option<usize>

Get number of contigs in a sample

Source

pub fn get_no_contig_batches(&self, archive: &Archive) -> Result<usize>

Get number of contig batches from archive

Source

pub fn get_contig_list(&self, sample_name: &str) -> Option<Vec<String>>

Get contig list for a sample

Source

pub fn get_sample_desc( &self, sample_name: &str, ) -> Option<Vec<(String, Vec<SegmentDesc>)>>

Get sample descriptor with all contigs and segments

Source

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

Source

pub fn get_params(&self) -> (u32, u32)

Get configuration parameters (segment_size, kmer_length)

Source

pub fn store_batch_sample_names(&mut self, archive: &mut Archive) -> Result<()>

Store sample names batch (with ZSTD compression)

Source

pub fn load_batch_sample_names(&mut self, archive: &mut Archive) -> Result<()>

Load sample names batch (with ZSTD decompression)

Source

pub fn load_contig_batch( &mut self, archive: &mut Archive, id_batch: usize, ) -> Result<()>

Load a batch of contigs (names + details)

Source

pub fn store_contig_batch( &mut self, archive: &mut Archive, id_from: usize, id_to: usize, ) -> Result<()>

Store a batch of contigs (names + details)

Trait Implementations§

Source§

impl Default for CollectionV3

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.