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§
Sourcefn print(
&self,
translator: &Translator,
config: &SummaryConfig,
id_group_translator: Option<&HashMap<ID, ID>>,
) -> String
fn print( &self, translator: &Translator, config: &SummaryConfig, id_group_translator: Option<&HashMap<ID, ID>>, ) -> String
format the node data
Sourcefn print_ol(
&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
format the node data in for json
Sourcefn print_json(
&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
format the node data in one line
Sourcefn summarize<K: Kmer, F: Iterator<Item = KmerDataItem<K, DI>>>(
items: F,
config: &SummaryConfig,
) -> (bool, Exts, Self)
fn summarize<K: Kmer, F: Iterator<Item = KmerDataItem<K, DI>>>( items: F, config: &SummaryConfig, ) -> (bool, Exts, Self)
summarize k-mers
Sourcefn summarizer() -> Summarizers
fn summarizer() -> Summarizers
check summerizer kind
Provided Methods§
get Tags and the overall count, returns None if data is insufficient
Sourcefn sum(&self) -> Option<u32>
fn sum(&self) -> Option<u32>
get the number of observations, returns None if data is insufficient
Sourcefn p_value(&self, _config: &SummaryConfig) -> Option<f32>
fn p_value(&self, _config: &SummaryConfig) -> Option<f32>
get the p-value, returns None if data is insufficient
Sourcefn fold_change(&self, _config: &SummaryConfig) -> Option<f32>
fn fold_change(&self, _config: &SummaryConfig) -> Option<f32>
get the log2(fold change), returns None if data is insufficient
Sourcefn sample_count(&self) -> Option<usize>
fn sample_count(&self) -> Option<usize>
get the number of samples the sequence was observed in, returns None if data is insufficient
Sourcefn edge_mults(&self) -> Option<&EdgeMult>
fn edge_mults(&self) -> Option<&EdgeMult>
get the coverage of the node edges
Sourcefn quality(&self) -> Option<BaseQuality>
fn quality(&self) -> Option<BaseQuality>
get the quality of the node k-mer
Sourcefn fix_edge_data(&mut self, _exts: Exts)
fn fix_edge_data(&mut self, _exts: Exts)
fix the EdgeMult by removing hanging edges
Sourcefn set_edge_mults(&mut self, _edge_mults: Option<EdgeMult>)
fn set_edge_mults(&mut self, _edge_mults: Option<EdgeMult>)
set the edge mults
Sourcefn mapped_ids(&self) -> Option<&[ID]>
fn mapped_ids(&self) -> Option<&[ID]>
get a reference to the mapped ids, returns None if data is insufficient
Sourcefn set_mapped_ids(&mut self, _mapped_ids: Box<[ID]>)
fn set_mapped_ids(&mut self, _mapped_ids: Box<[ID]>)
add mapped ids to the node data
Sourcefn mapped_edge_ids(&self) -> Option<&EdgeMap>
fn mapped_edge_ids(&self) -> Option<&EdgeMap>
get a reference to the IDs mapped to the node edges, returns None id data is insuffivient
Sourcefn set_mapped_edge_ids(&mut self, _mapped_edge_ids: Option<EdgeMap>)
fn set_mapped_edge_ids(&mut self, _mapped_edge_ids: Option<EdgeMap>)
add mapped IDs to the node’s edges
Sourcefn valid(&self, _config: &SummaryConfig) -> bool
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
impl SummaryData<u8> for u32
Number of observations for the k-mer