Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Consolidate CLI #650

Merged
merged 33 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c0077ab
.
tedil Nov 28, 2024
cc28a90
use TranscriptSettings in test args
tedil Dec 16, 2024
2031dbd
lints
tedil Dec 16, 2024
133e7da
merge tx dbs separated by genome release
tedil Dec 16, 2024
e5fd61e
load csq predictors depending on genome release in the server subcmd
tedil Dec 16, 2024
0a29b1c
also skip freq and clinvar dbs if assembly does not match, more info …
tedil Dec 17, 2024
6e43c13
lint: explicit named lifetimes
tedil Dec 17, 2024
1f568f8
rephrase info about skipped databases
tedil Dec 17, 2024
8f4decb
check whether the predictor could be successfully instantiated, other…
tedil Dec 17, 2024
b6df08c
fix typo
tedil Dec 17, 2024
7f159db
rename fn seqvars to consequence
tedil Dec 17, 2024
d64eaad
remove databases.is_empty assertion because that is tested anyway
tedil Dec 17, 2024
d0672ab
update sources help texts
tedil Jan 2, 2025
eea025e
fmt
tedil Jan 2, 2025
e93b5f1
include strand in seqvars/csq
tedil Jan 2, 2025
ff126ce
add frequency endpoint (wip)
tedil Jan 2, 2025
551d6cf
update 'try: …' hints to openapi
tedil Jan 2, 2025
40796ab
do not initialize predictors/annotators multiple times
tedil Jan 2, 2025
9a70495
add frequency to apidocs
tedil Jan 2, 2025
cc07876
also allow multiple --frequencies and --clinvar options
tedil Jan 2, 2025
b0af0ea
whitespace
tedil Jan 2, 2025
4097675
add clinvar endpoint
tedil Jan 2, 2025
720b934
merge origin/main
tedil Jan 2, 2025
05784eb
update warning for multiple clinvar or freq dbs
tedil Jan 2, 2025
ed2b713
update openapi schema
tedil Jan 2, 2025
f1c010f
update entrypoint to match new server run cli
tedil Jan 3, 2025
ee9ebf1
fix server run clinvar docstrings
tedil Jan 3, 2025
5fd01b5
update openapi.schema.yaml accordingly
tedil Jan 3, 2025
78d646c
merge origin/main
tedil Jan 24, 2025
ec077dc
remove unused path_db from test
tedil Jan 24, 2025
61ee096
only print hints for available endpoints
tedil Jan 24, 2025
096c922
server: add exemplary Grch38 hints
tedil Jan 24, 2025
fa2cbeb
fix typo in fn name
tedil Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
343 changes: 343 additions & 0 deletions openapi.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/seqvars/clinvar:
get:
tags:
- seqvars_clinvar
summary: Query for ClinVar information of a variant.
operationId: seqvarsClinvar
parameters:
- name: genome_release
in: query
description: The assembly.
required: true
schema:
$ref: '#/components/schemas/GenomeRelease'
- name: chromosome
in: query
description: SPDI sequence.
required: true
schema:
type: string
- name: position
in: query
description: SPDI position.
required: true
schema:
type: integer
format: int32
minimum: 0
- name: reference
in: query
description: SPDI deletion.
required: true
schema:
type: string
- name: alternative
in: query
description: SPDI insertion.
required: true
schema:
type: string
responses:
'200':
description: Clinvar information.
content:
application/json:
schema:
$ref: '#/components/schemas/ClinvarResponse'
'500':
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/seqvars/csq:
get:
tags:
Expand Down Expand Up @@ -115,6 +167,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/seqvars/frequency:
get:
tags:
- seqvars_frequencies
summary: Query for gnomAD frequencies of a variant.
operationId: seqvarsFrequency
parameters:
- name: genome_release
in: query
description: The assembly.
required: true
schema:
$ref: '#/components/schemas/GenomeRelease'
- name: chromosome
in: query
description: SPDI sequence.
required: true
schema:
type: string
- name: position
in: query
description: SPDI position.
required: true
schema:
type: integer
format: int32
minimum: 0
- name: reference
in: query
description: SPDI deletion.
required: true
schema:
type: string
- name: alternative
in: query
description: SPDI insertion.
required: true
schema:
type: string
responses:
'200':
description: Frequency information.
content:
application/json:
schema:
$ref: '#/components/schemas/FrequencyResponse'
'500':
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/strucvars/csq:
get:
tags:
Expand Down Expand Up @@ -198,6 +302,98 @@ components:
enum:
- grch37
- grch38
AutosomalResultEntry:
type: object
required:
- gnomad_exomes_an
- gnomad_exomes_hom
- gnomad_exomes_het
- gnomad_genomes_an
- gnomad_genomes_hom
- gnomad_genomes_het
properties:
gnomad_exomes_an:
type: integer
format: int32
minimum: 0
gnomad_exomes_hom:
type: integer
format: int32
minimum: 0
gnomad_exomes_het:
type: integer
format: int32
minimum: 0
gnomad_genomes_an:
type: integer
format: int32
minimum: 0
gnomad_genomes_hom:
type: integer
format: int32
minimum: 0
gnomad_genomes_het:
type: integer
format: int32
minimum: 0
ClinvarQuery:
type: object
description: Query parameters of the `/api/v1/seqvars/clinvar` endpoint.
required:
- genome_release
- chromosome
- position
- reference
- alternative
properties:
genome_release:
$ref: '#/components/schemas/GenomeRelease'
chromosome:
type: string
description: SPDI sequence.
position:
type: integer
format: int32
description: SPDI position.
minimum: 0
reference:
type: string
description: SPDI deletion.
alternative:
type: string
description: SPDI insertion.
ClinvarResponse:
type: object
description: Response of the `/api/v1/seqvars/clinvar` endpoint.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/VersionsInfoResponse'
query:
$ref: '#/components/schemas/ClinvarQuery'
result:
type: array
items:
$ref: '#/components/schemas/ClinvarResultEntry'
description: The resulting records for the scored genes.
ClinvarResultEntry:
type: object
description: One entry in `ClinvarResponse`.
required:
- clinvar_vcv
- clinvar_germline_classification
properties:
clinvar_vcv:
type: array
items:
type: string
clinvar_germline_classification:
type: array
items:
type: string
Consequence:
type: string
description: Putative impact.
Expand Down Expand Up @@ -339,6 +535,70 @@ components:
value:
type: string
description: Enum for `AnnField::feature_type`.
FrequencyQuery:
type: object
description: Query parameters of the `/api/v1/seqvars/frequency` endpoint.
required:
- genome_release
- chromosome
- position
- reference
- alternative
properties:
genome_release:
$ref: '#/components/schemas/GenomeRelease'
chromosome:
type: string
description: SPDI sequence.
position:
type: integer
format: int32
description: SPDI position.
minimum: 0
reference:
type: string
description: SPDI deletion.
alternative:
type: string
description: SPDI insertion.
FrequencyResponse:
type: object
description: Response of the `/api/v1/seqvars/frequency` endpoint.
required:
- version
- query
- result
properties:
version:
$ref: '#/components/schemas/VersionsInfoResponse'
query:
$ref: '#/components/schemas/FrequencyQuery'
result:
type: array
items:
$ref: '#/components/schemas/FrequencyResultEntry'
description: The resulting records for the scored genes.
FrequencyResultEntry:
oneOf:
- type: object
required:
- Autosomal
properties:
Autosomal:
$ref: '#/components/schemas/AutosomalResultEntry'
- type: object
required:
- Gonosomal
properties:
Gonosomal:
$ref: '#/components/schemas/GonosomalResultEntry'
- type: object
required:
- Mitochondrial
properties:
Mitochondrial:
$ref: '#/components/schemas/MitochondrialResultEntry'
description: One entry in `FrequencyResponse`.
GenesTranscriptsListQuery:
type: object
description: Query arguments for the `/api/v1/genes/transcripts` endpoint.
Expand Down Expand Up @@ -412,6 +672,50 @@ components:
enum:
- grch37
- grch38
GonosomalResultEntry:
type: object
required:
- gnomad_exomes_an
- gnomad_exomes_hom
- gnomad_exomes_het
- gnomad_exomes_hemi
- gnomad_genomes_an
- gnomad_genomes_hom
- gnomad_genomes_het
- gnomad_genomes_hemi
properties:
gnomad_exomes_an:
type: integer
format: int32
minimum: 0
gnomad_exomes_hom:
type: integer
format: int32
minimum: 0
gnomad_exomes_het:
type: integer
format: int32
minimum: 0
gnomad_exomes_hemi:
type: integer
format: int32
minimum: 0
gnomad_genomes_an:
type: integer
format: int32
minimum: 0
gnomad_genomes_hom:
type: integer
format: int32
minimum: 0
gnomad_genomes_het:
type: integer
format: int32
minimum: 0
gnomad_genomes_hemi:
type: integer
format: int32
minimum: 0
Message:
type: string
description: A message to be used in `AnnField::messages`.
Expand All @@ -426,6 +730,40 @@ components:
- info_realign_three_prime
- info_compound_annotation
- info_non_reference_annotation
MitochondrialResultEntry:
type: object
required:
- helix_an
- helix_hom
- helix_het
- gnomad_genomes_an
- gnomad_genomes_hom
- gnomad_genomes_het
properties:
helix_an:
type: integer
format: int32
minimum: 0
helix_hom:
type: integer
format: int32
minimum: 0
helix_het:
type: integer
format: int32
minimum: 0
gnomad_genomes_an:
type: integer
format: int32
minimum: 0
gnomad_genomes_hom:
type: integer
format: int32
minimum: 0
gnomad_genomes_het:
type: integer
format: int32
minimum: 0
Pos:
type: object
description: Position, optionally with total length.
Expand Down Expand Up @@ -519,6 +857,7 @@ components:
- feature_id
- feature_biotype
- feature_tag
- strand
properties:
consequences:
type: array
Expand Down Expand Up @@ -574,6 +913,10 @@ components:
format: int32
description: Distance to feature.
nullable: true
strand:
type: integer
format: int32
description: Strand of the alignment
messages:
type: array
items:
Expand Down
Loading
Loading