Skip to content

Commit

Permalink
feat: /api/v1/strucvars/csq endpoint with OpenAPI (#607) (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Nov 11, 2024
1 parent 9132312 commit cce8a6d
Show file tree
Hide file tree
Showing 7 changed files with 358 additions and 63 deletions.
136 changes: 136 additions & 0 deletions openapi.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,59 @@ info:
name: MIT
version: 0.29.6
paths:
/api/v1/strucvars/csq:
get:
tags:
- strucvars_csq
summary: Query for consequence of a variant.
operationId: strucvarsCsq
parameters:
- name: genome_release
in: query
description: The assembly.
required: true
schema:
$ref: '#/components/schemas/GenomeRelease'
- name: chromosome
in: query
description: Chromosome.
required: true
schema:
type: string
- name: start
in: query
description: 1-based start position.
required: true
schema:
type: integer
format: int32
- name: stop
in: query
description: 1-based stop position, ignored for INS.
required: false
schema:
type: integer
format: int32
nullable: true
- name: sv_type
in: query
description: The variant type to use for annotation.
required: true
schema:
$ref: '#/components/schemas/StrucvarsSvType'
responses:
'200':
description: Strucvars consequence information.
content:
application/json:
schema:
$ref: '#/components/schemas/StrucvarsCsqResponse'
'500':
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/versionsInfo:
get:
tags:
Expand Down Expand Up @@ -62,6 +115,12 @@ components:
type: string
description: Version of the Ensembl database, if any.
nullable: true
GenomeRelease:
type: string
description: Select the genome release to use.
enum:
- grch37
- grch38
SoftwareVersions:
type: object
description: Software version specification.
Expand All @@ -75,6 +134,83 @@ components:
hgvs_rs:
type: string
description: Version of the `hgvs` crate.
StrucvarsCsqQuery:
type: object
description: Query parameters of the `/api/v1/strucvars/csq` endpoint.
required:
- genome_release
- chromosome
- start
- sv_type
properties:
genome_release:
$ref: '#/components/schemas/GenomeRelease'
chromosome:
type: string
description: Chromosome.
start:
type: integer
format: int32
description: 1-based start position.
stop:
type: integer
format: int32
description: 1-based stop position, ignored for INS.
nullable: true
sv_type:
$ref: '#/components/schemas/StrucvarsSvType'
StrucvarsCsqResponse:
type: object
description: Response of the `/api/v1/strucvars/csq` endpoint.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/VersionsInfoResponse'
query:
$ref: '#/components/schemas/StrucvarsCsqQuery'
result:
type: array
items:
$ref: '#/components/schemas/StrucvarsGeneTranscriptEffects'
description: The resulting records for the affected genes.
StrucvarsGeneTranscriptEffects:
type: object
description: Explanation of transcript effect per individual gene.
required:
- hgnc_id
- transcript_effects
properties:
hgnc_id:
type: string
description: HGNC identifier
transcript_effects:
type: array
items:
$ref: '#/components/schemas/StrucvarsTranscriptEffect'
description: Transcript effects for the gene.
StrucvarsSvType:
type: string
description: Structural Variant type.
enum:
- DEL
- DUP
- INS
- INV
- BND
StrucvarsTranscriptEffect:
type: string
description: Enumeration for effect on transcript.
enum:
- transcript_variant
- exon_variant
- splice_region_variant
- intron_variant
- upstream_variant
- downstream_variant
- intergenic_variant
VersionsInfoResponse:
type: object
description: Response of the `/api/v1/version` endpoint.
Expand Down
Loading

0 comments on commit cce8a6d

Please sign in to comment.