phenopackets 0.2.2-post2

Rust bindings for Phenopacket Schema
Documentation
// This file is @generated by prost-build.

#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

/// An anonymous phenotypic description of an individual or biosample with potential genes of interest and/or diagnoses.
///
/// This is a bundle of high-level concepts with no specifically defined relational concepts. It is expected that the
/// resources sharing the phenopackets will define and enforce their own semantics and level of requirements for included
/// fields.
#[derive(Clone, PartialEq, ::prost::Message)]
#[cfg_attr(
    feature = "serde",
    derive(Serialize, Deserialize),
    serde(rename_all = "camelCase")
)]
pub struct Phenopacket {
    /// An identifier specific for this phenopacket.
    #[prost(string, tag = "1")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "String::is_empty", default)
    )]
    pub id: ::prost::alloc::string::String,
    /// The individual representing the focus of this packet - e.g. the proband in rare disease cases or cancer patient
    #[prost(message, optional, tag = "2")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Option::is_none", default)
    )]
    pub subject:
        ::core::option::Option<crate::generated::org_phenopackets_schema_v2_core::Individual>,
    /// Phenotypic features relating to the subject of the phenopacket
    #[prost(message, repeated, tag = "3")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub phenotypic_features: ::prost::alloc::vec::Vec<
        crate::generated::org_phenopackets_schema_v2_core::PhenotypicFeature,
    >,
    /// Quantifiable measurements related to the individual
    #[prost(message, repeated, tag = "4")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub measurements:
        ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::Measurement>,
    /// Biosample(s) derived from the patient or a collection of biosamples in isolation
    #[prost(message, repeated, tag = "5")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub biosamples:
        ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::Biosample>,
    #[prost(message, repeated, tag = "6")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub interpretations:
        ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::Interpretation>,
    /// Field for disease identifiers - could be used for listing either diagnosed or suspected conditions. The
    /// resources using these fields should define what this represents in their context.
    #[prost(message, repeated, tag = "7")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub diseases:
        ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::Disease>,
    #[prost(message, repeated, tag = "9")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub medical_actions:
        ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::MedicalAction>,
    /// Pointer to the relevant file(s) for the individual
    #[prost(message, repeated, tag = "10")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub files: ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::File>,
    /// Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
    #[prost(message, optional, tag = "11")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Option::is_none", default)
    )]
    pub meta_data:
        ::core::option::Option<crate::generated::org_phenopackets_schema_v2_core::MetaData>,
}
/// Phenotype, sample and pedigree data required for a genomic diagnosis.
/// Equivalent to the Genomics England InterpretationRequestRD
/// <https://github.com/genomicsengland/GelReportModels/blob/master/schemas/IDLs/org.gel.models.report.avro/5.0.0/InterpretationRequestRD.avdl>
#[derive(Clone, PartialEq, ::prost::Message)]
#[cfg_attr(
    feature = "serde",
    derive(Serialize, Deserialize),
    serde(rename_all = "camelCase")
)]
pub struct Family {
    /// An identifier specific for this family.
    #[prost(string, tag = "1")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "String::is_empty", default)
    )]
    pub id: ::prost::alloc::string::String,
    /// The individual representing the focus of this packet - e.g. the proband in rare disease cases or cancer patient
    #[prost(message, optional, tag = "2")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Option::is_none", default)
    )]
    pub proband: ::core::option::Option<Phenopacket>,
    /// Individuals related in some way to the patient. For instance, the individuals may be genetically related or may
    /// be members of a cohort. If this field is used, then  it is expected that a pedigree will be included for
    /// genetically related individuals for use cases such as genomic diagnostics. If a phenopacket is being used to
    /// describe one member of a cohort, then in general one phenopacket will be created for each of the individuals in
    /// the cohort.
    #[prost(message, repeated, tag = "3")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub relatives: ::prost::alloc::vec::Vec<Phenopacket>,
    /// flag to indicate that the parents of the proband are consanguinous
    #[prost(bool, tag = "7")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "std::ops::Not::not", default)
    )]
    pub consanguinous_parents: bool,
    /// The pedigree defining the relations between the proband and their relatives. Pedigree.individual_id should
    /// map to the PhenoPacket.Individual.id
    #[prost(message, optional, tag = "4")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Option::is_none", default)
    )]
    pub pedigree:
        ::core::option::Option<crate::generated::org_phenopackets_schema_v2_core::Pedigree>,
    /// Pointer to the relevant file(s) for the family. These should be files relating to one or more of the family
    /// members e.g a multi-sample VCF. Files relating exclusively to individual phenopackets should be contained in the
    /// Phenopacket.
    #[prost(message, repeated, tag = "5")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub files: ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::File>,
    /// Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
    #[prost(message, optional, tag = "6")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Option::is_none", default)
    )]
    pub meta_data:
        ::core::option::Option<crate::generated::org_phenopackets_schema_v2_core::MetaData>,
}
/// A group of individuals related in some phenotypic or genotypic aspect.
#[derive(Clone, PartialEq, ::prost::Message)]
#[cfg_attr(
    feature = "serde",
    derive(Serialize, Deserialize),
    serde(rename_all = "camelCase")
)]
pub struct Cohort {
    #[prost(string, tag = "1")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "String::is_empty", default)
    )]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "String::is_empty", default)
    )]
    pub description: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub members: ::prost::alloc::vec::Vec<Phenopacket>,
    /// Pointer to relevant file(s) for the cohort. Files relating exclusively to individual phenopackets should be
    /// contained in the Phenopacket.
    #[prost(message, repeated, tag = "4")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Vec::is_empty", default)
    )]
    pub files: ::prost::alloc::vec::Vec<crate::generated::org_phenopackets_schema_v2_core::File>,
    /// Structured definitions of the resources and ontologies used within the phenopacket. REQUIRED
    #[prost(message, optional, tag = "5")]
    #[cfg_attr(
        feature = "serde",
        serde(skip_serializing_if = "Option::is_none", default)
    )]
    pub meta_data:
        ::core::option::Option<crate::generated::org_phenopackets_schema_v2_core::MetaData>,
}