Debian Codegraph @

third_party/googleapis/google/genomics/v1/references.proto

raw
1 // Copyright 2016 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.genomics.v1;
18
19 import "google/api/annotations.proto";
20
21 option cc_enable_arenas = true;
22 option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
23 option java_multiple_files = true;
24 option java_outer_classname = "ReferencesProto";
25 option java_package = "com.google.genomics.v1";
26
27
28 service ReferenceServiceV1 {
29 // Searches for reference sets which match the given criteria.
30 //
31 // For the definitions of references and other genomics resources, see
32 // [Fundamentals of Google
33 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
34 //
35 // Implements
36 // [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)
37 rpc SearchReferenceSets(SearchReferenceSetsRequest) returns (SearchReferenceSetsResponse) {
38 option (google.api.http) = { post: "/v1/referencesets/search" body: "*" };
39 }
40
41 // Gets a reference set.
42 //
43 // For the definitions of references and other genomics resources, see
44 // [Fundamentals of Google
45 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
46 //
47 // Implements
48 // [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).
49 rpc GetReferenceSet(GetReferenceSetRequest) returns (ReferenceSet) {
50 option (google.api.http) = { get: "/v1/referencesets/{reference_set_id}" };
51 }
52
53 // Searches for references which match the given criteria.
54 //
55 // For the definitions of references and other genomics resources, see
56 // [Fundamentals of Google
57 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
58 //
59 // Implements
60 // [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).
61 rpc SearchReferences(SearchReferencesRequest) returns (SearchReferencesResponse) {
62 option (google.api.http) = { post: "/v1/references/search" body: "*" };
63 }
64
65 // Gets a reference.
66 //
67 // For the definitions of references and other genomics resources, see
68 // [Fundamentals of Google
69 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
70 //
71 // Implements
72 // [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158).
73 rpc GetReference(GetReferenceRequest) returns (Reference) {
74 option (google.api.http) = { get: "/v1/references/{reference_id}" };
75 }
76
77 // Lists the bases in a reference, optionally restricted to a range.
78 //
79 // For the definitions of references and other genomics resources, see
80 // [Fundamentals of Google
81 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
82 //
83 // Implements
84 // [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).
85 rpc ListBases(ListBasesRequest) returns (ListBasesResponse) {
86 option (google.api.http) = { get: "/v1/references/{reference_id}/bases" };
87 }
88 }
89
90 // A reference is a canonical assembled DNA sequence, intended to act as a
91 // reference coordinate space for other genomic annotations. A single reference
92 // might represent the human chromosome 1 or mitochandrial DNA, for instance. A
93 // reference belongs to one or more reference sets.
94 //
95 // For more genomics resource definitions, see [Fundamentals of Google
96 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
97 message Reference {
98 // The server-generated reference ID, unique across all references.
99 string id = 1;
100
101 // The length of this reference's sequence.
102 int64 length = 2;
103
104 // MD5 of the upper-case sequence excluding all whitespace characters (this
105 // is equivalent to SQ:M5 in SAM). This value is represented in lower case
106 // hexadecimal format.
107 string md5checksum = 3;
108
109 // The name of this reference, for example `22`.
110 string name = 4;
111
112 // The URI from which the sequence was obtained. Typically specifies a FASTA
113 // format file.
114 string source_uri = 5;
115
116 // All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally
117 // with a version number, for example `GCF_000001405.26`.
118 repeated string source_accessions = 6;
119
120 // ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human.
121 int32 ncbi_taxon_id = 7;
122 }
123
124 // A reference set is a set of references which typically comprise a reference
125 // assembly for a species, such as `GRCh38` which is representative
126 // of the human genome. A reference set defines a common coordinate space for
127 // comparing reference-aligned experimental data. A reference set contains 1 or
128 // more references.
129 //
130 // For more genomics resource definitions, see [Fundamentals of Google
131 // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
132 message ReferenceSet {
133 // The server-generated reference set ID, unique across all reference sets.
134 string id = 1;
135
136 // The IDs of the reference objects that are part of this set.
137 // `Reference.md5checksum` must be unique within this set.
138 repeated string reference_ids = 2;
139
140 // Order-independent MD5 checksum which identifies this reference set. The
141 // checksum is computed by sorting all lower case hexidecimal string
142 // `reference.md5checksum` (for all reference in this set) in
143 // ascending lexicographic order, concatenating, and taking the MD5 of that
144 // value. The resulting value is represented in lower case hexadecimal format.
145 string md5checksum = 3;
146
147 // ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human)
148 // indicating the species which this reference set is intended to model. Note
149 // that contained references may specify a different `ncbiTaxonId`, as
150 // assemblies may contain reference sequences which do not belong to the
151 // modeled species, for example EBV in a human reference genome.
152 int32 ncbi_taxon_id = 4;
153
154 // Free text description of this reference set.
155 string description = 5;
156
157 // Public id of this reference set, such as `GRCh37`.
158 string assembly_id = 6;
159
160 // The URI from which the references were obtained.
161 string source_uri = 7;
162
163 // All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally
164 // with a version number, for example `NC_000001.11`.
165 repeated string source_accessions = 8;
166 }
167
168 message SearchReferenceSetsRequest {
169 // If present, return reference sets for which the
170 // [md5checksum][google.genomics.v1.ReferenceSet.md5checksum] matches exactly.
171 repeated string md5checksums = 1;
172
173 // If present, return reference sets for which a prefix of any of
174 // [sourceAccessions][google.genomics.v1.ReferenceSet.source_accessions]
175 // match any of these strings. Accession numbers typically have a main number
176 // and a version, for example `NC_000001.11`.
177 repeated string accessions = 2;
178
179 // If present, return reference sets for which a substring of their
180 // `assemblyId` matches this string (case insensitive).
181 string assembly_id = 3;
182
183 // The continuation token, which is used to page through large result sets.
184 // To get the next page of results, set this parameter to the value of
185 // `nextPageToken` from the previous response.
186 string page_token = 4;
187
188 // The maximum number of results to return in a single page. If unspecified,
189 // defaults to 1024. The maximum value is 4096.
190 int32 page_size = 5;
191 }
192
193 message SearchReferenceSetsResponse {
194 // The matching references sets.
195 repeated ReferenceSet reference_sets = 1;
196
197 // The continuation token, which is used to page through large result sets.
198 // Provide this value in a subsequent request to return the next page of
199 // results. This field will be empty if there aren't any additional results.
200 string next_page_token = 2;
201 }
202
203 message GetReferenceSetRequest {
204 // The ID of the reference set.
205 string reference_set_id = 1;
206 }
207
208 message SearchReferencesRequest {
209 // If present, return references for which the
210 // [md5checksum][google.genomics.v1.Reference.md5checksum] matches exactly.
211 repeated string md5checksums = 1;
212
213 // If present, return references for which a prefix of any of
214 // [sourceAccessions][google.genomics.v1.Reference.source_accessions] match
215 // any of these strings. Accession numbers typically have a main number and a
216 // version, for example `GCF_000001405.26`.
217 repeated string accessions = 2;
218
219 // If present, return only references which belong to this reference set.
220 string reference_set_id = 3;
221
222 // The continuation token, which is used to page through large result sets.
223 // To get the next page of results, set this parameter to the value of
224 // `nextPageToken` from the previous response.
225 string page_token = 4;
226
227 // The maximum number of results to return in a single page. If unspecified,
228 // defaults to 1024. The maximum value is 4096.
229 int32 page_size = 5;
230 }
231
232 message SearchReferencesResponse {
233 // The matching references.
234 repeated Reference references = 1;
235
236 // The continuation token, which is used to page through large result sets.
237 // Provide this value in a subsequent request to return the next page of
238 // results. This field will be empty if there aren't any additional results.
239 string next_page_token = 2;
240 }
241
242 message GetReferenceRequest {
243 // The ID of the reference.
244 string reference_id = 1;
245 }
246
247 message ListBasesRequest {
248 // The ID of the reference.
249 string reference_id = 1;
250
251 // The start position (0-based) of this query. Defaults to 0.
252 int64 start = 2;
253
254 // The end position (0-based, exclusive) of this query. Defaults to the length
255 // of this reference.
256 int64 end = 3;
257
258 // The continuation token, which is used to page through large result sets.
259 // To get the next page of results, set this parameter to the value of
260 // `nextPageToken` from the previous response.
261 string page_token = 4;
262
263 // The maximum number of bases to return in a single page. If unspecified,
264 // defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base
265 // pairs).
266 int32 page_size = 5;
267 }
268
269 message ListBasesResponse {
270 // The offset position (0-based) of the given `sequence` from the
271 // start of this `Reference`. This value will differ for each page
272 // in a paginated request.
273 int64 offset = 1;
274
275 // A substring of the bases that make up this reference.
276 string sequence = 2;
277
278 // The continuation token, which is used to page through large result sets.
279 // Provide this value in a subsequent request to return the next page of
280 // results. This field will be empty if there aren't any additional results.
281 string next_page_token = 3;
282 }