// This file defines common types used in other parts of the schema. // There are no directly associated methods. syntax = "proto3"; import "google/protobuf/struct.proto"; package ga4ghmetadata; // When returning an HTTP error response, a server may also return a JSON formatted GAException // to better describe the error. message GAException { // Numerical error code int32 error_code = 1; // The error message. string message = 2; } // Identifier from a public database, describing a representation of // the record, and the relation between record and external reference // TODO: relation as OntologyTerm object (e.g. as IAO property). // Example: // { // "relation" : "reported_in", // "identifier" : "pubmed:25752754" // } // message ExternalIdentifier { // The CURIE of the identifier. string identifier = 1; // The relation between identifier and the object ist was reported from. string relation = 2; } // An ontology term describing an attribute. (e.g. the phenotype attribute // 'polydactyly' from HPO) message OntologyTerm { // Ontology term identifier - the CURIE for an ontology term. It // differs from the standard GA4GH schema's :ref:`id ` // in that it is a CURIE pointing to an information resource outside of the // scope of the schema or its resource implementation. string term_id = 1; // Ontology term - the label of the ontology term the termId is pointing to. string term_label = 2; } // A GeoLocation object provides information about a geographic position // related to a record. Examples could be: // - an address, e.g. of a lab performing an analysis // - provenance of an individual, obfuscated to a larger order administrative // entity (Suffolk, U.K.) // - a lat/long/alt position where an environmental sample was collected // The geographic point object uses the default units from the DCMI point scheme // http://dublincore.org/documents/dcmi-point/ // and avoids optional representation in non-standard units. message GeoLocation { // a text representation, preferably using standard geographic identification // elements, of the corresponding latitude,longitude(,altitude) // This representation serves the purposes to // - capture standard data entry parameters // - provide a sanity check for latitude,longitude values // Example: // - 34 Washington Blvd, Marina del Rey, CA 90292, United States // - Str Marasesti 5, 300077 Timisoara, Romania // - Heidelberg, Deutschland string label = 1; // an optional indication of the maximum precision to be derived from the // latitude,longitude values // Example: // Given a street address "Winterthurerstrasse 190, 8057 Zürich, Switzerland", // a privacy driven (destructive) obfuscation approach could recode this // to // "latitude": 47.37, "longitude": 8.54 // while providing // "precision":"city", "label": "Zürich, Switzerland" // ... indicating that the original location could correspond to any // latitude,longitude point value inside the administrative boundaries of // the city of Zürich, Switzerland string precision = 2; // signed decimal degrees (North, relative to Equator) double latitude = 3; // signed decimal degrees (East, relative to IERS Reference Meridian) double longitude = 4; // optional, e.g. for environmental samples double altitude = 5; } enum NullValue { // Null value. NULL_VALUE = 0; } // Type defining a collection of attributes associated with various protocol // records. Each attribute is a name that maps to an array of one or more // values. Values are chosen from both internal protobuf types and GA4GH. // Values should be split into array elements instead of using a separator // syntax that needs to parsed. message AttributeValue { oneof value { string string_value = 1; int64 int64_value = 2; int32 int32_value = 3; bool bool_value = 4; double double_value = 5; ExternalIdentifier external_identifier = 6; OntologyTerm ontology_term = 7; Experiment experiment = 8; Program program = 9; Analysis analysis = 10; NullValue null_value = 11; Attributes attributes = 12; AttributeValueList attribute_list = 13; } } message AttributeValueList { repeated AttributeValue values = 1; } message Attributes { map attr = 1; }