pub struct HierarchicalCatalog {
pub version: String,
pub created_at: String,
pub assemblies: Vec<HierarchicalAssembly>,
pub standalone_distributions: Vec<FastaDistribution>,
}Expand description
Hierarchical catalog with assemblies, versions, and distributions
Fields§
§version: StringCatalog schema version
created_at: StringCreation timestamp
assemblies: Vec<HierarchicalAssembly>All assemblies in the catalog
standalone_distributions: Vec<FastaDistribution>Standalone distributions without assembly reports
Implementations§
Source§impl HierarchicalCatalog
impl HierarchicalCatalog
pub fn new() -> Self
Sourcepub fn with_standalone_distribution(self, dist: FastaDistribution) -> Self
pub fn with_standalone_distribution(self, dist: FastaDistribution) -> Self
Add a standalone distribution (no assembly report)
Sourcepub fn build_index(&self) -> CatalogIndex
pub fn build_index(&self) -> CatalogIndex
Build indexes for fast matching
Sourcepub fn get_distribution(&self, id: &str) -> Option<DistributionRef<'_>>
pub fn get_distribution(&self, id: &str) -> Option<DistributionRef<'_>>
Get a distribution by ID
Sourcepub fn infer_base_assembly(
&self,
contigs: &[FastaContig],
min_match_rate: f64,
) -> Option<InferredAssembly>
pub fn infer_base_assembly( &self, contigs: &[FastaContig], min_match_rate: f64, ) -> Option<InferredAssembly>
Infer the base assembly version for a set of contigs by MD5 matching.
This method compares MD5 checksums from the input contigs against all known distributions in the catalog. Returns the best matching assembly version if the match rate exceeds the threshold.
§Arguments
contigs- The contigs to match (must have MD5 checksums)min_match_rate- Minimum fraction of contigs that must match (0.0 - 1.0)
§Returns
Some(InferredAssembly)if a match is found above the thresholdNoneif no assembly matches well enough
Sourcepub fn infer_base_assembly_default(
&self,
contigs: &[FastaContig],
) -> Option<InferredAssembly>
pub fn infer_base_assembly_default( &self, contigs: &[FastaContig], ) -> Option<InferredAssembly>
Infer base assembly with default threshold (90%)
Trait Implementations§
Source§impl Clone for HierarchicalCatalog
impl Clone for HierarchicalCatalog
Source§fn clone(&self) -> HierarchicalCatalog
fn clone(&self) -> HierarchicalCatalog
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 HierarchicalCatalog
impl Debug for HierarchicalCatalog
Source§impl Default for HierarchicalCatalog
impl Default for HierarchicalCatalog
Source§impl<'de> Deserialize<'de> for HierarchicalCatalog
impl<'de> Deserialize<'de> for HierarchicalCatalog
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HierarchicalCatalog
impl RefUnwindSafe for HierarchicalCatalog
impl Send for HierarchicalCatalog
impl Sync for HierarchicalCatalog
impl Unpin for HierarchicalCatalog
impl UnwindSafe for HierarchicalCatalog
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