Skip to content

Commit 08c8fb6

Browse files
authored
fix: Consolidate CLI (#650)
1 parent ff4a2cc commit 08c8fb6

File tree

15 files changed

+1373
-293
lines changed

15 files changed

+1373
-293
lines changed

openapi.schema.yaml

Lines changed: 343 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,58 @@ paths:
5656
application/json:
5757
schema:
5858
$ref: '#/components/schemas/CustomError'
59+
/api/v1/seqvars/clinvar:
60+
get:
61+
tags:
62+
- seqvars_clinvar
63+
summary: Query for ClinVar information of a variant.
64+
operationId: seqvarsClinvar
65+
parameters:
66+
- name: genome_release
67+
in: query
68+
description: The assembly.
69+
required: true
70+
schema:
71+
$ref: '#/components/schemas/GenomeRelease'
72+
- name: chromosome
73+
in: query
74+
description: SPDI sequence.
75+
required: true
76+
schema:
77+
type: string
78+
- name: position
79+
in: query
80+
description: SPDI position.
81+
required: true
82+
schema:
83+
type: integer
84+
format: int32
85+
minimum: 0
86+
- name: reference
87+
in: query
88+
description: SPDI deletion.
89+
required: true
90+
schema:
91+
type: string
92+
- name: alternative
93+
in: query
94+
description: SPDI insertion.
95+
required: true
96+
schema:
97+
type: string
98+
responses:
99+
'200':
100+
description: Clinvar information.
101+
content:
102+
application/json:
103+
schema:
104+
$ref: '#/components/schemas/ClinvarResponse'
105+
'500':
106+
description: Internal server error.
107+
content:
108+
application/json:
109+
schema:
110+
$ref: '#/components/schemas/CustomError'
59111
/api/v1/seqvars/csq:
60112
get:
61113
tags:
@@ -115,6 +167,58 @@ paths:
115167
application/json:
116168
schema:
117169
$ref: '#/components/schemas/CustomError'
170+
/api/v1/seqvars/frequency:
171+
get:
172+
tags:
173+
- seqvars_frequencies
174+
summary: Query for gnomAD frequencies of a variant.
175+
operationId: seqvarsFrequency
176+
parameters:
177+
- name: genome_release
178+
in: query
179+
description: The assembly.
180+
required: true
181+
schema:
182+
$ref: '#/components/schemas/GenomeRelease'
183+
- name: chromosome
184+
in: query
185+
description: SPDI sequence.
186+
required: true
187+
schema:
188+
type: string
189+
- name: position
190+
in: query
191+
description: SPDI position.
192+
required: true
193+
schema:
194+
type: integer
195+
format: int32
196+
minimum: 0
197+
- name: reference
198+
in: query
199+
description: SPDI deletion.
200+
required: true
201+
schema:
202+
type: string
203+
- name: alternative
204+
in: query
205+
description: SPDI insertion.
206+
required: true
207+
schema:
208+
type: string
209+
responses:
210+
'200':
211+
description: Frequency information.
212+
content:
213+
application/json:
214+
schema:
215+
$ref: '#/components/schemas/FrequencyResponse'
216+
'500':
217+
description: Internal server error.
218+
content:
219+
application/json:
220+
schema:
221+
$ref: '#/components/schemas/CustomError'
118222
/api/v1/strucvars/csq:
119223
get:
120224
tags:
@@ -198,6 +302,98 @@ components:
198302
enum:
199303
- grch37
200304
- grch38
305+
AutosomalResultEntry:
306+
type: object
307+
required:
308+
- gnomad_exomes_an
309+
- gnomad_exomes_hom
310+
- gnomad_exomes_het
311+
- gnomad_genomes_an
312+
- gnomad_genomes_hom
313+
- gnomad_genomes_het
314+
properties:
315+
gnomad_exomes_an:
316+
type: integer
317+
format: int32
318+
minimum: 0
319+
gnomad_exomes_hom:
320+
type: integer
321+
format: int32
322+
minimum: 0
323+
gnomad_exomes_het:
324+
type: integer
325+
format: int32
326+
minimum: 0
327+
gnomad_genomes_an:
328+
type: integer
329+
format: int32
330+
minimum: 0
331+
gnomad_genomes_hom:
332+
type: integer
333+
format: int32
334+
minimum: 0
335+
gnomad_genomes_het:
336+
type: integer
337+
format: int32
338+
minimum: 0
339+
ClinvarQuery:
340+
type: object
341+
description: Query parameters of the `/api/v1/seqvars/clinvar` endpoint.
342+
required:
343+
- genome_release
344+
- chromosome
345+
- position
346+
- reference
347+
- alternative
348+
properties:
349+
genome_release:
350+
$ref: '#/components/schemas/GenomeRelease'
351+
chromosome:
352+
type: string
353+
description: SPDI sequence.
354+
position:
355+
type: integer
356+
format: int32
357+
description: SPDI position.
358+
minimum: 0
359+
reference:
360+
type: string
361+
description: SPDI deletion.
362+
alternative:
363+
type: string
364+
description: SPDI insertion.
365+
ClinvarResponse:
366+
type: object
367+
description: Response of the `/api/v1/seqvars/clinvar` endpoint.
368+
required:
369+
- version
370+
- query
371+
- result
372+
properties:
373+
version:
374+
$ref: '#/components/schemas/VersionsInfoResponse'
375+
query:
376+
$ref: '#/components/schemas/ClinvarQuery'
377+
result:
378+
type: array
379+
items:
380+
$ref: '#/components/schemas/ClinvarResultEntry'
381+
description: The resulting records for the scored genes.
382+
ClinvarResultEntry:
383+
type: object
384+
description: One entry in `ClinvarResponse`.
385+
required:
386+
- clinvar_vcv
387+
- clinvar_germline_classification
388+
properties:
389+
clinvar_vcv:
390+
type: array
391+
items:
392+
type: string
393+
clinvar_germline_classification:
394+
type: array
395+
items:
396+
type: string
201397
Consequence:
202398
type: string
203399
description: Putative impact.
@@ -339,6 +535,70 @@ components:
339535
value:
340536
type: string
341537
description: Enum for `AnnField::feature_type`.
538+
FrequencyQuery:
539+
type: object
540+
description: Query parameters of the `/api/v1/seqvars/frequency` endpoint.
541+
required:
542+
- genome_release
543+
- chromosome
544+
- position
545+
- reference
546+
- alternative
547+
properties:
548+
genome_release:
549+
$ref: '#/components/schemas/GenomeRelease'
550+
chromosome:
551+
type: string
552+
description: SPDI sequence.
553+
position:
554+
type: integer
555+
format: int32
556+
description: SPDI position.
557+
minimum: 0
558+
reference:
559+
type: string
560+
description: SPDI deletion.
561+
alternative:
562+
type: string
563+
description: SPDI insertion.
564+
FrequencyResponse:
565+
type: object
566+
description: Response of the `/api/v1/seqvars/frequency` endpoint.
567+
required:
568+
- version
569+
- query
570+
- result
571+
properties:
572+
version:
573+
$ref: '#/components/schemas/VersionsInfoResponse'
574+
query:
575+
$ref: '#/components/schemas/FrequencyQuery'
576+
result:
577+
type: array
578+
items:
579+
$ref: '#/components/schemas/FrequencyResultEntry'
580+
description: The resulting records for the scored genes.
581+
FrequencyResultEntry:
582+
oneOf:
583+
- type: object
584+
required:
585+
- Autosomal
586+
properties:
587+
Autosomal:
588+
$ref: '#/components/schemas/AutosomalResultEntry'
589+
- type: object
590+
required:
591+
- Gonosomal
592+
properties:
593+
Gonosomal:
594+
$ref: '#/components/schemas/GonosomalResultEntry'
595+
- type: object
596+
required:
597+
- Mitochondrial
598+
properties:
599+
Mitochondrial:
600+
$ref: '#/components/schemas/MitochondrialResultEntry'
601+
description: One entry in `FrequencyResponse`.
342602
GenesTranscriptsListQuery:
343603
type: object
344604
description: Query arguments for the `/api/v1/genes/transcripts` endpoint.
@@ -412,6 +672,50 @@ components:
412672
enum:
413673
- grch37
414674
- grch38
675+
GonosomalResultEntry:
676+
type: object
677+
required:
678+
- gnomad_exomes_an
679+
- gnomad_exomes_hom
680+
- gnomad_exomes_het
681+
- gnomad_exomes_hemi
682+
- gnomad_genomes_an
683+
- gnomad_genomes_hom
684+
- gnomad_genomes_het
685+
- gnomad_genomes_hemi
686+
properties:
687+
gnomad_exomes_an:
688+
type: integer
689+
format: int32
690+
minimum: 0
691+
gnomad_exomes_hom:
692+
type: integer
693+
format: int32
694+
minimum: 0
695+
gnomad_exomes_het:
696+
type: integer
697+
format: int32
698+
minimum: 0
699+
gnomad_exomes_hemi:
700+
type: integer
701+
format: int32
702+
minimum: 0
703+
gnomad_genomes_an:
704+
type: integer
705+
format: int32
706+
minimum: 0
707+
gnomad_genomes_hom:
708+
type: integer
709+
format: int32
710+
minimum: 0
711+
gnomad_genomes_het:
712+
type: integer
713+
format: int32
714+
minimum: 0
715+
gnomad_genomes_hemi:
716+
type: integer
717+
format: int32
718+
minimum: 0
415719
Message:
416720
type: string
417721
description: A message to be used in `AnnField::messages`.
@@ -426,6 +730,40 @@ components:
426730
- info_realign_three_prime
427731
- info_compound_annotation
428732
- info_non_reference_annotation
733+
MitochondrialResultEntry:
734+
type: object
735+
required:
736+
- helix_an
737+
- helix_hom
738+
- helix_het
739+
- gnomad_genomes_an
740+
- gnomad_genomes_hom
741+
- gnomad_genomes_het
742+
properties:
743+
helix_an:
744+
type: integer
745+
format: int32
746+
minimum: 0
747+
helix_hom:
748+
type: integer
749+
format: int32
750+
minimum: 0
751+
helix_het:
752+
type: integer
753+
format: int32
754+
minimum: 0
755+
gnomad_genomes_an:
756+
type: integer
757+
format: int32
758+
minimum: 0
759+
gnomad_genomes_hom:
760+
type: integer
761+
format: int32
762+
minimum: 0
763+
gnomad_genomes_het:
764+
type: integer
765+
format: int32
766+
minimum: 0
429767
Pos:
430768
type: object
431769
description: Position, optionally with total length.
@@ -519,6 +857,7 @@ components:
519857
- feature_id
520858
- feature_biotype
521859
- feature_tag
860+
- strand
522861
properties:
523862
consequences:
524863
type: array
@@ -574,6 +913,10 @@ components:
574913
format: int32
575914
description: Distance to feature.
576915
nullable: true
916+
strand:
917+
type: integer
918+
format: int32
919+
description: Strand of the alignment
577920
messages:
578921
type: array
579922
items:

0 commit comments

Comments
 (0)