forked from googleapis/google-api-go-client
/
genomics-gen.go
5132 lines (4599 loc) · 174 KB
/
genomics-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package genomics provides access to the Genomics API.
//
// Usage example:
//
// import "google.golang.org/api/genomics/v1"
// ...
// genomicsService, err := genomics.New(oauthHttpClient)
package genomics
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"golang.org/x/net/context"
"google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Background
const apiId = "genomics:v1"
const apiName = "genomics"
const apiVersion = "v1"
const basePath = "https://genomics.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data in Google BigQuery
BigqueryScope = "https://www.googleapis.com/auth/bigquery"
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// Manage your data in Google Cloud Storage
DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
// View and manage Genomics data
GenomicsScope = "https://www.googleapis.com/auth/genomics"
// View Genomics data
GenomicsReadonlyScope = "https://www.googleapis.com/auth/genomics.readonly"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Callsets = NewCallsetsService(s)
s.Datasets = NewDatasetsService(s)
s.Operations = NewOperationsService(s)
s.Readgroupsets = NewReadgroupsetsService(s)
s.Reads = NewReadsService(s)
s.References = NewReferencesService(s)
s.Referencesets = NewReferencesetsService(s)
s.Variants = NewVariantsService(s)
s.Variantsets = NewVariantsetsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Callsets *CallsetsService
Datasets *DatasetsService
Operations *OperationsService
Readgroupsets *ReadgroupsetsService
Reads *ReadsService
References *ReferencesService
Referencesets *ReferencesetsService
Variants *VariantsService
Variantsets *VariantsetsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewCallsetsService(s *Service) *CallsetsService {
rs := &CallsetsService{s: s}
return rs
}
type CallsetsService struct {
s *Service
}
func NewDatasetsService(s *Service) *DatasetsService {
rs := &DatasetsService{s: s}
return rs
}
type DatasetsService struct {
s *Service
}
func NewOperationsService(s *Service) *OperationsService {
rs := &OperationsService{s: s}
return rs
}
type OperationsService struct {
s *Service
}
func NewReadgroupsetsService(s *Service) *ReadgroupsetsService {
rs := &ReadgroupsetsService{s: s}
rs.Coveragebuckets = NewReadgroupsetsCoveragebucketsService(s)
return rs
}
type ReadgroupsetsService struct {
s *Service
Coveragebuckets *ReadgroupsetsCoveragebucketsService
}
func NewReadgroupsetsCoveragebucketsService(s *Service) *ReadgroupsetsCoveragebucketsService {
rs := &ReadgroupsetsCoveragebucketsService{s: s}
return rs
}
type ReadgroupsetsCoveragebucketsService struct {
s *Service
}
func NewReadsService(s *Service) *ReadsService {
rs := &ReadsService{s: s}
return rs
}
type ReadsService struct {
s *Service
}
func NewReferencesService(s *Service) *ReferencesService {
rs := &ReferencesService{s: s}
rs.Bases = NewReferencesBasesService(s)
return rs
}
type ReferencesService struct {
s *Service
Bases *ReferencesBasesService
}
func NewReferencesBasesService(s *Service) *ReferencesBasesService {
rs := &ReferencesBasesService{s: s}
return rs
}
type ReferencesBasesService struct {
s *Service
}
func NewReferencesetsService(s *Service) *ReferencesetsService {
rs := &ReferencesetsService{s: s}
return rs
}
type ReferencesetsService struct {
s *Service
}
func NewVariantsService(s *Service) *VariantsService {
rs := &VariantsService{s: s}
return rs
}
type VariantsService struct {
s *Service
}
func NewVariantsetsService(s *Service) *VariantsetsService {
rs := &VariantsetsService{s: s}
return rs
}
type VariantsetsService struct {
s *Service
}
// CallSet: A call set is a collection of variant calls, typically for
// one sample. It belongs to a variant set.
type CallSet struct {
// Created: The date this call set was created in milliseconds from the
// epoch.
Created int64 `json:"created,omitempty,string"`
// Id: The server-generated call set ID, unique across all call sets.
Id string `json:"id,omitempty"`
// Info: A map of additional call set information. This must be of the
// form map (string key mapping to a list of string values).
Info *CallSetInfo `json:"info,omitempty"`
// Name: The call set name.
Name string `json:"name,omitempty"`
// SampleId: The sample ID this call set corresponds to.
SampleId string `json:"sampleId,omitempty"`
// VariantSetIds: The IDs of the variant sets this call set belongs to.
VariantSetIds []string `json:"variantSetIds,omitempty"`
}
// CallSetInfo: A map of additional call set information. This must be
// of the form map (string key mapping to a list of string values).
type CallSetInfo struct {
}
// CancelOperationRequest: The request message for
// [Operations.CancelOperation][google.longrunning.Operations.CancelOpera
// tion].
type CancelOperationRequest struct {
}
// CigarUnit: A single CIGAR operation.
type CigarUnit struct {
// Possible values:
// "OPERATION_UNSPECIFIED"
// "ALIGNMENT_MATCH"
// "INSERT"
// "DELETE"
// "SKIP"
// "CLIP_SOFT"
// "CLIP_HARD"
// "PAD"
// "SEQUENCE_MATCH"
// "SEQUENCE_MISMATCH"
Operation string `json:"operation,omitempty"`
// OperationLength: The number of genomic bases that the operation runs
// for. Required.
OperationLength int64 `json:"operationLength,omitempty,string"`
// ReferenceSequence: `referenceSequence` is only used at mismatches
// (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). Filling this field
// replaces SAM's MD tag. If the relevant information is not available,
// this field is unset.
ReferenceSequence string `json:"referenceSequence,omitempty"`
}
// CoverageBucket: A bucket over which read coverage has been
// precomputed. A bucket corresponds to a specific range of the
// reference sequence.
type CoverageBucket struct {
// MeanCoverage: The average number of reads which are aligned to each
// individual reference base in this bucket.
MeanCoverage float64 `json:"meanCoverage,omitempty"`
// Range: The genomic coordinate range spanned by this bucket.
Range *Range `json:"range,omitempty"`
}
// Dataset: A Dataset is a collection of genomic data.
type Dataset struct {
// CreateTime: The time this dataset was created, in seconds from the
// epoch.
CreateTime string `json:"createTime,omitempty"`
// Id: The server-generated dataset ID, unique across all datasets.
Id string `json:"id,omitempty"`
// Name: The dataset name.
Name string `json:"name,omitempty"`
// ProjectId: The Google Developers Console project ID that this dataset
// belongs to.
ProjectId string `json:"projectId,omitempty"`
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated empty messages in your APIs. A typical example is to use
// it as the request or the response type of an API method. For
// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty); } The JSON representation for `Empty` is
// empty JSON object `{}`.
type Empty struct {
}
type Experiment struct {
// InstrumentModel: The instrument model used as part of this
// experiment. This maps to sequencing technology in BAM.
InstrumentModel string `json:"instrumentModel,omitempty"`
// LibraryId: The library used as part of this experiment. Note: This is
// not an actual ID within this repository, but rather an identifier for
// a library which may be meaningful to some external system.
LibraryId string `json:"libraryId,omitempty"`
// PlatformUnit: The platform unit used as part of this experiment e.g.
// flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to
// the @RG PU field in the SAM spec.
PlatformUnit string `json:"platformUnit,omitempty"`
// SequencingCenter: The sequencing center used as part of this
// experiment.
SequencingCenter string `json:"sequencingCenter,omitempty"`
}
// ExportReadGroupSetRequest: The read group set export request.
type ExportReadGroupSetRequest struct {
// ExportUri: Required. A Google Cloud Storage URI for the exported BAM
// file. The currently authenticated user must have write access to the
// new file. An error will be returned if the URI already contains data.
ExportUri string `json:"exportUri,omitempty"`
// ProjectId: Required. The Google Developers Console project ID that
// owns this export.
ProjectId string `json:"projectId,omitempty"`
// ReferenceNames: The reference names to export. If this is not
// specified, all reference sequences, including unmapped reads, are
// exported. Use `*` to export only unmapped reads.
ReferenceNames []string `json:"referenceNames,omitempty"`
}
// ExportVariantSetRequest: The variant data export request.
type ExportVariantSetRequest struct {
// BigqueryDataset: Required. The BigQuery dataset to export data to.
// This dataset must already exist. Note that this is distinct from the
// Genomics concept of "dataset".
BigqueryDataset string `json:"bigqueryDataset,omitempty"`
// BigqueryTable: Required. The BigQuery table to export data to. If the
// table doesn't exist, it will be created. If it already exists, it
// will be overwritten.
BigqueryTable string `json:"bigqueryTable,omitempty"`
// CallSetIds: If provided, only variant call information from the
// specified call sets will be exported. By default all variant calls
// are exported.
CallSetIds []string `json:"callSetIds,omitempty"`
// Format: The format for the exported data.
//
// Possible values:
// "FORMAT_UNSPECIFIED"
// "FORMAT_BIGQUERY"
Format string `json:"format,omitempty"`
// ProjectId: Required. The Google Cloud project ID that owns the
// destination BigQuery dataset. The caller must have WRITE access to
// this project. This project will also own the resulting export job.
ProjectId string `json:"projectId,omitempty"`
}
// ImportReadGroupSetsRequest: The read group set import request.
type ImportReadGroupSetsRequest struct {
// DatasetId: Required. The ID of the dataset these read group sets will
// belong to. The caller must have WRITE permissions to this dataset.
DatasetId string `json:"datasetId,omitempty"`
// PartitionStrategy: The partition strategy describes how read groups
// are partitioned into read group sets.
//
// Possible values:
// "PARTITION_STRATEGY_UNSPECIFIED"
// "PER_FILE_PER_SAMPLE"
// "MERGE_ALL"
PartitionStrategy string `json:"partitionStrategy,omitempty"`
// ReferenceSetId: The reference set to which the imported read group
// sets are aligned to, if any. The reference names of this reference
// set must be a superset of those found in the imported file headers.
// If no reference set id is provided, a best effort is made to
// associate with a matching reference set.
ReferenceSetId string `json:"referenceSetId,omitempty"`
// SourceUris: A list of URIs pointing at BAM files in Google Cloud
// Storage.
SourceUris []string `json:"sourceUris,omitempty"`
}
// ImportReadGroupSetsResponse: The read group set import response.
type ImportReadGroupSetsResponse struct {
// ReadGroupSetIds: IDs of the read group sets that were created.
ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
}
// ImportVariantsRequest: The variant data import request.
type ImportVariantsRequest struct {
// Format: The format of the variant data being imported. If
// unspecified, defaults to to `VCF`.
//
// Possible values:
// "FORMAT_UNSPECIFIED"
// "FORMAT_VCF"
// "FORMAT_COMPLETE_GENOMICS"
Format string `json:"format,omitempty"`
// NormalizeReferenceNames: Convert reference names to the canonical
// representation. hg19 haploytypes (those reference names containing
// "_hap") are not modified in any way. All other reference names are
// modified according to the following rules: The reference name is
// capitalized. The "chr" prefix is dropped for all autosomes and sex
// chromsomes. For example "chr17" becomes "17" and "chrX" becomes "X".
// All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
NormalizeReferenceNames bool `json:"normalizeReferenceNames,omitempty"`
// SourceUris: A list of URIs referencing variant files in Google Cloud
// Storage. URIs can include wildcards [as described
// here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNa
// mes). Note that recursive wildcards ('**') are not supported.
SourceUris []string `json:"sourceUris,omitempty"`
// VariantSetId: Required. The variant set to which variant data should
// be imported.
VariantSetId string `json:"variantSetId,omitempty"`
}
// ImportVariantsResponse: The variant data import response.
type ImportVariantsResponse struct {
// CallSetIds: IDs of the call sets that were created.
CallSetIds []string `json:"callSetIds,omitempty"`
}
// LinearAlignment: A linear alignment can be represented by one CIGAR
// string. Describes the mapped position and local alignment of the read
// to the reference.
type LinearAlignment struct {
// Cigar: Represents the local alignment of this sequence (alignment
// matches, indels, etc) against the reference.
Cigar []*CigarUnit `json:"cigar,omitempty"`
// MappingQuality: The mapping quality of this alignment. Represents how
// likely the read maps to this position as opposed to other locations.
MappingQuality int64 `json:"mappingQuality,omitempty"`
// Position: The position of this alignment.
Position *Position `json:"position,omitempty"`
}
type ListBasesResponse struct {
// NextPageToken: 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.
NextPageToken string `json:"nextPageToken,omitempty"`
// Offset: The offset position (0-based) of the given `sequence` from
// the start of this `Reference`. This value will differ for each page
// in a paginated request.
Offset int64 `json:"offset,omitempty,string"`
// Sequence: A substring of the bases that make up this reference.
Sequence string `json:"sequence,omitempty"`
}
type ListCoverageBucketsResponse struct {
// BucketWidth: The length of each coverage bucket in base pairs. Note
// that buckets at the end of a reference sequence may be shorter. This
// value is omitted if the bucket width is infinity (the default
// behaviour, with no range or `targetBucketWidth`).
BucketWidth int64 `json:"bucketWidth,omitempty,string"`
// CoverageBuckets: The coverage buckets. The list of buckets is sparse;
// a bucket with 0 overlapping reads is not returned. A bucket never
// crosses more than one reference sequence. Each bucket has width
// `bucketWidth`, unless its end is the end of the reference sequence.
CoverageBuckets []*CoverageBucket `json:"coverageBuckets,omitempty"`
// NextPageToken: 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.
NextPageToken string `json:"nextPageToken,omitempty"`
}
// ListDatasetsResponse: The dataset list response.
type ListDatasetsResponse struct {
// Datasets: The list of matching Datasets.
Datasets []*Dataset `json:"datasets,omitempty"`
// NextPageToken: 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.
NextPageToken string `json:"nextPageToken,omitempty"`
}
// ListOperationsResponse: The response message for
// [Operations.ListOperations][google.longrunning.Operations.ListOperatio
// ns].
type ListOperationsResponse struct {
// NextPageToken: The standard List next-page token.
NextPageToken string `json:"nextPageToken,omitempty"`
// Operations: A list of operations that matches the specified filter in
// the request.
Operations []*Operation `json:"operations,omitempty"`
}
type MergeVariantsRequest struct {
// VariantSetId: The destination variant set.
VariantSetId string `json:"variantSetId,omitempty"`
// Variants: The variants to be merged with existing variants.
Variants []*Variant `json:"variants,omitempty"`
}
// Operation: This resource represents a long-running operation that is
// the result of a network API call.
type Operation struct {
// Done: If the value is `false`, it means the operation is still in
// progress. If true, the operation is completed and the `result` is
// available.
Done bool `json:"done,omitempty"`
// Error: The error result of the operation in case of failure.
Error *Status `json:"error,omitempty"`
// Metadata: An
// [OperationMetadata][google.genomics.v1.OperationMetadata] object.
// This will always be returned with the
// [Operation][google.longrunning.Operation].
Metadata OperationMetadata `json:"metadata,omitempty"`
// Name: The server-assigned name, which is only unique within the same
// service that originally returns it. For example:
// `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`
Name string `json:"name,omitempty"`
// Response: If importing
// [ReadGroupSets][google.genomics.v1.ReadGroupSet], an
// [ImportReadGroupSetsResponse][google.genomics.v1.ImportReadGroupSetsRe
// sponse] is returned. If importing
// [Variants][google.genomics.v1.Variant], an
// [ImportVariantsResponse][google.genomics.v1.ImportVariantsResponse]
// is returned. For exports, an empty response is returned.
Response OperationResponse `json:"response,omitempty"`
}
type OperationMetadata interface{}
type OperationResponse interface{}
// OperationEvent: An event that occurred during an
// [Operation][google.longrunning.Operation].
type OperationEvent struct {
// Description: Required description of event.
Description string `json:"description,omitempty"`
}
// OperationMetadata1: Metadata describing an
// [Operation][google.longrunning.Operation].
type OperationMetadata1 struct {
// CreateTime: The time at which the job was submitted to the Genomics
// service.
CreateTime string `json:"createTime,omitempty"`
// Events: Optional event messages that were generated during the job's
// execution. This also contains any warnings that were generated during
// import or export.
Events []*OperationEvent `json:"events,omitempty"`
// ProjectId: The Google Cloud Project in which the job is scoped.
ProjectId string `json:"projectId,omitempty"`
// Request: The original request that started the operation. Note that
// this will be in current version of the API. If the operation was
// started with v1beta2 API and a GetOperation is performed on v1 API, a
// v1 request will be returned.
Request OperationMetadataRequest `json:"request,omitempty"`
}
type OperationMetadataRequest interface{}
// Position: An abstraction for referring to a genomic position, in
// relation to some already known reference. For now, represents a
// genomic position as a reference name, a base number on that reference
// (0-based), and a determination of forward or reverse strand.
type Position struct {
// Position: The 0-based offset from the start of the forward strand for
// that reference.
Position int64 `json:"position,omitempty,string"`
// ReferenceName: The name of the reference in whatever reference set is
// being used.
ReferenceName string `json:"referenceName,omitempty"`
// ReverseStrand: Whether this position is on the reverse strand, as
// opposed to the forward strand.
ReverseStrand bool `json:"reverseStrand,omitempty"`
}
type Program struct {
// CommandLine: The command line used to run this program.
CommandLine string `json:"commandLine,omitempty"`
// Id: The user specified locally unique ID of the program. Used along
// with `prevProgramId` to define an ordering between programs.
Id string `json:"id,omitempty"`
// Name: The name of the program.
Name string `json:"name,omitempty"`
// PrevProgramId: The ID of the program run before this one.
PrevProgramId string `json:"prevProgramId,omitempty"`
// Version: The version of the program run.
Version string `json:"version,omitempty"`
}
// Range: A 0-based half-open genomic coordinate range for search
// requests.
type Range struct {
// End: The end position of the range on the reference, 0-based
// exclusive.
End int64 `json:"end,omitempty,string"`
// ReferenceName: The reference sequence name, for example `chr1`, `1`,
// or `chrX`.
ReferenceName string `json:"referenceName,omitempty"`
// Start: The start position of the range on the reference, 0-based
// inclusive.
Start int64 `json:"start,omitempty,string"`
}
// Read: A read alignment describes a linear alignment of a string of
// DNA to a [reference sequence][google.genomics.v1.Reference], in
// addition to metadata about the fragment (the molecule of DNA
// sequenced) and the read (the bases which were read by the sequencer).
// A read is equivalent to a line in a SAM file. A read belongs to
// exactly one read group and exactly one [read group
// set][google.genomics.v1.ReadGroupSet]. ### Generating a
// reference-aligned sequence string When interacting with mapped reads,
// it's often useful to produce a string representing the local
// alignment of the read to reference. The following pseudocode
// demonstrates one way of doing this: out = "" offset = 0 for c in
// read.alignment.cigar { switch c.operation { case "ALIGNMENT_MATCH",
// "SEQUENCE_MATCH", "SEQUENCE_MISMATCH": out +=
// read.alignedSequence[offset:offset+c.operationLength] offset +=
// c.operationLength break case "CLIP_SOFT", "INSERT": offset +=
// c.operationLength break case "PAD": out += repeat("*",
// c.operationLength) break case "DELETE": out += repeat("-",
// c.operationLength) break case "SKIP": out += repeat(" ",
// c.operationLength) break case "CLIP_HARD": break } } return out ###
// Converting to SAM's CIGAR string The following pseudocode generates a
// SAM CIGAR string from the `cigar` field. Note that this is a lossy
// conversion (`cigar.referenceSequence` is lost). cigarMap = {
// "ALIGNMENT_MATCH": "M", "INSERT": "I", "DELETE": "D", "SKIP": "N",
// "CLIP_SOFT": "S", "CLIP_HARD": "H", "PAD": "P", "SEQUENCE_MATCH":
// "=", "SEQUENCE_MISMATCH": "X", } cigarStr = "" for c in
// read.alignment.cigar { cigarStr += c.operationLength +
// cigarMap[c.operation] } return cigarStr
type Read struct {
// AlignedQuality: The quality of the read sequence contained in this
// alignment record. `alignedSequence` and `alignedQuality` may be
// shorter than the full read sequence and quality. This will occur if
// the alignment is part of a chimeric alignment, or if the read was
// trimmed. When this occurs, the CIGAR for this read will begin/end
// with a hard clip operator that will indicate the length of the
// excised sequence.
AlignedQuality []int64 `json:"alignedQuality,omitempty"`
// AlignedSequence: The bases of the read sequence contained in this
// alignment record, *without CIGAR operations applied*.
// `alignedSequence` and `alignedQuality` may be shorter than the full
// read sequence and quality. This will occur if the alignment is part
// of a chimeric alignment, or if the read was trimmed. When this
// occurs, the CIGAR for this read will begin/end with a hard clip
// operator that will indicate the length of the excised sequence.
AlignedSequence string `json:"alignedSequence,omitempty"`
// Alignment: The linear alignment for this alignment record. This field
// will be null if the read is unmapped.
Alignment *LinearAlignment `json:"alignment,omitempty"`
// DuplicateFragment: The fragment is a PCR or optical duplicate (SAM
// flag 0x400)
DuplicateFragment bool `json:"duplicateFragment,omitempty"`
// FailedVendorQualityChecks: SAM flag 0x200
FailedVendorQualityChecks bool `json:"failedVendorQualityChecks,omitempty"`
// FragmentLength: The observed length of the fragment, equivalent to
// TLEN in SAM.
FragmentLength int64 `json:"fragmentLength,omitempty"`
// FragmentName: The fragment name. Equivalent to QNAME (query template
// name) in SAM.
FragmentName string `json:"fragmentName,omitempty"`
// Id: The server-generated read ID, unique across all reads. This is
// different from the `fragmentName`.
Id string `json:"id,omitempty"`
// Info: A map of additional read alignment information. This must be of
// the form map (string key mapping to a list of string values).
Info *ReadInfo `json:"info,omitempty"`
// NextMatePosition: The mapping of the primary alignment of the
// `(readNumber+1)%numberReads` read in the fragment. It replaces mate
// position and mate strand in SAM.
NextMatePosition *Position `json:"nextMatePosition,omitempty"`
// NumberReads: The number of reads in the fragment (extension to SAM
// flag 0x1).
NumberReads int64 `json:"numberReads,omitempty"`
// ProperPlacement: The orientation and the distance between reads from
// the fragment are consistent with the sequencing protocol (SAM flag
// 0x2)
ProperPlacement bool `json:"properPlacement,omitempty"`
// ReadGroupId: The ID of the read group this read belongs to. (Every
// read must belong to exactly one read group.)
ReadGroupId string `json:"readGroupId,omitempty"`
// ReadGroupSetId: The ID of the read group set this read belongs to.
// (Every read must belong to exactly one read group set.)
ReadGroupSetId string `json:"readGroupSetId,omitempty"`
// ReadNumber: The read number in sequencing. 0-based and less than
// numberReads. This field replaces SAM flag 0x40 and 0x80.
ReadNumber int64 `json:"readNumber,omitempty"`
// SecondaryAlignment: Whether this alignment is secondary. Equivalent
// to SAM flag 0x100. A secondary alignment represents an alternative to
// the primary alignment for this read. Aligners may return secondary
// alignments if a read can map ambiguously to multiple coordinates in
// the genome. By convention, each read has one and only one alignment
// where both `secondaryAlignment` and `supplementaryAlignment` are
// false.
SecondaryAlignment bool `json:"secondaryAlignment,omitempty"`
// SupplementaryAlignment: Whether this alignment is supplementary.
// Equivalent to SAM flag 0x800. Supplementary alignments are used in
// the representation of a chimeric alignment. In a chimeric alignment,
// a read is split into multiple linear alignments that map to different
// reference contigs. The first linear alignment in the read will be
// designated as the representative alignment; the remaining linear
// alignments will be designated as supplementary alignments. These
// alignments may have different mapping quality scores. In each linear
// alignment in a chimeric alignment, the read will be hard clipped. The
// `alignedSequence` and `alignedQuality` fields in the alignment record
// will only represent the bases for its respective linear alignment.
SupplementaryAlignment bool `json:"supplementaryAlignment,omitempty"`
}
// ReadInfo: A map of additional read alignment information. This must
// be of the form map (string key mapping to a list of string values).
type ReadInfo struct {
}
// ReadGroup: A read group is all the data that's processed the same way
// by the sequencer.
type ReadGroup struct {
// DatasetId: The ID of the dataset this read group belongs to.
DatasetId string `json:"datasetId,omitempty"`
// Description: A free-form text description of this read group.
Description string `json:"description,omitempty"`
// Experiment: The experiment used to generate this read group.
Experiment *Experiment `json:"experiment,omitempty"`
// Id: The server-generated read group ID, unique for all read groups.
// Note: This is different than the `@RG ID` field in the SAM spec. For
// that value, see the `name` field.
Id string `json:"id,omitempty"`
// Info: A map of additional read group information. This must be of the
// form map (string key mapping to a list of string values).
Info *ReadGroupInfo `json:"info,omitempty"`
// Name: The read group name. This corresponds to the @RG ID field in
// the SAM spec.
Name string `json:"name,omitempty"`
// PredictedInsertSize: The predicted insert size of this read group.
// The insert size is the length the sequenced DNA fragment from
// end-to-end, not including the adapters.
PredictedInsertSize int64 `json:"predictedInsertSize,omitempty"`
// Programs: The programs used to generate this read group. Programs are
// always identical for all read groups within a read group set. For
// this reason, only the first read group in a returned set will have
// this field populated.
Programs []*Program `json:"programs,omitempty"`
// ReferenceSetId: The reference set the reads in this read group are
// aligned to. Required if there are any read alignments.
ReferenceSetId string `json:"referenceSetId,omitempty"`
// SampleId: The sample this read group's data was generated from. Note:
// This is not an actual ID within this repository, but rather an
// identifier for a sample which may be meaningful to some external
// system.
SampleId string `json:"sampleId,omitempty"`
}
// ReadGroupInfo: A map of additional read group information. This must
// be of the form map (string key mapping to a list of string values).
type ReadGroupInfo struct {
}
// ReadGroupSet: A read group set is a logical collection of read
// groups, which are collections of reads produced by a sequencer. A
// read group set typically models reads corresponding to one sample,
// sequenced one way, and aligned one way. * A read group set belongs to
// one dataset. * A read group belongs to one read group set. * A read
// belongs to one read group.
type ReadGroupSet struct {
// DatasetId: The dataset ID.
DatasetId string `json:"datasetId,omitempty"`
// Filename: The filename of the original source file for this read
// group set, if any.
Filename string `json:"filename,omitempty"`
// Id: The server-generated read group set ID, unique for all read group
// sets.
Id string `json:"id,omitempty"`
// Info: A map of additional read group set information.
Info *ReadGroupSetInfo `json:"info,omitempty"`
// Name: The read group set name. By default this will be initialized to
// the sample name of the sequenced data contained in this set.
Name string `json:"name,omitempty"`
// ReadGroups: The read groups in this set. There are typically 1-10
// read groups in a read group set.
ReadGroups []*ReadGroup `json:"readGroups,omitempty"`
// ReferenceSetId: The reference set the reads in this read group set
// are aligned to.
ReferenceSetId string `json:"referenceSetId,omitempty"`
}
// ReadGroupSetInfo: A map of additional read group set information.
type ReadGroupSetInfo struct {
}
// Reference: A reference is a canonical assembled DNA sequence,
// intended to act as a reference coordinate space for other genomic
// annotations. A single reference might represent the human chromosome
// 1 or mitochandrial DNA, for instance. A reference belongs to one or
// more reference sets.
type Reference struct {
// Id: The server-generated reference ID, unique across all references.
Id string `json:"id,omitempty"`
// Length: The length of this reference's sequence.
Length int64 `json:"length,omitempty,string"`
// Md5checksum: MD5 of the upper-case sequence excluding all whitespace
// characters (this is equivalent to SQ:M5 in SAM). This value is
// represented in lower case hexadecimal format.
Md5checksum string `json:"md5checksum,omitempty"`
// Name: The name of this reference, for example `22`.
Name string `json:"name,omitempty"`
// NcbiTaxonId: ID from http://www.ncbi.nlm.nih.gov/taxonomy (e.g.
// 9606->human) if not specified by the containing reference set.
NcbiTaxonId int64 `json:"ncbiTaxonId,omitempty"`
// SourceAccessions: All known corresponding accession IDs in INSDC
// (GenBank/ENA/DDBJ) ideally with a version number, for example
// `GCF_000001405.26`.
SourceAccessions []string `json:"sourceAccessions,omitempty"`
// SourceUri: The URI from which the sequence was obtained. Specifies a
// FASTA format file/string with one name, sequence pair.
SourceUri string `json:"sourceUri,omitempty"`
}
// ReferenceBound: ReferenceBound records an upper bound for the
// starting coordinate of variants in a particular reference.
type ReferenceBound struct {
// ReferenceName: The reference the bound is associate with.
ReferenceName string `json:"referenceName,omitempty"`
// UpperBound: An upper bound (inclusive) on the starting coordinate of
// any variant in the reference sequence.
UpperBound int64 `json:"upperBound,omitempty,string"`
}
// ReferenceSet: A reference set is a set of references which typically
// comprise a reference assembly for a species, such as `GRCh38` which
// is representative of the human genome. A reference set defines a
// common coordinate space for comparing reference-aligned experimental
// data. A reference set contains 1 or more references.
type ReferenceSet struct {
// AssemblyId: Public id of this reference set, such as `GRCh37`.
AssemblyId string `json:"assemblyId,omitempty"`
// Description: Free text description of this reference set.
Description string `json:"description,omitempty"`
// Id: The server-generated reference set ID, unique across all
// reference sets.
Id string `json:"id,omitempty"`
// Md5checksum: Order-independent MD5 checksum which identifies this
// reference set. The checksum is computed by sorting all lower case
// hexidecimal string `reference.md5checksum` (for all reference in this
// set) in ascending lexicographic order, concatenating, and taking the
// MD5 of that value. The resulting value is represented in lower case
// hexadecimal format.
Md5checksum string `json:"md5checksum,omitempty"`
// NcbiTaxonId: ID from http://www.ncbi.nlm.nih.gov/taxonomy (e.g.
// 9606->human) indicating the species which this assembly is intended
// to model. Note that contained references may specify a different
// `ncbiTaxonId`, as assemblies may contain reference sequences which do
// not belong to the modeled species, e.g. EBV in a human reference
// genome.
NcbiTaxonId int64 `json:"ncbiTaxonId,omitempty"`
// ReferenceIds: The IDs of the reference objects that are part of this
// set. `Reference.md5checksum` must be unique within this set.
ReferenceIds []string `json:"referenceIds,omitempty"`
// SourceAccessions: All known corresponding accession IDs in INSDC
// (GenBank/ENA/DDBJ) ideally with a version number, for example
// `NC_000001.11`.
SourceAccessions []string `json:"sourceAccessions,omitempty"`
// SourceUri: The URI from which the references were obtained.
SourceUri string `json:"sourceUri,omitempty"`
}
// SearchCallSetsRequest: The call set search request.
type SearchCallSetsRequest struct {
// Name: Only return call sets for which a substring of the name matches
// this string.
Name string `json:"name,omitempty"`
// PageSize: The maximum number of call sets to return. If unspecified,
// defaults to 1000.
PageSize int64 `json:"pageSize,omitempty"`
// PageToken: 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 `nextPageToken` from the previous response.
PageToken string `json:"pageToken,omitempty"`
// VariantSetIds: Restrict the query to call sets within the given
// variant sets. At least one ID must be provided.
VariantSetIds []string `json:"variantSetIds,omitempty"`
}
// SearchCallSetsResponse: The call set search response.
type SearchCallSetsResponse struct {
// CallSets: The list of matching call sets.
CallSets []*CallSet `json:"callSets,omitempty"`
// NextPageToken: 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.
NextPageToken string `json:"nextPageToken,omitempty"`
}
// SearchReadGroupSetsRequest: The read group set search request.
type SearchReadGroupSetsRequest struct {
// DatasetIds: Restricts this query to read group sets within the given
// datasets. At least one ID must be provided.
DatasetIds []string `json:"datasetIds,omitempty"`
// Name: Only return read group sets for which a substring of the name
// matches this string.
Name string `json:"name,omitempty"`