diff --git a/src/main/proto/ga4gh/read_service.proto b/src/main/proto/ga4gh/read_service.proto index 99280089..70741586 100644 --- a/src/main/proto/ga4gh/read_service.proto +++ b/src/main/proto/ga4gh/read_service.proto @@ -9,12 +9,24 @@ service ReadService { // // `POST /readgroupsets/search` must accept a JSON version of // `SearchReadGroupSetsRequest` as the post body and will return a JSON - // version of `SearchReadGroupSetsResponse`. Only readgroups that - // match an optionally supplied bioSampleId will be included in the - // response. + // version of `SearchReadGroupSetsResponse`. rpc SearchReadGroupSets(SearchReadGroupSetsRequest) returns (SearchReadGroupSetsResponse); + // Gets a list of `ReadGroup` matching the search criteria. + // + // `POST /readgroups/search` must accept a JSON version of + // `SearchReadGroupsRequest` as the post body and will return a JSON + // version of `SearchReadGroupsResponse`. + rpc SearchReadGroups(SearchReadGroupsRequest) + returns (SearchReadGroupsResponse); + + // Gets a `ReadGroup` by ID. + // + // `GET /readgroups/{read_group_id}` will return a JSON version of + // `ReadGroup`. + rpc GetReadGroup(GetReadGroupRequest) returns (ReadGroup); + // Gets a `ReadGroupSet` by ID. // // `GET /readgroupsets/{read_group_set_id}` will return a JSON version of @@ -60,10 +72,6 @@ message SearchReadGroupSetsRequest { // Only return read group sets with this name (case-sensitive, exact match). string name = 2; - // Specifying the id of a BioSample record will return only readgroups - // with the given bioSampleId. - string bio_sample_id = 3; - // Specifies the maximum number of results to return in a single page. // If unspecified, a system default will be used. int32 page_size = 4; @@ -91,6 +99,52 @@ message GetReadGroupSetRequest { string read_group_set_id = 1; } +// ****************** /readgroups *********************/ + +// This request maps to the body of `POST /readgroups/search` as JSON. + + +message SearchReadGroupsRequest { + // The dataset to search (required). + string dataset_id = 1; + + // The read_group_set to search (optional). + string read_group_set_id = 2; + + // Only return read groups with this name (case-sensitive, exact match). + string name = 3; + + // Specifying the id of a BioSample record will return only readgroups + // with the given bioSampleId. + string bio_sample_id = 4; + + // Specifies the maximum number of results to return in a single page. + // If unspecified, a system default will be used. + int32 page_size = 5; + + // The continuation token, which is used to page through large result sets. + // To get the next page of results, set this parameter to the value of + // `next_page_token` from the previous response. + string page_token = 6; +} + +// This is the response from `POST /readgroups/search` expressed as JSON. +message SearchReadGroupsResponse { + // The list of matching read groups. + repeated ReadGroupSet read_groups = 1; + + // The continuation token, which is used to page through large result sets. + // Provide this value in a subsequent request to return the next page of + // results. This field will be empty if there aren't any additional results. + string next_page_token = 2; +} + +// This request maps to the URL `GET /readgroups/{read_group_id}`. +message GetReadGroupRequest { + // The ID of the `ReadGroup` to be retrieved. + string read_group_id = 1; +} + // ****************** /reads ********************* // This request maps to the body of `POST /reads/search` as JSON. // diff --git a/src/main/proto/ga4gh/reads.proto b/src/main/proto/ga4gh/reads.proto index 04f5714d..5ae812ef 100644 --- a/src/main/proto/ga4gh/reads.proto +++ b/src/main/proto/ga4gh/reads.proto @@ -32,6 +32,9 @@ message ReadGroup { // The ID of the dataset this read group belongs to. string dataset_id = 2; + + // The ID of the read group set this read group belongs to. + string read_group_set_id = 15; // The read group name. string name = 3; @@ -64,6 +67,7 @@ message ReadGroup { // Statistical data on reads in this read group. ReadStats stats = 11; + // Program can be used to track the provenance of how read data was generated. repeated Program programs = 12; // The ID of the reference set to which the reads in this read group are @@ -76,6 +80,8 @@ message ReadGroup { // A ReadGroupSet is a logical collection of ReadGroups. Typically one // ReadGroupSet represents all the reads from one experimental sample. +// All read groups require that all readgroups in the set are mapped to +// the same referenceSet. message ReadGroupSet { // The read group set ID. string id = 1; @@ -88,12 +94,9 @@ message ReadGroupSet { // Statistical data on reads in this read group set. ReadStats stats = 4; - - // The read groups in this set. - repeated ReadGroup read_groups = 5; - - // NB: we require that all readgroups in the set are mapped to the same - // referenceSet. + + // IDs of the Read Groups in this ReadGroupSet + repeated string read_group_ids = 6; } // A linear alignment describes the alignment of a read to a Reference, using a @@ -110,8 +113,7 @@ message LinearAlignment { int32 mapping_quality = 2; // Represents the local alignment of this sequence (alignment matches, indels, - // etc) - // versus the reference. + // etc) versus the reference. repeated CigarUnit cigar = 3; }