{"action":"created","issue":{"url":"https://api.github.com/repos/ga4gh/schemas/issues/606","repository_url":"https://api.github.com/repos/ga4gh/schemas","labels_url":"https://api.github.com/repos/ga4gh/schemas/issues/606/labels{/name}","comments_url":"https://api.github.com/repos/ga4gh/schemas/issues/606/comments","events_url":"https://api.github.com/repos/ga4gh/schemas/issues/606/events","html_url":"https://github.com/ga4gh/schemas/pull/606","id":146103328,"number":606,"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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2016-04-05T20:38:43Z","updated_at":"2016-05-19T18:48:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ga4gh/schemas/pulls/606","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"},"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)."},"comment":{"url":"https://api.github.com/repos/ga4gh/schemas/issues/comments/220417526","html_url":"https://github.com/ga4gh/schemas/pull/606#issuecomment-220417526","issue_url":"https://api.github.com/repos/ga4gh/schemas/issues/606","id":220417526,"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},"created_at":"2016-05-19T18:48:23Z","updated_at":"2016-05-19T18:48:23Z","body":"@mbaudis Updated the branch to pass tests. There was a name change that needed to be reflected in the reads and annotations descriptors."}}