Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Rich type representation in Attributes (#700)
Browse files Browse the repository at this point in the history
* Replace info with with Attributes close #607
Attributes message is moved to metadata.proto
info field was replaced for messages that had it with the field 'attributes'
renamed the 'vals' field to 'attr'
added to the available types in an attribute value message ('int32', 'int64', 'bool', 'double', 'null')
Added attributes to the Variant Annotation Set message and RNA expression messages.

* Remove references to info and update JSON example
Remove unused package

* Add attributes to reference/sets
Close #537

* Bump reused tag number
Remove unused import

* Merge for genotypes list

* Add maps and lists as possible attributes

* Add analysis and program, reorder

* Move messages to common
Merge assay_metadata in order to support as attributes.

* Clean up imports
Add tests that show basic attributes examples

* Update compiled proto
Remove assay metadata from tests
  • Loading branch information
david4096 authored Feb 3, 2017
1 parent ccaab4d commit 396784a
Show file tree
Hide file tree
Showing 30 changed files with 1,298 additions and 1,698 deletions.
4 changes: 2 additions & 2 deletions doc/source/api/assaymetadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Attribute Notes
*description* * additional, unstructured information about this Experiment
*created* * the time the record was created, in ISO8601
*updated* * the time the record was updated, in ISO8601
*info* * additional, structured information
*attributes* * additional, structured information
===================== ==========================================================

.. _assaymetadata_analysis:
Expand All @@ -55,5 +55,5 @@ Attribute Notes
*description* * additional, unstructured information about this Analysis
*created* * the time the record was created, in ISO8601
*updated* * the time the record was updated, in ISO8601
*info* * additional, structured information
*attributes* * additional, structured information
===================== ==========================================================
4 changes: 2 additions & 2 deletions doc/source/api/biometadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Attribute Notes
*individualId* * the *id* of the *Individual* this Biosample was derived from
*created* * the time the record was created, in ISO8601
*updated* * the time the record was updated, in ISO8601
*info* * additional, structured information
*attributes* * additional, structured information
===================== ==========================================================

.. _biometadata_Individual:
Expand Down Expand Up @@ -73,5 +73,5 @@ Attribute Notes
*sex* * OntologyTerm for the genetic sex of this individual.
*created* * the time the record was created, in ISO8601
*updated* * the time the record was updated, in ISO8601
*info* * additional, structured information
*attributes* * additional, structured information
===================== ==========================================================
21 changes: 16 additions & 5 deletions doc/source/appendix/json_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For example, here is the schema definition for Variants (with comments removed):
int64 end = 8;
string reference_bases = 9;
repeated string alternate_bases = 10;
map<string, google.protobuf.ListValue> info = 11;
Attributes attributes = 13;
repeated Call calls = 12;
}

Expand All @@ -53,10 +53,21 @@ Here is a serialized variant in JSON. It's a bit of an edge case in some respect
"C",
"CTATCTT"
],
"info": {
"variantfacts": ["is_interesting", "is_long"],
"numberOfPapers": ["11"]
},
"attributes": {
"attr": {
"numberOfPapers": {
"values": [
{"int32Value": 11}
]
},
"variantFacts": {
"values": [
{"stringValue": "is_long"},
{"stringValue": "is_interesting"}
]
}
}
}
}

Things to notice:
Expand Down
28 changes: 14 additions & 14 deletions python/ga4gh/schemas/ga4gh/allele_annotation_service_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 396784a

Please sign in to comment.