variants.proto 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  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/longrunning/operations.proto";
  18. import "google/protobuf/empty.proto";
  19. import "google/protobuf/field_mask.proto";
  20. import "google/protobuf/struct.proto";
  21. option cc_enable_arenas = true;
  22. option java_multiple_files = true;
  23. option java_outer_classname = "VariantsProto";
  24. option java_package = "com.google.genomics.v1";
  25. service StreamingVariantService {
  26. // Returns a stream of all the variants matching the search request, ordered
  27. // by reference name, position, and ID.
  28. rpc StreamVariants(StreamVariantsRequest) returns (stream StreamVariantsResponse) {
  29. option (google.api.http) = { post: "/v1/variants:stream" body: "*" };
  30. }
  31. }
  32. service VariantServiceV1 {
  33. // Creates variant data by asynchronously importing the provided information.
  34. //
  35. // For the definitions of variant sets and other genomics resources, see
  36. // [Fundamentals of Google
  37. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  38. //
  39. // The variants for import will be merged with any existing variant that
  40. // matches its reference sequence, start, end, reference bases, and
  41. // alternative bases. If no such variant exists, a new one will be created.
  42. //
  43. // When variants are merged, the call information from the new variant
  44. // is added to the existing variant, and Variant info fields are merged
  45. // as specified in
  46. // [infoMergeConfig][google.genomics.v1.ImportVariantsRequest.info_merge_config].
  47. // As a special case, for single-sample VCF files, QUAL and FILTER fields will
  48. // be moved to the call level; these are sometimes interpreted in a
  49. // call-specific context.
  50. // Imported VCF headers are appended to the metadata already in a variant set.
  51. rpc ImportVariants(ImportVariantsRequest) returns (google.longrunning.Operation) {
  52. option (google.api.http) = { post: "/v1/variants:import" body: "*" };
  53. }
  54. // Creates a new variant set.
  55. //
  56. // For the definitions of variant sets and other genomics resources, see
  57. // [Fundamentals of Google
  58. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  59. //
  60. // The provided variant set must have a valid `datasetId` set - all other
  61. // fields are optional. Note that the `id` field will be ignored, as this is
  62. // assigned by the server.
  63. rpc CreateVariantSet(CreateVariantSetRequest) returns (VariantSet) {
  64. option (google.api.http) = { post: "/v1/variantsets" body: "variant_set" };
  65. }
  66. // Exports variant set data to an external destination.
  67. //
  68. // For the definitions of variant sets and other genomics resources, see
  69. // [Fundamentals of Google
  70. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  71. rpc ExportVariantSet(ExportVariantSetRequest) returns (google.longrunning.Operation) {
  72. option (google.api.http) = { post: "/v1/variantsets/{variant_set_id}:export" body: "*" };
  73. }
  74. // Gets a variant set by ID.
  75. //
  76. // For the definitions of variant sets and other genomics resources, see
  77. // [Fundamentals of Google
  78. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  79. rpc GetVariantSet(GetVariantSetRequest) returns (VariantSet) {
  80. option (google.api.http) = { get: "/v1/variantsets/{variant_set_id}" };
  81. }
  82. // Returns a list of all variant sets matching search criteria.
  83. //
  84. // For the definitions of variant sets and other genomics resources, see
  85. // [Fundamentals of Google
  86. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  87. //
  88. // Implements
  89. // [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).
  90. rpc SearchVariantSets(SearchVariantSetsRequest) returns (SearchVariantSetsResponse) {
  91. option (google.api.http) = { post: "/v1/variantsets/search" body: "*" };
  92. }
  93. // Deletes a variant set including all variants, call sets, and calls within.
  94. // This is not reversible.
  95. //
  96. // For the definitions of variant sets and other genomics resources, see
  97. // [Fundamentals of Google
  98. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  99. rpc DeleteVariantSet(DeleteVariantSetRequest) returns (google.protobuf.Empty) {
  100. option (google.api.http) = { delete: "/v1/variantsets/{variant_set_id}" };
  101. }
  102. // Updates a variant set using patch semantics.
  103. //
  104. // For the definitions of variant sets and other genomics resources, see
  105. // [Fundamentals of Google
  106. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  107. rpc UpdateVariantSet(UpdateVariantSetRequest) returns (VariantSet) {
  108. option (google.api.http) = { patch: "/v1/variantsets/{variant_set_id}" body: "variant_set" };
  109. }
  110. // Gets a list of variants matching the criteria.
  111. //
  112. // For the definitions of variants and other genomics resources, see
  113. // [Fundamentals of Google
  114. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  115. //
  116. // Implements
  117. // [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).
  118. rpc SearchVariants(SearchVariantsRequest) returns (SearchVariantsResponse) {
  119. option (google.api.http) = { post: "/v1/variants/search" body: "*" };
  120. }
  121. // Creates a new variant.
  122. //
  123. // For the definitions of variants and other genomics resources, see
  124. // [Fundamentals of Google
  125. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  126. rpc CreateVariant(CreateVariantRequest) returns (Variant) {
  127. option (google.api.http) = { post: "/v1/variants" body: "variant" };
  128. }
  129. // Updates a variant.
  130. //
  131. // For the definitions of variants and other genomics resources, see
  132. // [Fundamentals of Google
  133. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  134. //
  135. // This method supports patch semantics. Returns the modified variant without
  136. // its calls.
  137. rpc UpdateVariant(UpdateVariantRequest) returns (Variant) {
  138. option (google.api.http) = { patch: "/v1/variants/{variant_id}" body: "variant" };
  139. }
  140. // Deletes a variant.
  141. //
  142. // For the definitions of variants and other genomics resources, see
  143. // [Fundamentals of Google
  144. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  145. rpc DeleteVariant(DeleteVariantRequest) returns (google.protobuf.Empty) {
  146. option (google.api.http) = { delete: "/v1/variants/{variant_id}" };
  147. }
  148. // Gets a variant by ID.
  149. //
  150. // For the definitions of variants and other genomics resources, see
  151. // [Fundamentals of Google
  152. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  153. rpc GetVariant(GetVariantRequest) returns (Variant) {
  154. option (google.api.http) = { get: "/v1/variants/{variant_id}" };
  155. }
  156. // Merges the given variants with existing variants.
  157. //
  158. // For the definitions of variants and other genomics resources, see
  159. // [Fundamentals of Google
  160. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  161. //
  162. // Each variant will be
  163. // merged with an existing variant that matches its reference sequence,
  164. // start, end, reference bases, and alternative bases. If no such variant
  165. // exists, a new one will be created.
  166. //
  167. // When variants are merged, the call information from the new variant
  168. // is added to the existing variant. Variant info fields are merged as
  169. // specified in the
  170. // [infoMergeConfig][google.genomics.v1.MergeVariantsRequest.info_merge_config]
  171. // field of the MergeVariantsRequest.
  172. //
  173. // Please exercise caution when using this method! It is easy to introduce
  174. // mistakes in existing variants and difficult to back out of them. For
  175. // example,
  176. // suppose you were trying to merge a new variant with an existing one and
  177. // both
  178. // variants contain calls that belong to callsets with the same callset ID.
  179. //
  180. // // Existing variant - irrelevant fields trimmed for clarity
  181. // {
  182. // "variantSetId": "10473108253681171589",
  183. // "referenceName": "1",
  184. // "start": "10582",
  185. // "referenceBases": "G",
  186. // "alternateBases": [
  187. // "A"
  188. // ],
  189. // "calls": [
  190. // {
  191. // "callSetId": "10473108253681171589-0",
  192. // "callSetName": "CALLSET0",
  193. // "genotype": [
  194. // 0,
  195. // 1
  196. // ],
  197. // }
  198. // ]
  199. // }
  200. //
  201. // // New variant with conflicting call information
  202. // {
  203. // "variantSetId": "10473108253681171589",
  204. // "referenceName": "1",
  205. // "start": "10582",
  206. // "referenceBases": "G",
  207. // "alternateBases": [
  208. // "A"
  209. // ],
  210. // "calls": [
  211. // {
  212. // "callSetId": "10473108253681171589-0",
  213. // "callSetName": "CALLSET0",
  214. // "genotype": [
  215. // 1,
  216. // 1
  217. // ],
  218. // }
  219. // ]
  220. // }
  221. //
  222. // The resulting merged variant would overwrite the existing calls with those
  223. // from the new variant:
  224. //
  225. // {
  226. // "variantSetId": "10473108253681171589",
  227. // "referenceName": "1",
  228. // "start": "10582",
  229. // "referenceBases": "G",
  230. // "alternateBases": [
  231. // "A"
  232. // ],
  233. // "calls": [
  234. // {
  235. // "callSetId": "10473108253681171589-0",
  236. // "callSetName": "CALLSET0",
  237. // "genotype": [
  238. // 1,
  239. // 1
  240. // ],
  241. // }
  242. // ]
  243. // }
  244. //
  245. // This may be the desired outcome, but it is up to the user to determine if
  246. // if that is indeed the case.
  247. rpc MergeVariants(MergeVariantsRequest) returns (google.protobuf.Empty) {
  248. option (google.api.http) = { post: "/v1/variants:merge" body: "*" };
  249. }
  250. // Gets a list of call sets matching the criteria.
  251. //
  252. // For the definitions of call sets and other genomics resources, see
  253. // [Fundamentals of Google
  254. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  255. //
  256. // Implements
  257. // [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).
  258. rpc SearchCallSets(SearchCallSetsRequest) returns (SearchCallSetsResponse) {
  259. option (google.api.http) = { post: "/v1/callsets/search" body: "*" };
  260. }
  261. // Creates a new call set.
  262. //
  263. // For the definitions of call sets and other genomics resources, see
  264. // [Fundamentals of Google
  265. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  266. rpc CreateCallSet(CreateCallSetRequest) returns (CallSet) {
  267. option (google.api.http) = { post: "/v1/callsets" body: "call_set" };
  268. }
  269. // Updates a call set.
  270. //
  271. // For the definitions of call sets and other genomics resources, see
  272. // [Fundamentals of Google
  273. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  274. //
  275. // This method supports patch semantics.
  276. rpc UpdateCallSet(UpdateCallSetRequest) returns (CallSet) {
  277. option (google.api.http) = { patch: "/v1/callsets/{call_set_id}" body: "call_set" };
  278. }
  279. // Deletes a call set.
  280. //
  281. // For the definitions of call sets and other genomics resources, see
  282. // [Fundamentals of Google
  283. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  284. rpc DeleteCallSet(DeleteCallSetRequest) returns (google.protobuf.Empty) {
  285. option (google.api.http) = { delete: "/v1/callsets/{call_set_id}" };
  286. }
  287. // Gets a call set by ID.
  288. //
  289. // For the definitions of call sets and other genomics resources, see
  290. // [Fundamentals of Google
  291. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  292. rpc GetCallSet(GetCallSetRequest) returns (CallSet) {
  293. option (google.api.http) = { get: "/v1/callsets/{call_set_id}" };
  294. }
  295. }
  296. // Metadata describes a single piece of variant call metadata.
  297. // These data include a top level key and either a single value string (value)
  298. // or a list of key-value pairs (info.)
  299. // Value and info are mutually exclusive.
  300. message VariantSetMetadata {
  301. enum Type {
  302. TYPE_UNSPECIFIED = 0;
  303. INTEGER = 1;
  304. FLOAT = 2;
  305. FLAG = 3;
  306. CHARACTER = 4;
  307. STRING = 5;
  308. }
  309. // The top-level key.
  310. string key = 1;
  311. // The value field for simple metadata
  312. string value = 2;
  313. // User-provided ID field, not enforced by this API.
  314. // Two or more pieces of structured metadata with identical
  315. // id and key fields are considered equivalent.
  316. string id = 4;
  317. // The type of data. Possible types include: Integer, Float,
  318. // Flag, Character, and String.
  319. Type type = 5;
  320. // The number of values that can be included in a field described by this
  321. // metadata.
  322. string number = 8;
  323. // A textual description of this metadata.
  324. string description = 7;
  325. // Remaining structured metadata key-value pairs. This must be of the form
  326. // map<string, string[]> (string key mapping to a list of string values).
  327. map<string, google.protobuf.ListValue> info = 3;
  328. }
  329. // A variant set is a collection of call sets and variants. It contains summary
  330. // statistics of those contents. A variant set belongs to a dataset.
  331. //
  332. // For more genomics resource definitions, see [Fundamentals of Google
  333. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  334. message VariantSet {
  335. // The dataset to which this variant set belongs.
  336. string dataset_id = 1;
  337. // The server-generated variant set ID, unique across all variant sets.
  338. string id = 2;
  339. // The reference set to which the variant set is mapped. The reference set
  340. // describes the alignment provenance of the variant set, while the
  341. // `referenceBounds` describe the shape of the actual variant data. The
  342. // reference set's reference names are a superset of those found in the
  343. // `referenceBounds`.
  344. //
  345. // For example, given a variant set that is mapped to the GRCh38 reference set
  346. // and contains a single variant on reference 'X', `referenceBounds` would
  347. // contain only an entry for 'X', while the associated reference set
  348. // enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc.
  349. string reference_set_id = 6;
  350. // A list of all references used by the variants in a variant set
  351. // with associated coordinate upper bounds for each one.
  352. repeated ReferenceBound reference_bounds = 5;
  353. // The metadata associated with this variant set.
  354. repeated VariantSetMetadata metadata = 4;
  355. // User-specified, mutable name.
  356. string name = 7;
  357. // A textual description of this variant set.
  358. string description = 8;
  359. }
  360. // A variant represents a change in DNA sequence relative to a reference
  361. // sequence. For example, a variant could represent a SNP or an insertion.
  362. // Variants belong to a variant set.
  363. //
  364. // For more genomics resource definitions, see [Fundamentals of Google
  365. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  366. //
  367. // Each of the calls on a variant represent a determination of genotype with
  368. // respect to that variant. For example, a call might assign probability of 0.32
  369. // to the occurrence of a SNP named rs1234 in a sample named NA12345. A call
  370. // belongs to a call set, which contains related calls typically from one
  371. // sample.
  372. message Variant {
  373. // The ID of the variant set this variant belongs to.
  374. string variant_set_id = 15;
  375. // The server-generated variant ID, unique across all variants.
  376. string id = 2;
  377. // Names for the variant, for example a RefSNP ID.
  378. repeated string names = 3;
  379. // The date this variant was created, in milliseconds from the epoch.
  380. int64 created = 12;
  381. // The reference on which this variant occurs.
  382. // (such as `chr20` or `X`)
  383. string reference_name = 14;
  384. // The position at which this variant occurs (0-based).
  385. // This corresponds to the first base of the string of reference bases.
  386. int64 start = 16;
  387. // The end position (0-based) of this variant. This corresponds to the first
  388. // base after the last base in the reference allele. So, the length of
  389. // the reference allele is (end - start). This is useful for variants
  390. // that don't explicitly give alternate bases, for example large deletions.
  391. int64 end = 13;
  392. // The reference bases for this variant. They start at the given
  393. // position.
  394. string reference_bases = 6;
  395. // The bases that appear instead of the reference bases.
  396. repeated string alternate_bases = 7;
  397. // A measure of how likely this variant is to be real.
  398. // A higher value is better.
  399. double quality = 8;
  400. // A list of filters (normally quality filters) this variant has failed.
  401. // `PASS` indicates this variant has passed all filters.
  402. repeated string filter = 9;
  403. // A map of additional variant information. This must be of the form
  404. // map<string, string[]> (string key mapping to a list of string values).
  405. map<string, google.protobuf.ListValue> info = 10;
  406. // The variant calls for this particular variant. Each one represents the
  407. // determination of genotype with respect to this variant.
  408. repeated VariantCall calls = 11;
  409. }
  410. // A call represents the determination of genotype with respect to a particular
  411. // variant. It may include associated information such as quality and phasing.
  412. // For example, a call might assign a probability of 0.32 to the occurrence of
  413. // a SNP named rs1234 in a call set with the name NA12345.
  414. message VariantCall {
  415. // The ID of the call set this variant call belongs to.
  416. string call_set_id = 8;
  417. // The name of the call set this variant call belongs to.
  418. string call_set_name = 9;
  419. // The genotype of this variant call. Each value represents either the value
  420. // of the `referenceBases` field or a 1-based index into
  421. // `alternateBases`. If a variant had a `referenceBases`
  422. // value of `T` and an `alternateBases`
  423. // value of `["A", "C"]`, and the `genotype` was
  424. // `[2, 1]`, that would mean the call
  425. // represented the heterozygous value `CA` for this variant.
  426. // If the `genotype` was instead `[0, 1]`, the
  427. // represented value would be `TA`. Ordering of the
  428. // genotype values is important if the `phaseset` is present.
  429. // If a genotype is not called (that is, a `.` is present in the
  430. // GT string) -1 is returned.
  431. repeated int32 genotype = 7;
  432. // If this field is present, this variant call's genotype ordering implies
  433. // the phase of the bases and is consistent with any other variant calls in
  434. // the same reference sequence which have the same phaseset value.
  435. // When importing data from VCF, if the genotype data was phased but no
  436. // phase set was specified this field will be set to `*`.
  437. string phaseset = 5;
  438. // The genotype likelihoods for this variant call. Each array entry
  439. // represents how likely a specific genotype is for this call. The value
  440. // ordering is defined by the GL tag in the VCF spec.
  441. // If Phred-scaled genotype likelihood scores (PL) are available and
  442. // log10(P) genotype likelihood scores (GL) are not, PL scores are converted
  443. // to GL scores. If both are available, PL scores are stored in `info`.
  444. repeated double genotype_likelihood = 6;
  445. // A map of additional variant call information. This must be of the form
  446. // map<string, string[]> (string key mapping to a list of string values).
  447. map<string, google.protobuf.ListValue> info = 2;
  448. }
  449. // A call set is a collection of variant calls, typically for one sample. It
  450. // belongs to a variant set.
  451. //
  452. // For more genomics resource definitions, see [Fundamentals of Google
  453. // Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
  454. message CallSet {
  455. // The server-generated call set ID, unique across all call sets.
  456. string id = 1;
  457. // The call set name.
  458. string name = 2;
  459. // The sample ID this call set corresponds to.
  460. string sample_id = 7;
  461. // The IDs of the variant sets this call set belongs to. This field must
  462. // have exactly length one, as a call set belongs to a single variant set.
  463. // This field is repeated for compatibility with the
  464. // [GA4GH 0.5.1
  465. // API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76).
  466. repeated string variant_set_ids = 6;
  467. // The date this call set was created in milliseconds from the epoch.
  468. int64 created = 5;
  469. // A map of additional call set information. This must be of the form
  470. // map<string, string[]> (string key mapping to a list of string values).
  471. map<string, google.protobuf.ListValue> info = 4;
  472. }
  473. // ReferenceBound records an upper bound for the starting coordinate of
  474. // variants in a particular reference.
  475. message ReferenceBound {
  476. // The name of the reference associated with this reference bound.
  477. string reference_name = 1;
  478. // An upper bound (inclusive) on the starting coordinate of any
  479. // variant in the reference sequence.
  480. int64 upper_bound = 2;
  481. }
  482. // The variant data import request.
  483. message ImportVariantsRequest {
  484. enum Format {
  485. FORMAT_UNSPECIFIED = 0;
  486. // VCF (Variant Call Format). The VCF files should be uncompressed. gVCF is
  487. // also supported.
  488. FORMAT_VCF = 1;
  489. // Complete Genomics masterVarBeta format. The masterVarBeta files should
  490. // be bzip2 compressed.
  491. FORMAT_COMPLETE_GENOMICS = 2;
  492. }
  493. // Required. The variant set to which variant data should be imported.
  494. string variant_set_id = 1;
  495. // A list of URIs referencing variant files in Google Cloud Storage. URIs can
  496. // include wildcards [as described
  497. // here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames).
  498. // Note that recursive wildcards ('**') are not supported.
  499. repeated string source_uris = 2;
  500. // The format of the variant data being imported. If unspecified, defaults to
  501. // to `VCF`.
  502. Format format = 3;
  503. // Convert reference names to the canonical representation.
  504. // hg19 haploytypes (those reference names containing "_hap")
  505. // are not modified in any way.
  506. // All other reference names are modified according to the following rules:
  507. // The reference name is capitalized.
  508. // The "chr" prefix is dropped for all autosomes and sex chromsomes.
  509. // For example "chr17" becomes "17" and "chrX" becomes "X".
  510. // All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
  511. bool normalize_reference_names = 5;
  512. // A mapping between info field keys and the InfoMergeOperations to
  513. // be performed on them. This is plumbed down to the MergeVariantRequests
  514. // generated by the resulting import job.
  515. map<string, InfoMergeOperation> info_merge_config = 6;
  516. }
  517. // The variant data import response.
  518. message ImportVariantsResponse {
  519. // IDs of the call sets created during the import.
  520. repeated string call_set_ids = 1;
  521. }
  522. // The CreateVariantSet request
  523. message CreateVariantSetRequest {
  524. // Required. The variant set to be created. Must have a valid `datasetId`.
  525. VariantSet variant_set = 1;
  526. }
  527. // The variant data export request.
  528. message ExportVariantSetRequest {
  529. enum Format {
  530. FORMAT_UNSPECIFIED = 0;
  531. // Export the data to Google BigQuery.
  532. FORMAT_BIGQUERY = 1;
  533. }
  534. // Required. The ID of the variant set that contains variant data which
  535. // should be exported. The caller must have READ access to this variant set.
  536. string variant_set_id = 1;
  537. // If provided, only variant call information from the specified call sets
  538. // will be exported. By default all variant calls are exported.
  539. repeated string call_set_ids = 2;
  540. // Required. The Google Cloud project ID that owns the destination
  541. // BigQuery dataset. The caller must have WRITE access to this project. This
  542. // project will also own the resulting export job.
  543. string project_id = 3;
  544. // The format for the exported data.
  545. Format format = 4;
  546. // Required. The BigQuery dataset to export data to. This dataset must already
  547. // exist. Note that this is distinct from the Genomics concept of "dataset".
  548. string bigquery_dataset = 5;
  549. // Required. The BigQuery table to export data to.
  550. // If the table doesn't exist, it will be created. If it already exists, it
  551. // will be overwritten.
  552. string bigquery_table = 6;
  553. }
  554. // The variant set request.
  555. message GetVariantSetRequest {
  556. // Required. The ID of the variant set.
  557. string variant_set_id = 1;
  558. }
  559. // The search variant sets request.
  560. message SearchVariantSetsRequest {
  561. // Exactly one dataset ID must be provided here. Only variant sets which
  562. // belong to this dataset will be returned.
  563. repeated string dataset_ids = 1;
  564. // The continuation token, which is used to page through large result sets.
  565. // To get the next page of results, set this parameter to the value of
  566. // `nextPageToken` from the previous response.
  567. string page_token = 2;
  568. // The maximum number of results to return in a single page. If unspecified,
  569. // defaults to 1024.
  570. int32 page_size = 3;
  571. }
  572. // The search variant sets response.
  573. message SearchVariantSetsResponse {
  574. // The variant sets belonging to the requested dataset.
  575. repeated VariantSet variant_sets = 1;
  576. // The continuation token, which is used to page through large result sets.
  577. // Provide this value in a subsequent request to return the next page of
  578. // results. This field will be empty if there aren't any additional results.
  579. string next_page_token = 2;
  580. }
  581. // The delete variant set request.
  582. message DeleteVariantSetRequest {
  583. // The ID of the variant set to be deleted.
  584. string variant_set_id = 1;
  585. }
  586. message UpdateVariantSetRequest {
  587. // The ID of the variant to be updated (must already exist).
  588. string variant_set_id = 1;
  589. // The new variant data. Only the variant_set.metadata will be considered
  590. // for update.
  591. VariantSet variant_set = 2;
  592. // An optional mask specifying which fields to update. Supported fields:
  593. //
  594. // * [metadata][google.genomics.v1.VariantSet.metadata].
  595. // * [name][google.genomics.v1.VariantSet.name].
  596. // * [description][google.genomics.v1.VariantSet.description].
  597. //
  598. // Leaving `updateMask` unset is equivalent to specifying all mutable
  599. // fields.
  600. google.protobuf.FieldMask update_mask = 5;
  601. }
  602. // The variant search request.
  603. message SearchVariantsRequest {
  604. // At most one variant set ID must be provided. Only variants from this
  605. // variant set will be returned. If omitted, a call set id must be included in
  606. // the request.
  607. repeated string variant_set_ids = 1;
  608. // Only return variants which have exactly this name.
  609. string variant_name = 2;
  610. // Only return variant calls which belong to call sets with these ids.
  611. // Leaving this blank returns all variant calls. If a variant has no
  612. // calls belonging to any of these call sets, it won't be returned at all.
  613. repeated string call_set_ids = 3;
  614. // Required. Only return variants in this reference sequence.
  615. string reference_name = 4;
  616. // The beginning of the window (0-based, inclusive) for which
  617. // overlapping variants should be returned. If unspecified, defaults to 0.
  618. int64 start = 5;
  619. // The end of the window, 0-based exclusive. If unspecified or 0, defaults to
  620. // the length of the reference.
  621. int64 end = 6;
  622. // The continuation token, which is used to page through large result sets.
  623. // To get the next page of results, set this parameter to the value of
  624. // `nextPageToken` from the previous response.
  625. string page_token = 7;
  626. // The maximum number of variants to return in a single page. If unspecified,
  627. // defaults to 5000. The maximum value is 10000.
  628. int32 page_size = 8;
  629. // The maximum number of calls to return in a single page. Note that this
  630. // limit may be exceeded in the event that a matching variant contains more
  631. // calls than the requested maximum. If unspecified, defaults to 5000. The
  632. // maximum value is 10000.
  633. int32 max_calls = 9;
  634. }
  635. // The variant search response.
  636. message SearchVariantsResponse {
  637. // The list of matching Variants.
  638. repeated Variant variants = 1;
  639. // The continuation token, which is used to page through large result sets.
  640. // Provide this value in a subsequent request to return the next page of
  641. // results. This field will be empty if there aren't any additional results.
  642. string next_page_token = 2;
  643. }
  644. message CreateVariantRequest {
  645. // The variant to be created.
  646. Variant variant = 1;
  647. }
  648. message UpdateVariantRequest {
  649. // The ID of the variant to be updated.
  650. string variant_id = 1;
  651. // The new variant data.
  652. Variant variant = 2;
  653. // An optional mask specifying which fields to update. At this time, mutable
  654. // fields are [names][google.genomics.v1.Variant.names] and
  655. // [info][google.genomics.v1.Variant.info]. Acceptable values are "names" and
  656. // "info". If unspecified, all mutable fields will be updated.
  657. google.protobuf.FieldMask update_mask = 3;
  658. }
  659. message DeleteVariantRequest {
  660. // The ID of the variant to be deleted.
  661. string variant_id = 1;
  662. }
  663. message GetVariantRequest {
  664. // The ID of the variant.
  665. string variant_id = 1;
  666. }
  667. message MergeVariantsRequest {
  668. // The destination variant set.
  669. string variant_set_id = 1;
  670. // The variants to be merged with existing variants.
  671. repeated Variant variants = 2;
  672. // A mapping between info field keys and the InfoMergeOperations to
  673. // be performed on them.
  674. map<string, InfoMergeOperation> info_merge_config = 3;
  675. }
  676. // The call set search request.
  677. message SearchCallSetsRequest {
  678. // Restrict the query to call sets within the given variant sets. At least one
  679. // ID must be provided.
  680. repeated string variant_set_ids = 1;
  681. // Only return call sets for which a substring of the name matches this
  682. // string.
  683. string name = 2;
  684. // The continuation token, which is used to page through large result sets.
  685. // To get the next page of results, set this parameter to the value of
  686. // `nextPageToken` from the previous response.
  687. string page_token = 3;
  688. // The maximum number of results to return in a single page. If unspecified,
  689. // defaults to 1024.
  690. int32 page_size = 4;
  691. }
  692. // The call set search response.
  693. message SearchCallSetsResponse {
  694. // The list of matching call sets.
  695. repeated CallSet call_sets = 1;
  696. // The continuation token, which is used to page through large result sets.
  697. // Provide this value in a subsequent request to return the next page of
  698. // results. This field will be empty if there aren't any additional results.
  699. string next_page_token = 2;
  700. }
  701. message CreateCallSetRequest {
  702. // The call set to be created.
  703. CallSet call_set = 1;
  704. }
  705. message UpdateCallSetRequest {
  706. // The ID of the call set to be updated.
  707. string call_set_id = 1;
  708. // The new call set data.
  709. CallSet call_set = 2;
  710. // An optional mask specifying which fields to update. At this time, the only
  711. // mutable field is [name][google.genomics.v1.CallSet.name]. The only
  712. // acceptable value is "name". If unspecified, all mutable fields will be
  713. // updated.
  714. google.protobuf.FieldMask update_mask = 3;
  715. }
  716. message DeleteCallSetRequest {
  717. // The ID of the call set to be deleted.
  718. string call_set_id = 1;
  719. }
  720. message GetCallSetRequest {
  721. // The ID of the call set.
  722. string call_set_id = 1;
  723. }
  724. // The stream variants request.
  725. message StreamVariantsRequest {
  726. // The Google Developers Console project ID or number which will be billed
  727. // for this access. The caller must have WRITE access to this project.
  728. // Required.
  729. string project_id = 1;
  730. // The variant set ID from which to stream variants.
  731. string variant_set_id = 2;
  732. // Only return variant calls which belong to call sets with these IDs.
  733. // Leaving this blank returns all variant calls.
  734. repeated string call_set_ids = 3;
  735. // Required. Only return variants in this reference sequence.
  736. string reference_name = 4;
  737. // The beginning of the window (0-based, inclusive) for which
  738. // overlapping variants should be returned.
  739. int64 start = 5;
  740. // The end of the window (0-based, exclusive) for which overlapping
  741. // variants should be returned.
  742. int64 end = 6;
  743. }
  744. message StreamVariantsResponse {
  745. repeated Variant variants = 1;
  746. }
  747. // Operations to be performed during import on Variant info fields.
  748. // These operations are set for each info field in the info_merge_config
  749. // map of ImportVariantsRequest, which is plumbed down to the
  750. // MergeVariantRequests generated by the import job.
  751. enum InfoMergeOperation {
  752. INFO_MERGE_OPERATION_UNSPECIFIED = 0;
  753. // By default, Variant info fields are persisted if the Variant doesn't
  754. // already exist in the variantset. If the Variant is equivalent to a
  755. // Variant already in the variantset, the incoming Variant's info field
  756. // is ignored in favor of that of the already persisted Variant.
  757. IGNORE_NEW = 1;
  758. // This operation removes an info field from the incoming Variant
  759. // and persists this info field in each of the incoming Variant's Calls.
  760. MOVE_TO_CALLS = 2;
  761. }