Skip to main content

SummaryData

Trait SummaryData 

Source
pub trait SummaryData<DI>:
    Clone
    + Debug
    + Send
    + Sync
    + PartialEq
    + Serialize
    + DeserializeOwned {
Show 22 methods // Required methods fn print( &self, translator: &Translator, config: &SummaryConfig, id_group_translator: Option<&HashMap<ID, ID>>, ) -> String; fn print_ol( &self, translator: &Translator, config: &SummaryConfig, id_group_translator: Option<&HashMap<ID, ID>>, ) -> String; fn print_json( &self, translator: &Translator, config: &SummaryConfig, id_group_translator: Option<&HashMap<ID, ID>>, ) -> String; fn mem(&self) -> usize; fn summarize<K: Kmer, F: Iterator<Item = KmerDataItem<K, DI>>>( items: F, config: &SummaryConfig, ) -> (bool, Exts, Self); fn summarizer() -> Summarizers; // Provided methods fn tags(&self) -> Option<Tags> { ... } fn sum(&self) -> Option<u32> { ... } fn ids(&self) -> Option<&[ID]> { ... } fn p_value(&self, _config: &SummaryConfig) -> Option<f32> { ... } fn fold_change(&self, _config: &SummaryConfig) -> Option<f32> { ... } fn sample_count(&self) -> Option<usize> { ... } fn edge_mults(&self) -> Option<&EdgeMult> { ... } fn quality(&self) -> Option<BaseQuality> { ... } fn fix_edge_data(&mut self, _exts: Exts) { ... } fn set_edge_mults(&mut self, _edge_mults: Option<EdgeMult>) { ... } fn mapped_ids(&self) -> Option<&[ID]> { ... } fn set_mapped_ids(&mut self, _mapped_ids: Box<[ID]>) { ... } fn mapped_edge_ids(&self) -> Option<&EdgeMap> { ... } fn set_mapped_edge_ids(&mut self, _mapped_edge_ids: Option<EdgeMap>) { ... } fn join_test(&self, other: &Self) -> bool { ... } fn valid(&self, _config: &SummaryConfig) -> bool { ... }
}
Expand description

Trait for summarizing k-mers, determines the data saved in the graph nodes

Required Methods§

Source

fn print( &self, translator: &Translator, config: &SummaryConfig, id_group_translator: Option<&HashMap<ID, ID>>, ) -> String

format the node data

Source

fn print_ol( &self, translator: &Translator, config: &SummaryConfig, id_group_translator: Option<&HashMap<ID, ID>>, ) -> String

format the node data in for json

Source

fn print_json( &self, translator: &Translator, config: &SummaryConfig, id_group_translator: Option<&HashMap<ID, ID>>, ) -> String

format the node data in one line

Source

fn mem(&self) -> usize

get the size of the structure, including contents of boxed slices

Source

fn summarize<K: Kmer, F: Iterator<Item = KmerDataItem<K, DI>>>( items: F, config: &SummaryConfig, ) -> (bool, Exts, Self)

summarize k-mers

Source

fn summarizer() -> Summarizers

check summerizer kind

Provided Methods§

Source

fn tags(&self) -> Option<Tags>

get Tags and the overall count, returns None if data is insufficient

Source

fn sum(&self) -> Option<u32>

get the number of observations, returns None if data is insufficient

Source

fn ids(&self) -> Option<&[ID]>

get the IDs, returns None if data is insufficient

Source

fn p_value(&self, _config: &SummaryConfig) -> Option<f32>

get the p-value, returns None if data is insufficient

Source

fn fold_change(&self, _config: &SummaryConfig) -> Option<f32>

get the log2(fold change), returns None if data is insufficient

Source

fn sample_count(&self) -> Option<usize>

get the number of samples the sequence was observed in, returns None if data is insufficient

Source

fn edge_mults(&self) -> Option<&EdgeMult>

get the coverage of the node edges

Source

fn quality(&self) -> Option<BaseQuality>

get the quality of the node k-mer

Source

fn fix_edge_data(&mut self, _exts: Exts)

fix the EdgeMult by removing hanging edges

Source

fn set_edge_mults(&mut self, _edge_mults: Option<EdgeMult>)

set the edge mults

Source

fn mapped_ids(&self) -> Option<&[ID]>

get a reference to the mapped ids, returns None if data is insufficient

Source

fn set_mapped_ids(&mut self, _mapped_ids: Box<[ID]>)

add mapped ids to the node data

Source

fn mapped_edge_ids(&self) -> Option<&EdgeMap>

get a reference to the IDs mapped to the node edges, returns None id data is insuffivient

Source

fn set_mapped_edge_ids(&mut self, _mapped_edge_ids: Option<EdgeMap>)

add mapped IDs to the node’s edges

Source

fn join_test(&self, other: &Self) -> bool

check if the data can be joined into one

Source

fn valid(&self, _config: &SummaryConfig) -> bool

check if node is valid according to: min kmer obs, group fraction, p-value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SummaryData<u8> for u32

Number of observations for the k-mer

Source§

fn print( &self, _: &Translator, _: &SummaryConfig, _: Option<&HashMap<ID, ID>>, ) -> String

Source§

fn print_ol( &self, _: &Translator, _: &SummaryConfig, _: Option<&HashMap<ID, ID>>, ) -> String

Source§

fn print_json( &self, _: &Translator, _: &SummaryConfig, _: Option<&HashMap<ID, ID>>, ) -> String

Source§

fn mem(&self) -> usize

Source§

fn sum(&self) -> Option<u32>

Source§

fn valid(&self, config: &SummaryConfig) -> bool

Source§

fn summarize<K: Kmer, F: Iterator<Item = KmerDataItem<K, Tag>>>( items: F, config: &SummaryConfig, ) -> (bool, Exts, Self)

Source§

fn summarizer() -> Summarizers

Implementors§