stratiphy 0.1.3

Phenotype-driven identification of disease subgroups
Documentation
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusteringWorkflowResult {
    #[prost(double, repeated, tag = "1")]
    pub affinity_matrix: ::prost::alloc::vec::Vec<f64>,
    #[prost(message, repeated, tag = "2")]
    pub cluster_labels: ::prost::alloc::vec::Vec<clustering_workflow_result::ClusterLabels>,
    #[prost(uint32, repeated, tag = "3")]
    pub sort_order: ::prost::alloc::vec::Vec<u32>,
    #[prost(message, optional, tag = "4")]
    pub gap_values: ::core::option::Option<GapValues>,
    #[prost(message, optional, tag = "5")]
    pub split_check: ::core::option::Option<SplitCheck>,
    #[prost(message, repeated, tag = "6")]
    pub term_associations: ::prost::alloc::vec::Vec<clustering_workflow_result::TermAssociations>,
}
/// Nested message and enum types in `ClusteringWorkflowResult`.
pub mod clustering_workflow_result {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct ClusterLabels {
        #[prost(uint32, tag = "1")]
        pub k: u32,
        #[prost(uint32, repeated, tag = "2")]
        pub labels: ::prost::alloc::vec::Vec<u32>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TermAssociations {
        #[prost(uint32, tag = "1")]
        pub k: u32,
        #[prost(message, repeated, tag = "2")]
        pub associations: ::prost::alloc::vec::Vec<super::TermAssociation>,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GapValues {
    #[prost(map = "uint32, double", tag = "1")]
    pub log_wk_data: ::std::collections::HashMap<u32, f64>,
    #[prost(message, repeated, tag = "2")]
    pub log_wk_rand: ::prost::alloc::vec::Vec<gap_values::LogWkRand>,
}
/// Nested message and enum types in `GapValues`.
pub mod gap_values {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct LogWkRand {
        #[prost(uint32, tag = "1")]
        pub k: u32,
        #[prost(double, repeated, tag = "2")]
        pub values: ::prost::alloc::vec::Vec<f64>,
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SplitCheck {
    #[prost(bool, tag = "1")]
    pub should_split: bool,
    #[prost(double, tag = "2")]
    pub split_proba: f64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TermCount {
    #[prost(enumeration = "ObservationState", tag = "1")]
    pub state: i32,
    #[prost(uint32, tag = "2")]
    pub count: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TermAssociation {
    #[prost(string, tag = "1")]
    pub term_id: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub counts: ::prost::alloc::vec::Vec<term_association::TermCounts>,
    #[prost(double, tag = "3")]
    pub pval: f64,
    #[prost(double, optional, tag = "4")]
    pub corrected_pval: ::core::option::Option<f64>,
}
/// Nested message and enum types in `TermAssociation`.
pub mod term_association {
    /// cluster_id to term count.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TermCounts {
        #[prost(uint32, tag = "1")]
        pub k: u32,
        #[prost(message, repeated, tag = "2")]
        pub counts: ::prost::alloc::vec::Vec<super::TermCount>,
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClusteringWorkflowMetadata {
    /// Semantic versioning identifier, e.g. `0.3.0`.
    #[prost(string, tag = "1")]
    pub stratiphy_version: ::prost::alloc::string::String,
    /// HPO release identifier, e.g. `v2026-02-16`.
    #[prost(string, tag = "2")]
    pub hpo_version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StratiphyResult {
    #[prost(message, optional, tag = "1")]
    pub clustering_result: ::core::option::Option<ClusteringWorkflowResult>,
    #[prost(message, optional, tag = "2")]
    pub cohort: ::core::option::Option<super::stratiphy_model::Cohort>,
    #[prost(message, optional, tag = "3")]
    pub meta_data: ::core::option::Option<ClusteringWorkflowMetadata>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ObservationState {
    Unspecified = 0,
    Present = 1,
    Excluded = 2,
}

impl ObservationState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OBSERVATION_STATE_UNSPECIFIED",
            Self::Present => "OBSERVATION_STATE_PRESENT",
            Self::Excluded => "OBSERVATION_STATE_EXCLUDED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OBSERVATION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "OBSERVATION_STATE_PRESENT" => Some(Self::Present),
            "OBSERVATION_STATE_EXCLUDED" => Some(Self::Excluded),
            _ => None,
        }
    }
}