Skip to main content

HierarchicalCatalog

Struct HierarchicalCatalog 

Source
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: String

Catalog schema version

§created_at: String

Creation timestamp

§assemblies: Vec<HierarchicalAssembly>

All assemblies in the catalog

§standalone_distributions: Vec<FastaDistribution>

Standalone distributions without assembly reports

Implementations§

Source§

impl HierarchicalCatalog

Source

pub fn new() -> Self

Source

pub fn with_standalone_distribution(self, dist: FastaDistribution) -> Self

Add a standalone distribution (no assembly report)

Source

pub fn build_index(&self) -> CatalogIndex

Build indexes for fast matching

Source

pub fn get_distribution(&self, id: &str) -> Option<DistributionRef<'_>>

Get a distribution by ID

Source

pub fn load(path: &Path) -> Result<Self, Error>

Load from JSON file

§Errors

Returns an error if the file cannot be read or contains invalid JSON.

Source

pub fn save(&self, path: &Path) -> Result<(), Error>

Save to JSON file

§Errors

Returns an error if the file cannot be created or written.

Source

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 threshold
  • None if no assembly matches well enough
Source

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

Source§

fn clone(&self) -> HierarchicalCatalog

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HierarchicalCatalog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HierarchicalCatalog

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for HierarchicalCatalog

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HierarchicalCatalog

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,