Skip to main content

SequenceCollectionMetadata

Struct SequenceCollectionMetadata 

Source
pub struct SequenceCollectionMetadata {
    pub digest: String,
    pub n_sequences: usize,
    pub names_digest: String,
    pub sequences_digest: String,
    pub lengths_digest: String,
    pub name_length_pairs_digest: Option<String>,
    pub sorted_name_length_pairs_digest: Option<String>,
    pub sorted_sequences_digest: Option<String>,
    pub file_path: Option<PathBuf>,
}
Expand description

Metadata for a sequence collection (parallel to SequenceMetadata). Contains the collection digest and level 1 digests for names, sequences, and lengths.

Fields§

§digest: String

Top-level seqcol digest

§n_sequences: usize

Number of sequences in the collection

§names_digest: String

Level 1 digest of names array

§sequences_digest: String

Level 1 digest of sequences array

§lengths_digest: String

Level 1 digest of lengths array

§name_length_pairs_digest: Option<String>

Ancillary: digest of name_length_pairs array

§sorted_name_length_pairs_digest: Option<String>

Ancillary: digest of sorted_name_length_pairs array (order-invariant coordinate system)

§sorted_sequences_digest: Option<String>

Ancillary: digest of sorted sequences array

§file_path: Option<PathBuf>

Optional path to the source file

Implementations§

Source§

impl SequenceCollectionMetadata

Source

pub fn from_sequences( sequences: &[SequenceRecord], file_path: Option<PathBuf>, ) -> Self

Compute metadata from sequence records (core digests only).

Source

pub fn compute_ancillary_digests(&mut self, sequences: &[SequenceRecord])

Compute ancillary digests (name_length_pairs, sorted_name_length_pairs, sorted_sequences) from sequence records. No-op if already computed.

Source

pub fn from_collection(collection: &SequenceCollection) -> Self

Create from an existing SequenceCollection

Source

pub fn to_lvl1(&self) -> SeqColDigestLvl1

Convert to SeqColDigestLvl1 for compatibility

Source

pub fn to_level1(&self) -> CollectionLevel1

Return level 1 representation (attribute digests with spec-compliant field names).

Trait Implementations§

Source§

impl Clone for SequenceCollectionMetadata

Source§

fn clone(&self) -> SequenceCollectionMetadata

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 SequenceCollectionMetadata

Source§

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

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

impl<'de> Deserialize<'de> for SequenceCollectionMetadata

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 SequenceCollectionMetadata

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, 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,