{"action":"created","comment":{"url":"https://api.github.com/repos/ga4gh/schemas/pulls/comments/59385974","id":59385974,"diff_hunk":"@@ -0,0 +1,133 @@\n+@namespace(\"org.ga4gh.models\")\n+\n+/**\n+This protocol defines the \"biodata\" objects, which can be considered data\n+representations of biological correlates.\n+*/\n+\n+protocol Biodata {\n+\n+  import idl \"common.avdl\";\n+  import idl \"metadata.avdl\";\n+\n+ /**\n+  An individual (or subject) typically corresponds to an individual\n+  human or other organism.\n+  */\n+  record Individual {\n+\n+    /**\n+    The Individual's :ref:`id <apidesign_object_ids>`. This is unique in the\n+    context of the server instance.\n+    */\n+    string id;\n+\n+    /**\n+    The Individual's :ref:`name <apidesign_object_names>`. This is a label or\n+    symbolic identifier for the individual.\n+    */\n+    union { null, string } name = null;\n+\n+    /**\n+    The Individual's description. This attribute contains human readable text.\n+    The \"description\" attributes should not contain any structured data.\n+    */\n+    union { null, string } description = null;\n+\n+    /**\n+    The :ref:`ISO 8601<metadata_date_time> time at which this Individual record\n+    was created.\n+    */\n+    string createDateTime;\n+\n+    /**\n+    The :ref:`ISO 8601<metadata_date_time> time at which this Individual record\n+    was updated.\n+    */\n+    string updateDateTime;\n+\n+    /**\n+    For a representation of an NCBI Taxon ID as an OntologyTerm, see\n+    NCBITaxon Ontology\n+      http://www.obofoundry.org/ontology/ncbitaxon.html\n+    For example, 'Homo sapiens' has the ID 9606. The NCBITaxon ontology ID for\n+    this is NCBITaxon:9606, which has the URI\n+    http://purl.obolibrary.org/obo/NCBITaxon_9606\n+    */\n+    union { null, OntologyTerm } species = null;\n+\n+    /**\n+    The genetic sex of this individual.\n+    Use `null` when unknown or not applicable.\n+    Recommended: PATO http://purl.obolibrary.org/obo/PATO_0020001; PATO_0020002\n+    */\n+    union { null, OntologyTerm } sex = null;\n+\n+    /**\n+    A map of additional information.\n+    */\n+    map<array<string>> info = {};\n+\n+  }\n+\n+ /**\n+  A BioSample refers to a unit of biological material from which the substrate\n+  molecules (e.g. genomic DNA, RNA, proteins) for molecular analyses (e.g.\n+  sequencing, array hybridisation, mass-spectrometry) are extracted. Examples\n+  would be a tissue biopsy, a single cell from a culture for single cell genome\n+  sequencing or a protein fraction from a gradient centrifugation.\n+  Several instances (e.g. technical replicates) or types of experiments (e.g.\n+  genomic array as well as RNA-seq experiments) may refer to the same BioSample.\n+  In the context of the GA4GH metadata schema, BioSample constitutes the central\n+  reference object.\n+ */\n+ record BioSample {","path":"src/main/resources/avro/biodata.avdl","position":84,"original_position":84,"commit_id":"7c8111f417bc221e6ce516b4164b5df1ff9838dd","original_commit_id":"7c8111f417bc221e6ce516b4164b5df1ff9838dd","user":{"login":"sarahhunt","id":6123326,"avatar_url":"https://avatars.githubusercontent.com/u/6123326?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahhunt","html_url":"https://github.com/sarahhunt","followers_url":"https://api.github.com/users/sarahhunt/followers","following_url":"https://api.github.com/users/sarahhunt/following{/other_user}","gists_url":"https://api.github.com/users/sarahhunt/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahhunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahhunt/subscriptions","organizations_url":"https://api.github.com/users/sarahhunt/orgs","repos_url":"https://api.github.com/users/sarahhunt/repos","events_url":"https://api.github.com/users/sarahhunt/events{/privacy}","received_events_url":"https://api.github.com/users/sarahhunt/received_events","type":"User","site_admin":false},"body":"Thanks @mbaudis - good to know! ","created_at":"2016-04-12T14:30:44Z","updated_at":"2016-04-12T14:30:44Z","html_url":"https://github.com/ga4gh/schemas/pull/606#discussion_r59385974","pull_request_url":"https://api.github.com/repos/ga4gh/schemas/pulls/606","_links":{"self":{"href":"https://api.github.com/repos/ga4gh/schemas/pulls/comments/59385974"},"html":{"href":"https://github.com/ga4gh/schemas/pull/606#discussion_r59385974"},"pull_request":{"href":"https://api.github.com/repos/ga4gh/schemas/pulls/606"}}},"pull_request":{"url":"https://api.github.com/repos/ga4gh/schemas/pulls/606","id":65370597,"html_url":"https://github.com/ga4gh/schemas/pull/606","diff_url":"https://github.com/ga4gh/schemas/pull/606.diff","patch_url":"https://github.com/ga4gh/schemas/pull/606.patch","issue_url":"https://api.github.com/repos/ga4gh/schemas/issues/606","number":606,"state":"open","locked":false,"title":"Biosamples and individuals","user":{"login":"david4096","id":3795586,"avatar_url":"https://avatars.githubusercontent.com/u/3795586?v=3","gravatar_id":"","url":"https://api.github.com/users/david4096","html_url":"https://github.com/david4096","followers_url":"https://api.github.com/users/david4096/followers","following_url":"https://api.github.com/users/david4096/following{/other_user}","gists_url":"https://api.github.com/users/david4096/gists{/gist_id}","starred_url":"https://api.github.com/users/david4096/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david4096/subscriptions","organizations_url":"https://api.github.com/users/david4096/orgs","repos_url":"https://api.github.com/users/david4096/repos","events_url":"https://api.github.com/users/david4096/events{/privacy}","received_events_url":"https://api.github.com/users/david4096/received_events","type":"User","site_admin":false},"body":"The biodata protocol allows read groups and call sets to be related to samples and individuals. This is done by adding `bioSampleId` fields to both of those records, and allowing them to be filtered using `bioSampleId` in [SearchReadGroupSetsRequest](https://github.com/ga4gh/schemas/blob/biosample/src/main/resources/avro/readmethods.avdl#L124) and [SearchCallSetsRequest](https://github.com/ga4gh/schemas/blob/biosample/src/main/resources/avro/variantmethods.avdl#L171). In addition to being able to filter callsets and readgroups, the new `biosamples` and `individuals` endpoints are added.\r\n\r\nIndividuals can be searched by name, and biosamples can be filtered by individualId and name.\r\n\r\nGiven some read find which individual it derives from:\r\n1) Read the `bioSampleId` from a `ReadGroup` record.\r\n2) Get the `BioSample` record by performing a get at `http://ga4gh/biosamples/<bioSampleId>`.\r\n3) Read the `individualId` from the `BioSample` record.\r\n4) Get the `Individual` record by performing a get at `http://ga4gh/individuals/<bioSampleId>`.\r\n\r\nGiven some individual find reads:\r\n1) From the `Individual` record get the `individualId`.\r\n2) Create a `SearchBioSamplesRequest` with the provided `individualId`.\r\n3) Perform a `SearchReadGroupSetsRequest` with each returned `bioSampleId`.\r\n4) Only read groups matching the bioSampleId will be returned. Perform a SearchReadsRequest for each read group in the `SearchReadGroupSetsResponse`. \r\n\r\nA reference implementation can be seen [here](https://github.com/ga4gh/server/pull/1028).","created_at":"2016-04-05T20:38:41Z","updated_at":"2016-04-12T14:30:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad5b765dc04727faba2ef3a7f2660f84edff3dde","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga4gh/schemas/pulls/606/commits","review_comments_url":"https://api.github.com/repos/ga4gh/schemas/pulls/606/comments","review_comment_url":"https://api.github.com/repos/ga4gh/schemas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga4gh/schemas/issues/606/comments","statuses_url":"https://api.github.com/repos/ga4gh/schemas/statuses/7c8111f417bc221e6ce516b4164b5df1ff9838dd","head":{"label":"ga4gh:biosample","ref":"biosample","sha":"7c8111f417bc221e6ce516b4164b5df1ff9838dd","user":{"login":"ga4gh","id":6921777,"avatar_url":"https://avatars.githubusercontent.com/u/6921777?v=3","gravatar_id":"","url":"https://api.github.com/users/ga4gh","html_url":"https://github.com/ga4gh","followers_url":"https://api.github.com/users/ga4gh/followers","following_url":"https://api.github.com/users/ga4gh/following{/other_user}","gists_url":"https://api.github.com/users/ga4gh/gists{/gist_id}","starred_url":"https://api.github.com/users/ga4gh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga4gh/subscriptions","organizations_url":"https://api.github.com/users/ga4gh/orgs","repos_url":"https://api.github.com/users/ga4gh/repos","events_url":"https://api.github.com/users/ga4gh/events{/privacy}","received_events_url":"https://api.github.com/users/ga4gh/received_events","type":"Organization","site_admin":false},"repo":{"id":17925227,"name":"schemas","full_name":"ga4gh/schemas","owner":{"login":"ga4gh","id":6921777,"avatar_url":"https://avatars.githubusercontent.com/u/6921777?v=3","gravatar_id":"","url":"https://api.github.com/users/ga4gh","html_url":"https://github.com/ga4gh","followers_url":"https://api.github.com/users/ga4gh/followers","following_url":"https://api.github.com/users/ga4gh/following{/other_user}","gists_url":"https://api.github.com/users/ga4gh/gists{/gist_id}","starred_url":"https://api.github.com/users/ga4gh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga4gh/subscriptions","organizations_url":"https://api.github.com/users/ga4gh/orgs","repos_url":"https://api.github.com/users/ga4gh/repos","events_url":"https://api.github.com/users/ga4gh/events{/privacy}","received_events_url":"https://api.github.com/users/ga4gh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga4gh/schemas","description":"Work on data models and APIs for Genomic data.","fork":false,"url":"https://api.github.com/repos/ga4gh/schemas","forks_url":"https://api.github.com/repos/ga4gh/schemas/forks","keys_url":"https://api.github.com/repos/ga4gh/schemas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga4gh/schemas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga4gh/schemas/teams","hooks_url":"https://api.github.com/repos/ga4gh/schemas/hooks","issue_events_url":"https://api.github.com/repos/ga4gh/schemas/issues/events{/number}","events_url":"https://api.github.com/repos/ga4gh/schemas/events","assignees_url":"https://api.github.com/repos/ga4gh/schemas/assignees{/user}","branches_url":"https://api.github.com/repos/ga4gh/schemas/branches{/branch}","tags_url":"https://api.github.com/repos/ga4gh/schemas/tags","blobs_url":"https://api.github.com/repos/ga4gh/schemas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga4gh/schemas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga4gh/schemas/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga4gh/schemas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga4gh/schemas/statuses/{sha}","languages_url":"https://api.github.com/repos/ga4gh/schemas/languages","stargazers_url":"https://api.github.com/repos/ga4gh/schemas/stargazers","contributors_url":"https://api.github.com/repos/ga4gh/schemas/contributors","subscribers_url":"https://api.github.com/repos/ga4gh/schemas/subscribers","subscription_url":"https://api.github.com/repos/ga4gh/schemas/subscription","commits_url":"https://api.github.com/repos/ga4gh/schemas/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga4gh/schemas/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga4gh/schemas/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga4gh/schemas/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga4gh/schemas/contents/{+path}","compare_url":"https://api.github.com/repos/ga4gh/schemas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga4gh/schemas/merges","archive_url":"https://api.github.com/repos/ga4gh/schemas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga4gh/schemas/downloads","issues_url":"https://api.github.com/repos/ga4gh/schemas/issues{/number}","pulls_url":"https://api.github.com/repos/ga4gh/schemas/pulls{/number}","milestones_url":"https://api.github.com/repos/ga4gh/schemas/milestones{/number}","notifications_url":"https://api.github.com/repos/ga4gh/schemas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga4gh/schemas/labels{/name}","releases_url":"https://api.github.com/repos/ga4gh/schemas/releases{/id}","deployments_url":"https://api.github.com/repos/ga4gh/schemas/deployments","created_at":"2014-03-20T00:13:40Z","updated_at":"2016-04-07T21:30:48Z","pushed_at":"2016-04-12T07:07:42Z","git_url":"git://github.com/ga4gh/schemas.git","ssh_url":"git@github.com:ga4gh/schemas.git","clone_url":"https://github.com/ga4gh/schemas.git","svn_url":"https://github.com/ga4gh/schemas","homepage":"http://ga4gh.org/#/api","size":13808,"stargazers_count":178,"watchers_count":178,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":149,"forks":97,"open_issues":149,"watchers":178,"default_branch":"master"}},"base":{"label":"ga4gh:master","ref":"master","sha":"ffc7fb374ec52c117ab87c24f11c33f151a589a0","user":{"login":"ga4gh","id":6921777,"avatar_url":"https://avatars.githubusercontent.com/u/6921777?v=3","gravatar_id":"","url":"https://api.github.com/users/ga4gh","html_url":"https://github.com/ga4gh","followers_url":"https://api.github.com/users/ga4gh/followers","following_url":"https://api.github.com/users/ga4gh/following{/other_user}","gists_url":"https://api.github.com/users/ga4gh/gists{/gist_id}","starred_url":"https://api.github.com/users/ga4gh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga4gh/subscriptions","organizations_url":"https://api.github.com/users/ga4gh/orgs","repos_url":"https://api.github.com/users/ga4gh/repos","events_url":"https://api.github.com/users/ga4gh/events{/privacy}","received_events_url":"https://api.github.com/users/ga4gh/received_events","type":"Organization","site_admin":false},"repo":{"id":17925227,"name":"schemas","full_name":"ga4gh/schemas","owner":{"login":"ga4gh","id":6921777,"avatar_url":"https://avatars.githubusercontent.com/u/6921777?v=3","gravatar_id":"","url":"https://api.github.com/users/ga4gh","html_url":"https://github.com/ga4gh","followers_url":"https://api.github.com/users/ga4gh/followers","following_url":"https://api.github.com/users/ga4gh/following{/other_user}","gists_url":"https://api.github.com/users/ga4gh/gists{/gist_id}","starred_url":"https://api.github.com/users/ga4gh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga4gh/subscriptions","organizations_url":"https://api.github.com/users/ga4gh/orgs","repos_url":"https://api.github.com/users/ga4gh/repos","events_url":"https://api.github.com/users/ga4gh/events{/privacy}","received_events_url":"https://api.github.com/users/ga4gh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga4gh/schemas","description":"Work on data models and APIs for Genomic data.","fork":false,"url":"https://api.github.com/repos/ga4gh/schemas","forks_url":"https://api.github.com/repos/ga4gh/schemas/forks","keys_url":"https://api.github.com/repos/ga4gh/schemas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga4gh/schemas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga4gh/schemas/teams","hooks_url":"https://api.github.com/repos/ga4gh/schemas/hooks","issue_events_url":"https://api.github.com/repos/ga4gh/schemas/issues/events{/number}","events_url":"https://api.github.com/repos/ga4gh/schemas/events","assignees_url":"https://api.github.com/repos/ga4gh/schemas/assignees{/user}","branches_url":"https://api.github.com/repos/ga4gh/schemas/branches{/branch}","tags_url":"https://api.github.com/repos/ga4gh/schemas/tags","blobs_url":"https://api.github.com/repos/ga4gh/schemas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga4gh/schemas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga4gh/schemas/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga4gh/schemas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga4gh/schemas/statuses/{sha}","languages_url":"https://api.github.com/repos/ga4gh/schemas/languages","stargazers_url":"https://api.github.com/repos/ga4gh/schemas/stargazers","contributors_url":"https://api.github.com/repos/ga4gh/schemas/contributors","subscribers_url":"https://api.github.com/repos/ga4gh/schemas/subscribers","subscription_url":"https://api.github.com/repos/ga4gh/schemas/subscription","commits_url":"https://api.github.com/repos/ga4gh/schemas/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga4gh/schemas/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga4gh/schemas/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga4gh/schemas/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga4gh/schemas/contents/{+path}","compare_url":"https://api.github.com/repos/ga4gh/schemas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga4gh/schemas/merges","archive_url":"https://api.github.com/repos/ga4gh/schemas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga4gh/schemas/downloads","issues_url":"https://api.github.com/repos/ga4gh/schemas/issues{/number}","pulls_url":"https://api.github.com/repos/ga4gh/schemas/pulls{/number}","milestones_url":"https://api.github.com/repos/ga4gh/schemas/milestones{/number}","notifications_url":"https://api.github.com/repos/ga4gh/schemas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga4gh/schemas/labels{/name}","releases_url":"https://api.github.com/repos/ga4gh/schemas/releases{/id}","deployments_url":"https://api.github.com/repos/ga4gh/schemas/deployments","created_at":"2014-03-20T00:13:40Z","updated_at":"2016-04-07T21:30:48Z","pushed_at":"2016-04-12T07:07:42Z","git_url":"git://github.com/ga4gh/schemas.git","ssh_url":"git@github.com:ga4gh/schemas.git","clone_url":"https://github.com/ga4gh/schemas.git","svn_url":"https://github.com/ga4gh/schemas","homepage":"http://ga4gh.org/#/api","size":13808,"stargazers_count":178,"watchers_count":178,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":149,"forks":97,"open_issues":149,"watchers":178,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga4gh/schemas/pulls/606"},"html":{"href":"https://github.com/ga4gh/schemas/pull/606"},"issue":{"href":"https://api.github.com/repos/ga4gh/schemas/issues/606"},"comments":{"href":"https://api.github.com/repos/ga4gh/schemas/issues/606/comments"},"review_comments":{"href":"https://api.github.com/repos/ga4gh/schemas/pulls/606/comments"},"review_comment":{"href":"https://api.github.com/repos/ga4gh/schemas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga4gh/schemas/pulls/606/commits"},"statuses":{"href":"https://api.github.com/repos/ga4gh/schemas/statuses/7c8111f417bc221e6ce516b4164b5df1ff9838dd"}}}}