annotations.proto 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  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. syntax = "proto3";
  15. package google.genomics.v1;
  16. import "google/api/annotations.proto";
  17. import "google/protobuf/empty.proto";
  18. import "google/protobuf/field_mask.proto";
  19. import "google/protobuf/struct.proto";
  20. import "google/protobuf/wrappers.proto";
  21. import "google/rpc/status.proto";
  22. option cc_enable_arenas = true;
  23. option go_package = "google.golang.org/genproto/googleapis/genomics/v1;genomics";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "AnnotationsProto";
  26. option java_package = "com.google.genomics.v1";
  27. // This service provides storage and positional retrieval of genomic
  28. // reference annotations, including variant annotations.
  29. service AnnotationServiceV1 {
  30. // Creates a new annotation set. Caller must have WRITE permission for the
  31. // associated dataset.
  32. //
  33. // The following fields are required:
  34. //
  35. // * [datasetId][google.genomics.v1.AnnotationSet.dataset_id]
  36. // * [referenceSetId][google.genomics.v1.AnnotationSet.reference_set_id]
  37. //
  38. // All other fields may be optionally specified, unless documented as being
  39. // server-generated (for example, the `id` field).
  40. rpc CreateAnnotationSet(CreateAnnotationSetRequest) returns (AnnotationSet) {
  41. option (google.api.http) = {
  42. post: "/v1/annotationsets"
  43. body: "annotation_set"
  44. };
  45. }
  46. // Gets an annotation set. Caller must have READ permission for
  47. // the associated dataset.
  48. rpc GetAnnotationSet(GetAnnotationSetRequest) returns (AnnotationSet) {
  49. option (google.api.http) = {
  50. get: "/v1/annotationsets/{annotation_set_id}"
  51. };
  52. }
  53. // Updates an annotation set. The update must respect all mutability
  54. // restrictions and other invariants described on the annotation set resource.
  55. // Caller must have WRITE permission for the associated dataset.
  56. rpc UpdateAnnotationSet(UpdateAnnotationSetRequest) returns (AnnotationSet) {
  57. option (google.api.http) = {
  58. put: "/v1/annotationsets/{annotation_set_id}"
  59. body: "annotation_set"
  60. };
  61. }
  62. // Deletes an annotation set. Caller must have WRITE permission
  63. // for the associated annotation set.
  64. rpc DeleteAnnotationSet(DeleteAnnotationSetRequest)
  65. returns (google.protobuf.Empty) {
  66. option (google.api.http) = {
  67. delete: "/v1/annotationsets/{annotation_set_id}"
  68. };
  69. }
  70. // Searches for annotation sets that match the given criteria. Annotation sets
  71. // are returned in an unspecified order. This order is consistent, such that
  72. // two queries for the same content (regardless of page size) yield annotation
  73. // sets in the same order across their respective streams of paginated
  74. // responses. Caller must have READ permission for the queried datasets.
  75. rpc SearchAnnotationSets(SearchAnnotationSetsRequest)
  76. returns (SearchAnnotationSetsResponse) {
  77. option (google.api.http) = {
  78. post: "/v1/annotationsets/search"
  79. body: "*"
  80. };
  81. }
  82. // Creates a new annotation. Caller must have WRITE permission
  83. // for the associated annotation set.
  84. //
  85. // The following fields are required:
  86. //
  87. // * [annotationSetId][google.genomics.v1.Annotation.annotation_set_id]
  88. // * [referenceName][google.genomics.v1.Annotation.reference_name] or
  89. // [referenceId][google.genomics.v1.Annotation.reference_id]
  90. //
  91. // ### Transcripts
  92. //
  93. // For annotations of type TRANSCRIPT, the following fields of
  94. // [transcript][google.genomics.v1.Annotation.transcript] must be provided:
  95. //
  96. // * [exons.start][google.genomics.v1.Transcript.Exon.start]
  97. // * [exons.end][google.genomics.v1.Transcript.Exon.end]
  98. //
  99. // All other fields may be optionally specified, unless documented as being
  100. // server-generated (for example, the `id` field). The annotated
  101. // range must be no longer than 100Mbp (mega base pairs). See the
  102. // [Annotation resource][google.genomics.v1.Annotation]
  103. // for additional restrictions on each field.
  104. rpc CreateAnnotation(CreateAnnotationRequest) returns (Annotation) {
  105. option (google.api.http) = {
  106. post: "/v1/annotations"
  107. body: "annotation"
  108. };
  109. }
  110. // Creates one or more new annotations atomically. All annotations must
  111. // belong to the same annotation set. Caller must have WRITE
  112. // permission for this annotation set. For optimal performance, batch
  113. // positionally adjacent annotations together.
  114. //
  115. // If the request has a systemic issue, such as an attempt to write to
  116. // an inaccessible annotation set, the entire RPC will fail accordingly. For
  117. // lesser data issues, when possible an error will be isolated to the
  118. // corresponding batch entry in the response; the remaining well formed
  119. // annotations will be created normally.
  120. //
  121. // For details on the requirements for each individual annotation resource,
  122. // see
  123. // [CreateAnnotation][google.genomics.v1.AnnotationServiceV1.CreateAnnotation].
  124. rpc BatchCreateAnnotations(BatchCreateAnnotationsRequest)
  125. returns (BatchCreateAnnotationsResponse) {
  126. option (google.api.http) = {
  127. post: "/v1/annotations:batchCreate"
  128. body: "*"
  129. };
  130. }
  131. // Gets an annotation. Caller must have READ permission
  132. // for the associated annotation set.
  133. rpc GetAnnotation(GetAnnotationRequest) returns (Annotation) {
  134. option (google.api.http) = {
  135. get: "/v1/annotations/{annotation_id}"
  136. };
  137. }
  138. // Updates an annotation. Caller must have
  139. // WRITE permission for the associated dataset.
  140. rpc UpdateAnnotation(UpdateAnnotationRequest) returns (Annotation) {
  141. option (google.api.http) = {
  142. put: "/v1/annotations/{annotation_id}"
  143. body: "annotation"
  144. };
  145. }
  146. // Deletes an annotation. Caller must have WRITE permission for
  147. // the associated annotation set.
  148. rpc DeleteAnnotation(DeleteAnnotationRequest)
  149. returns (google.protobuf.Empty) {
  150. option (google.api.http) = {
  151. delete: "/v1/annotations/{annotation_id}"
  152. };
  153. }
  154. // Searches for annotations that match the given criteria. Results are
  155. // ordered by genomic coordinate (by reference sequence, then position).
  156. // Annotations with equivalent genomic coordinates are returned in an
  157. // unspecified order. This order is consistent, such that two queries for the
  158. // same content (regardless of page size) yield annotations in the same order
  159. // across their respective streams of paginated responses. Caller must have
  160. // READ permission for the queried annotation sets.
  161. rpc SearchAnnotations(SearchAnnotationsRequest)
  162. returns (SearchAnnotationsResponse) {
  163. option (google.api.http) = {
  164. post: "/v1/annotations/search"
  165. body: "*"
  166. };
  167. }
  168. }
  169. // An annotation set is a logical grouping of annotations that share consistent
  170. // type information and provenance. Examples of annotation sets include 'all
  171. // genes from refseq', and 'all variant annotations from ClinVar'.
  172. message AnnotationSet {
  173. // The server-generated annotation set ID, unique across all annotation sets.
  174. string id = 1;
  175. // The dataset to which this annotation set belongs.
  176. string dataset_id = 2;
  177. // The ID of the reference set that defines the coordinate space for this
  178. // set's annotations.
  179. string reference_set_id = 3;
  180. // The display name for this annotation set.
  181. string name = 4;
  182. // The source URI describing the file from which this annotation set was
  183. // generated, if any.
  184. string source_uri = 5;
  185. // The type of annotations contained within this set.
  186. AnnotationType type = 6;
  187. // A map of additional read alignment information. This must be of the form
  188. // map<string, string[]> (string key mapping to a list of string values).
  189. map<string, google.protobuf.ListValue> info = 17;
  190. }
  191. // An annotation describes a region of reference genome. The value of an
  192. // annotation may be one of several canonical types, supplemented by arbitrary
  193. // info tags. An annotation is not inherently associated with a specific
  194. // sample or individual (though a client could choose to use annotations in
  195. // this way). Example canonical annotation types are `GENE` and
  196. // `VARIANT`.
  197. message Annotation {
  198. // The server-generated annotation ID, unique across all annotations.
  199. string id = 1;
  200. // The annotation set to which this annotation belongs.
  201. string annotation_set_id = 2;
  202. // The display name of this annotation.
  203. string name = 3;
  204. // The ID of the Google Genomics reference associated with this range.
  205. string reference_id = 4;
  206. // The display name corresponding to the reference specified by
  207. // `referenceId`, for example `chr1`, `1`, or `chrX`.
  208. string reference_name = 5;
  209. // The start position of the range on the reference, 0-based inclusive.
  210. int64 start = 6;
  211. // The end position of the range on the reference, 0-based exclusive.
  212. int64 end = 7;
  213. // Whether this range refers to the reverse strand, as opposed to the forward
  214. // strand. Note that regardless of this field, the start/end position of the
  215. // range always refer to the forward strand.
  216. bool reverse_strand = 8;
  217. // The data type for this annotation. Must match the containing annotation
  218. // set's type.
  219. AnnotationType type = 9;
  220. oneof value {
  221. // A variant annotation, which describes the effect of a variant on the
  222. // genome, the coding sequence, and/or higher level consequences at the
  223. // organism level e.g. pathogenicity. This field is only set for annotations
  224. // of type `VARIANT`.
  225. VariantAnnotation variant = 10;
  226. // A transcript value represents the assertion that a particular region of
  227. // the reference genome may be transcribed as RNA. An alternative splicing
  228. // pattern would be represented as a separate transcript object. This field
  229. // is only set for annotations of type `TRANSCRIPT`.
  230. Transcript transcript = 11;
  231. }
  232. // A map of additional read alignment information. This must be of the form
  233. // map<string, string[]> (string key mapping to a list of string values).
  234. map<string, google.protobuf.ListValue> info = 12;
  235. }
  236. message VariantAnnotation {
  237. message ClinicalCondition {
  238. // A set of names for the condition.
  239. repeated string names = 1;
  240. // The set of external IDs for this condition.
  241. repeated ExternalId external_ids = 2;
  242. // The MedGen concept id associated with this gene.
  243. // Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/
  244. string concept_id = 3;
  245. // The OMIM id for this condition.
  246. // Search for these IDs at http://omim.org/
  247. string omim_id = 4;
  248. }
  249. enum Type {
  250. TYPE_UNSPECIFIED = 0;
  251. // `TYPE_OTHER` should be used when no other Type will suffice.
  252. // Further explanation of the variant type may be included in the
  253. // [info][google.genomics.v1.Annotation.info] field.
  254. TYPE_OTHER = 1;
  255. // `INSERTION` indicates an insertion.
  256. INSERTION = 2;
  257. // `DELETION` indicates a deletion.
  258. DELETION = 3;
  259. // `SUBSTITUTION` indicates a block substitution of
  260. // two or more nucleotides.
  261. SUBSTITUTION = 4;
  262. // `SNP` indicates a single nucleotide polymorphism.
  263. SNP = 5;
  264. // `STRUCTURAL` indicates a large structural variant,
  265. // including chromosomal fusions, inversions, etc.
  266. STRUCTURAL = 6;
  267. // `CNV` indicates a variation in copy number.
  268. CNV = 7;
  269. }
  270. enum Effect {
  271. EFFECT_UNSPECIFIED = 0;
  272. // `EFFECT_OTHER` should be used when no other Effect
  273. // will suffice.
  274. EFFECT_OTHER = 1;
  275. // `FRAMESHIFT` indicates a mutation in which the insertion or
  276. // deletion of nucleotides resulted in a frameshift change.
  277. FRAMESHIFT = 2;
  278. // `FRAME_PRESERVING_INDEL` indicates a mutation in which a
  279. // multiple of three nucleotides has been inserted or deleted, resulting
  280. // in no change to the reading frame of the coding sequence.
  281. FRAME_PRESERVING_INDEL = 3;
  282. // `SYNONYMOUS_SNP` indicates a single nucleotide polymorphism
  283. // mutation that results in no amino acid change.
  284. SYNONYMOUS_SNP = 4;
  285. // `NONSYNONYMOUS_SNP` indicates a single nucleotide
  286. // polymorphism mutation that results in an amino acid change.
  287. NONSYNONYMOUS_SNP = 5;
  288. // `STOP_GAIN` indicates a mutation that leads to the creation
  289. // of a stop codon at the variant site. Frameshift mutations creating
  290. // downstream stop codons do not count as `STOP_GAIN`.
  291. STOP_GAIN = 6;
  292. // `STOP_LOSS` indicates a mutation that eliminates a
  293. // stop codon at the variant site.
  294. STOP_LOSS = 7;
  295. // `SPLICE_SITE_DISRUPTION` indicates that this variant is
  296. // found in a splice site for the associated transcript, and alters the
  297. // normal splicing pattern.
  298. SPLICE_SITE_DISRUPTION = 8;
  299. }
  300. enum ClinicalSignificance {
  301. CLINICAL_SIGNIFICANCE_UNSPECIFIED = 0;
  302. // `OTHER` should be used when no other clinical significance
  303. // value will suffice.
  304. CLINICAL_SIGNIFICANCE_OTHER = 1;
  305. UNCERTAIN = 2;
  306. BENIGN = 3;
  307. LIKELY_BENIGN = 4;
  308. LIKELY_PATHOGENIC = 5;
  309. PATHOGENIC = 6;
  310. DRUG_RESPONSE = 7;
  311. HISTOCOMPATIBILITY = 8;
  312. CONFERS_SENSITIVITY = 9;
  313. RISK_FACTOR = 10;
  314. ASSOCIATION = 11;
  315. PROTECTIVE = 12;
  316. // `MULTIPLE_REPORTED` should be used when multiple clinical
  317. // signficances are reported for a variant. The original clinical
  318. // significance values may be provided in the `info` field.
  319. MULTIPLE_REPORTED = 13;
  320. }
  321. // Type has been adapted from ClinVar's list of variant types.
  322. Type type = 1;
  323. // Effect of the variant on the coding sequence.
  324. Effect effect = 2;
  325. // The alternate allele for this variant. If multiple alternate alleles
  326. // exist at this location, create a separate variant for each one, as they
  327. // may represent distinct conditions.
  328. string alternate_bases = 3;
  329. // Google annotation ID of the gene affected by this variant. This should
  330. // be provided when the variant is created.
  331. string gene_id = 4;
  332. // Google annotation IDs of the transcripts affected by this variant. These
  333. // should be provided when the variant is created.
  334. repeated string transcript_ids = 5;
  335. // The set of conditions associated with this variant.
  336. // A condition describes the way a variant influences human health.
  337. repeated ClinicalCondition conditions = 6;
  338. // Describes the clinical significance of a variant.
  339. // It is adapted from the ClinVar controlled vocabulary for clinical
  340. // significance described at:
  341. // http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/
  342. ClinicalSignificance clinical_significance = 7;
  343. }
  344. // A transcript represents the assertion that a particular region of the
  345. // reference genome may be transcribed as RNA.
  346. message Transcript {
  347. message Exon {
  348. // The start position of the exon on this annotation's reference sequence,
  349. // 0-based inclusive. Note that this is relative to the reference start, and
  350. // **not** the containing annotation start.
  351. int64 start = 1;
  352. // The end position of the exon on this annotation's reference sequence,
  353. // 0-based exclusive. Note that this is relative to the reference start, and
  354. // *not* the containing annotation start.
  355. int64 end = 2;
  356. // The frame of this exon. Contains a value of 0, 1, or 2, which indicates
  357. // the offset of the first coding base of the exon within the reading frame
  358. // of the coding DNA sequence, if any. This field is dependent on the
  359. // strandedness of this annotation (see
  360. // [Annotation.reverse_strand][google.genomics.v1.Annotation.reverse_strand]).
  361. // For forward stranded annotations, this offset is relative to the
  362. // [exon.start][google.genomics.v1.Transcript.Exon.start]. For reverse
  363. // strand annotations, this offset is relative to the
  364. // [exon.end][google.genomics.v1.Transcript.Exon.end] `- 1`.
  365. //
  366. // Unset if this exon does not intersect the coding sequence. Upon creation
  367. // of a transcript, the frame must be populated for all or none of the
  368. // coding exons.
  369. google.protobuf.Int32Value frame = 3;
  370. }
  371. message CodingSequence {
  372. // The start of the coding sequence on this annotation's reference sequence,
  373. // 0-based inclusive. Note that this position is relative to the reference
  374. // start, and *not* the containing annotation start.
  375. int64 start = 1;
  376. // The end of the coding sequence on this annotation's reference sequence,
  377. // 0-based exclusive. Note that this position is relative to the reference
  378. // start, and *not* the containing annotation start.
  379. int64 end = 2;
  380. }
  381. // The annotation ID of the gene from which this transcript is transcribed.
  382. string gene_id = 1;
  383. // The <a href="http://en.wikipedia.org/wiki/Exon">exons</a> that compose
  384. // this transcript. This field should be unset for genomes where transcript
  385. // splicing does not occur, for example prokaryotes.
  386. //
  387. // Introns are regions of the transcript that are not included in the
  388. // spliced RNA product. Though not explicitly modeled here, intron ranges can
  389. // be deduced; all regions of this transcript that are not exons are introns.
  390. //
  391. // Exonic sequences do not necessarily code for a translational product
  392. // (amino acids). Only the regions of exons bounded by the
  393. // [codingSequence][google.genomics.v1.Transcript.coding_sequence] correspond
  394. // to coding DNA sequence.
  395. //
  396. // Exons are ordered by start position and may not overlap.
  397. repeated Exon exons = 2;
  398. // The range of the coding sequence for this transcript, if any. To determine
  399. // the exact ranges of coding sequence, intersect this range with those of the
  400. // [exons][google.genomics.v1.Transcript.exons], if any. If there are any
  401. // [exons][google.genomics.v1.Transcript.exons], the
  402. // [codingSequence][google.genomics.v1.Transcript.coding_sequence] must start
  403. // and end within them.
  404. //
  405. // Note that in some cases, the reference genome will not exactly match the
  406. // observed mRNA transcript e.g. due to variance in the source genome from
  407. // reference. In these cases,
  408. // [exon.frame][google.genomics.v1.Transcript.Exon.frame] will not necessarily
  409. // match the expected reference reading frame and coding exon reference bases
  410. // cannot necessarily be concatenated to produce the original transcript mRNA.
  411. CodingSequence coding_sequence = 3;
  412. }
  413. message ExternalId {
  414. // The name of the source of this data.
  415. string source_name = 1;
  416. // The id used by the source of this data.
  417. string id = 2;
  418. }
  419. message CreateAnnotationSetRequest {
  420. // The annotation set to create.
  421. AnnotationSet annotation_set = 1;
  422. }
  423. message GetAnnotationSetRequest {
  424. // The ID of the annotation set to be retrieved.
  425. string annotation_set_id = 1;
  426. }
  427. message UpdateAnnotationSetRequest {
  428. // The ID of the annotation set to be updated.
  429. string annotation_set_id = 1;
  430. // The new annotation set.
  431. AnnotationSet annotation_set = 2;
  432. // An optional mask specifying which fields to update. Mutable fields are
  433. // [name][google.genomics.v1.AnnotationSet.name],
  434. // [source_uri][google.genomics.v1.AnnotationSet.source_uri], and
  435. // [info][google.genomics.v1.AnnotationSet.info]. If unspecified, all
  436. // mutable fields will be updated.
  437. google.protobuf.FieldMask update_mask = 3;
  438. }
  439. message DeleteAnnotationSetRequest {
  440. // The ID of the annotation set to be deleted.
  441. string annotation_set_id = 1;
  442. }
  443. message SearchAnnotationSetsRequest {
  444. // Required. The dataset IDs to search within. Caller must have `READ` access
  445. // to these datasets.
  446. repeated string dataset_ids = 1;
  447. // If specified, only annotation sets associated with the given reference set
  448. // are returned.
  449. string reference_set_id = 2;
  450. // Only return annotations sets for which a substring of the name matches this
  451. // string (case insensitive).
  452. string name = 3;
  453. // If specified, only annotation sets that have any of these types are
  454. // returned.
  455. repeated AnnotationType types = 4;
  456. // The continuation token, which is used to page through large result sets.
  457. // To get the next page of results, set this parameter to the value of
  458. // `nextPageToken` from the previous response.
  459. string page_token = 5;
  460. // The maximum number of results to return in a single page. If unspecified,
  461. // defaults to 128. The maximum value is 1024.
  462. int32 page_size = 6;
  463. }
  464. message SearchAnnotationSetsResponse {
  465. // The matching annotation sets.
  466. repeated AnnotationSet annotation_sets = 1;
  467. // The continuation token, which is used to page through large result sets.
  468. // Provide this value in a subsequent request to return the next page of
  469. // results. This field will be empty if there aren't any additional results.
  470. string next_page_token = 2;
  471. }
  472. message CreateAnnotationRequest {
  473. // The annotation to be created.
  474. Annotation annotation = 1;
  475. }
  476. message BatchCreateAnnotationsRequest {
  477. // The annotations to be created. At most 4096 can be specified in a single
  478. // request.
  479. repeated Annotation annotations = 1;
  480. // A unique request ID which enables the server to detect duplicated requests.
  481. // If provided, duplicated requests will result in the same response; if not
  482. // provided, duplicated requests may result in duplicated data. For a given
  483. // annotation set, callers should not reuse `request_id`s when writing
  484. // different batches of annotations - behavior in this case is undefined.
  485. // A common approach is to use a UUID. For batch jobs where worker crashes are
  486. // a possibility, consider using some unique variant of a worker or run ID.
  487. string request_id = 2;
  488. }
  489. message BatchCreateAnnotationsResponse {
  490. message Entry {
  491. // The creation status.
  492. google.rpc.Status status = 1;
  493. // The created annotation, if creation was successful.
  494. Annotation annotation = 2;
  495. }
  496. // The resulting per-annotation entries, ordered consistently with the
  497. // original request.
  498. repeated Entry entries = 1;
  499. }
  500. message GetAnnotationRequest {
  501. // The ID of the annotation to be retrieved.
  502. string annotation_id = 1;
  503. }
  504. message UpdateAnnotationRequest {
  505. // The ID of the annotation to be updated.
  506. string annotation_id = 1;
  507. // The new annotation.
  508. Annotation annotation = 2;
  509. // An optional mask specifying which fields to update. Mutable fields are
  510. // [name][google.genomics.v1.Annotation.name],
  511. // [variant][google.genomics.v1.Annotation.variant],
  512. // [transcript][google.genomics.v1.Annotation.transcript], and
  513. // [info][google.genomics.v1.Annotation.info]. If unspecified, all mutable
  514. // fields will be updated.
  515. google.protobuf.FieldMask update_mask = 3;
  516. }
  517. message DeleteAnnotationRequest {
  518. // The ID of the annotation to be deleted.
  519. string annotation_id = 1;
  520. }
  521. message SearchAnnotationsRequest {
  522. // Required. The annotation sets to search within. The caller must have
  523. // `READ` access to these annotation sets.
  524. // All queried annotation sets must have the same type.
  525. repeated string annotation_set_ids = 1;
  526. // Required. `reference_id` or `reference_name` must be set.
  527. oneof reference {
  528. // The ID of the reference to query.
  529. string reference_id = 2;
  530. // The name of the reference to query, within the reference set associated
  531. // with this query.
  532. string reference_name = 3;
  533. }
  534. // The start position of the range on the reference, 0-based inclusive. If
  535. // specified,
  536. // [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
  537. // [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
  538. // must be specified. Defaults to 0.
  539. int64 start = 4;
  540. // The end position of the range on the reference, 0-based exclusive. If
  541. // [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
  542. // [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
  543. // must be specified, Defaults to the length of the reference.
  544. int64 end = 5;
  545. // The continuation token, which is used to page through large result sets.
  546. // To get the next page of results, set this parameter to the value of
  547. // `nextPageToken` from the previous response.
  548. string page_token = 6;
  549. // The maximum number of results to return in a single page. If unspecified,
  550. // defaults to 256. The maximum value is 2048.
  551. int32 page_size = 7;
  552. }
  553. message SearchAnnotationsResponse {
  554. // The matching annotations.
  555. repeated Annotation annotations = 1;
  556. // The continuation token, which is used to page through large result sets.
  557. // Provide this value in a subsequent request to return the next page of
  558. // results. This field will be empty if there aren't any additional results.
  559. string next_page_token = 2;
  560. }
  561. // When an [Annotation][google.genomics.v1.Annotation] or
  562. // [AnnotationSet][google.genomics.v1.AnnotationSet] is created, if `type` is
  563. // not specified it will be set to `GENERIC`.
  564. enum AnnotationType {
  565. ANNOTATION_TYPE_UNSPECIFIED = 0;
  566. // A `GENERIC` annotation type should be used when no other annotation
  567. // type will suffice. This represents an untyped annotation of the reference
  568. // genome.
  569. GENERIC = 1;
  570. // A `VARIANT` annotation type.
  571. VARIANT = 2;
  572. // A `GENE` annotation type represents the existence of a gene at the
  573. // associated reference coordinates. The start coordinate is typically the
  574. // gene's transcription start site and the end is typically the end of the
  575. // gene's last exon.
  576. GENE = 3;
  577. // A `TRANSCRIPT` annotation type represents the assertion that a
  578. // particular region of the reference genome may be transcribed as RNA.
  579. TRANSCRIPT = 4;
  580. }