From a5ecad09871ae107eb2cdfc92dc6bb6d60890afe Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Thu, 15 Aug 2024 08:46:45 -0400 Subject: [PATCH] feat: update to latest fusor version --- client/src/services/ResponseModels.ts | 38 +++++++++++++++++---------- server/pyproject.toml | 2 +- server/src/curfu/schemas.py | 8 +++--- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/client/src/services/ResponseModels.ts b/client/src/services/ResponseModels.ts index 9aaeb169..4bbae998 100644 --- a/client/src/services/ResponseModels.ts +++ b/client/src/services/ResponseModels.ts @@ -10,9 +10,10 @@ */ export type Evidence = "observed" | "inferred"; /** - * Define possible classes of Regulatory Elements. Options are the possible values - * for /regulatory_class value property in the INSDC controlled vocabulary: - * https://www.insdc.org/controlled-vocabulary-regulatoryclass + * Define possible classes of Regulatory Elements. + * + * Options are the possible values for ``/regulatory_class`` value property in the + * `INSDC controlled vocabulary `_. */ export type RegulatoryClass = | "attenuator" @@ -113,8 +114,8 @@ export interface AssayedFusion { /** * Define RegulatoryElement class. * - * `featureId` would ideally be constrained as a CURIE, but Encode, our preferred - * feature ID source, doesn't currently have a registered CURIE structure for EH_ + * ``featureId`` would ideally be constrained as a CURIE, but Encode, our preferred + * feature ID source, doesn't currently have a registered CURIE structure for ``EH_`` * identifiers. Consequently, we permit any kind of free text. */ export interface RegulatoryElement { @@ -348,6 +349,7 @@ export interface GeneElement { } /** * Define Templated Sequence Element class. + * * A templated sequence is a contiguous genomic sequence found in the gene * product. */ @@ -402,7 +404,9 @@ export interface LiteralSequenceExpression { [k: string]: unknown; } /** - * Define UnknownGene class. This is primarily intended to represent a + * Define UnknownGene class. + * + * This is primarily intended to represent a * partner in the result of a fusion partner-agnostic assay, which identifies * the absence of an expected gene. For example, a FISH break-apart probe may * indicate rearrangement of an MLL gene, but by design, the test cannot @@ -414,6 +418,8 @@ export interface UnknownGeneElement { type?: "UnknownGeneElement"; } /** + * Define causative event information for a fusion. + * * The evaluation of a fusion may be influenced by the underlying mechanism that * generated the fusion. Often this will be a DNA rearrangement, but it could also be * a read-through or trans-splicing event. @@ -461,7 +467,9 @@ export interface CategoricalFusion { criticalFunctionalDomains?: FunctionalDomain[] | null; } /** - * Define MultiplePossibleGenesElement class. This is primarily intended to + * Define MultiplePossibleGenesElement class. + * + * This is primarily intended to * represent a partner in a categorical fusion, typifying generalizable * characteristics of a class of fusions such as retained or lost regulatory elements * and/or functional domains, often curated from biomedical literature for use in @@ -672,12 +680,13 @@ export interface ExonCoordsRequest { */ export interface FormattedAssayedFusion { fusion_type?: AssayedFusion & string; - structure: + structure: ( | TranscriptSegmentElement | GeneElement | TemplatedSequenceElement | LinkerElement - | UnknownGeneElement; + | UnknownGeneElement + )[]; causative_event?: CausativeEvent | null; assay?: Assay | null; regulatory_element?: RegulatoryElement | null; @@ -690,12 +699,13 @@ export interface FormattedAssayedFusion { */ export interface FormattedCategoricalFusion { fusion_type?: CategoricalFusion & string; - structure: + structure: ( | TranscriptSegmentElement | GeneElement | TemplatedSequenceElement | LinkerElement - | MultiplePossibleGenesElement; + | MultiplePossibleGenesElement + )[]; regulatory_element?: RegulatoryElement | null; critical_functional_domains?: FunctionalDomain[] | null; reading_frame_preserved?: boolean | null; @@ -776,9 +786,9 @@ export interface Response { export interface SequenceIDResponse { warnings?: string[] | null; sequence: string; - refseq_id: string | null; - ga4gh_id: string | null; - aliases: string[] | null; + refseq_id?: string | null; + ga4gh_id?: string | null; + aliases?: string[] | null; } /** * Response model for service_info endpoint. diff --git a/server/pyproject.toml b/server/pyproject.toml index 1f02c35f..912ad42b 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "click", "boto3", "botocore", - "fusor ~= 0.2.0", + "fusor ~= 0.3.0", "cool-seq-tool ~= 0.5.1", "pydantic == 2.4.2", "gene-normalizer ~= 0.4.0", diff --git a/server/src/curfu/schemas.py b/server/src/curfu/schemas.py index b5818ee3..eee530d5 100644 --- a/server/src/curfu/schemas.py +++ b/server/src/curfu/schemas.py @@ -7,9 +7,9 @@ from fusor.models import ( Assay, AssayedFusion, - AssayedFusionElements, + AssayedFusionElement, CategoricalFusion, - CategoricalFusionElements, + CategoricalFusionElement, CausativeEvent, FunctionalDomain, Fusion, @@ -301,7 +301,7 @@ class FormattedAssayedFusion(BaseModel): """ fusion_type: FusionType.ASSAYED_FUSION = FusionType.ASSAYED_FUSION - structure: AssayedFusionElements + structure: list[AssayedFusionElement] causative_event: CausativeEvent | None = None assay: Assay | None = None regulatory_element: RegulatoryElement | None = None @@ -315,7 +315,7 @@ class FormattedCategoricalFusion(BaseModel): """ fusion_type: FusionType.CATEGORICAL_FUSION = FusionType.CATEGORICAL_FUSION - structure: CategoricalFusionElements + structure: list[CategoricalFusionElement] regulatory_element: RegulatoryElement | None = None critical_functional_domains: list[FunctionalDomain] | None = None reading_frame_preserved: bool | None = None