#[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>,
}
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>,
}
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, 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(message, optional, tag = "3")]
pub nominal_test: ::core::option::Option<term_association::NominalTestResult>,
#[prost(message, optional, tag = "4")]
pub corrected_test: ::core::option::Option<term_association::CorrectedTestResult>,
#[prost(double, optional, tag = "5")]
pub sensitivity: ::core::option::Option<f64>,
#[prost(double, optional, tag = "6")]
pub effect: ::core::option::Option<f64>,
}
pub mod term_association {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TermCounts {
#[prost(uint32, tag = "1")]
pub cluster_id: u32,
#[prost(message, repeated, tag = "2")]
pub counts: ::prost::alloc::vec::Vec<term_counts::TermCount>,
}
pub mod term_counts {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TermCount {
#[prost(enumeration = "super::super::ObservationState", tag = "1")]
pub state: i32,
#[prost(uint32, tag = "2")]
pub count: u32,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NominalTestResult {
#[prost(double, tag = "1")]
pub pval: f64,
#[prost(oneof = "nominal_test_result::Kind", tags = "11, 12, 13")]
pub kind: ::core::option::Option<nominal_test_result::Kind>,
}
pub mod nominal_test_result {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FisherExactTest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FisherExactMcTest {
#[prost(uint64, tag = "1")]
pub n_iter: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChiSquareTest {
#[prost(uint32, tag = "1")]
pub df: u32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "11")]
Fet(FisherExactTest),
#[prost(message, tag = "12")]
FetMc(FisherExactMcTest),
#[prost(message, tag = "13")]
Chi2(ChiSquareTest),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CorrectedTestResult {
#[prost(double, tag = "1")]
pub pval: f64,
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TermAssociationMetadata {
#[prost(double, optional, tag = "1")]
pub alpha: ::core::option::Option<f64>,
#[prost(double, optional, tag = "2")]
pub beta: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusteringWorkflowMetadata {
#[prost(string, tag = "1")]
pub stratiphy_version: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub hpo_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub association_metadata: ::core::option::Option<TermAssociationMetadata>,
}
#[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 {
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",
}
}
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,
}
}
}