From f23c33d0fd2bf51116d77bf359d9b9bea15928d4 Mon Sep 17 00:00:00 2001 From: sagely1 <114952739+sagely1@users.noreply.github.com> Date: Sun, 6 Oct 2024 03:00:20 +0000 Subject: [PATCH] adding remaining api methods via openapi --- apps/agora/api/src/components/biodomains.ts | 4 +- apps/agora/api/src/components/comparison.ts | 13 +- apps/agora/api/src/components/distribution.ts | 15 +- .../src/components/experimental-validation.ts | 3 +- apps/agora/api/src/components/metabolomics.ts | 3 +- .../neuropathologic-correlations.ts | 3 +- .../api/src/components/overall-scores.ts | 3 +- apps/agora/api/src/components/proteomics.ts | 2 +- apps/agora/api/src/components/rna.ts | 5 +- apps/agora/api/src/components/scores.ts | 3 +- apps/agora/api/src/models/biodomains.ts | 13 +- apps/agora/api/src/models/comparison.ts | 6 +- apps/agora/api/src/models/dataversion.ts | 2 +- apps/agora/api/src/models/distribution.ts | 11 +- .../api/src/models/experimental-validation.ts | 13 +- apps/agora/api/src/models/gene-links.ts | 16 +- apps/agora/api/src/models/index.ts | 6 +- apps/agora/api/src/models/metabolomics.ts | 3 +- .../models/neuropathologic-correlations.ts | 3 +- apps/agora/api/src/models/overall-scores.ts | 6 +- apps/agora/api/src/models/proteomics.ts | 3 +- apps/agora/api/src/models/rna.ts | 3 +- apps/agora/api/src/models/scores.ts | 3 +- .../src/lib/.openapi-generator/FILES | 19 +- .../api-client-angular/src/lib/api.module.ts | 7 +- .../api-client-angular/src/lib/api/api.ts | 22 +- ...Genes.service.ts => bioDomains.service.ts} | 102 +++- ...eam.service.ts => distribution.service.ts} | 26 +- .../src/lib/api/genes.service.ts | 573 ++++++++++++++++++ ...teamMember.service.ts => teams.service.ts} | 81 ++- .../src/lib/model/bioDomain.ts | 37 ++ .../src/lib/model/bioDomainInfo.ts | 18 + .../src/lib/model/bioDomains.ts | 21 +- .../src/lib/model/distribution.ts | 25 + .../src/lib/model/experimentalValidation.ts | 3 +- .../src/lib/model/gCTGene.ts | 76 +++ .../src/lib/model/gCTGeneNominations.ts | 45 ++ .../src/lib/model/gCTGeneTissue.ts | 39 ++ .../src/lib/model/gCTGenesList.ts | 19 + .../api-client-angular/src/lib/model/gene.ts | 1 + .../src/lib/model/models.ts | 12 +- .../lib/model/overallScoresDistribution.ts | 37 ++ .../src/lib/model/proteomicsDistribution.ts | 21 + .../src/lib/model/rnaDistribution.ts | 49 ++ .../lib/model/{teamList.ts => teamsList.ts} | 2 +- libs/agora/api-description/build/openapi.yaml | 563 +++++++++++++++-- .../src/components/schemas/BioDomain.yaml | 27 + .../src/components/schemas/BioDomainInfo.yaml | 7 + .../src/components/schemas/BioDomains.yaml | 27 +- .../src/components/schemas/Distribution.yaml | 29 + .../schemas/ExperimentalValidation.yaml | 4 +- .../src/components/schemas/GCTGene.yaml | 77 +++ .../schemas/GCTGeneNominations.yaml | 42 ++ .../src/components/schemas/GCTGeneTissue.yaml | 32 + .../src/components/schemas/GCTGenesList.yaml | 7 + .../src/components/schemas/Gene.yaml | 2 + .../schemas/OverallScoresDistribution.yaml | 30 + .../schemas/ProteomicsDistribution.yaml | 8 + .../components/schemas/RnaDistribution.yaml | 36 ++ .../src/components/schemas/Scores.yaml | 25 + .../schemas/{TeamList.yaml => TeamsList.yaml} | 0 libs/agora/api-description/src/openapi.yaml | 18 +- .../api-description/src/paths/biodomains.yaml | 19 + .../src/paths/biodomains/@{ensg}.yaml | 26 + .../src/paths/distribution.yaml | 17 + .../api-description/src/paths/genes.yaml | 27 + .../src/paths/genes/@{ensg}.yaml | 23 + .../src/paths/genes/comparison.yaml | 33 + .../src/paths/genes/nominated.yaml | 17 + .../src/paths/genes/search.yaml | 25 + .../src/paths/teamMembers/@{name}/image.yaml | 2 +- .../api-description/src/paths/teams.yaml | 4 +- .../src/lib/nominated-targets.component.ts | 11 +- .../team-member-list.component.ts | 8 +- .../teams/src/lib/teams/teams.component.ts | 10 +- 75 files changed, 2299 insertions(+), 234 deletions(-) rename libs/agora/api-client-angular/src/lib/api/{nominatedGenes.service.ts => bioDomains.service.ts} (61%) rename libs/agora/api-client-angular/src/lib/api/{team.service.ts => distribution.service.ts} (91%) create mode 100644 libs/agora/api-client-angular/src/lib/api/genes.service.ts rename libs/agora/api-client-angular/src/lib/api/{teamMember.service.ts => teams.service.ts} (68%) create mode 100644 libs/agora/api-client-angular/src/lib/model/bioDomain.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/bioDomainInfo.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/distribution.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/gCTGene.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/gCTGeneNominations.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/gCTGeneTissue.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/gCTGenesList.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/overallScoresDistribution.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/proteomicsDistribution.ts create mode 100644 libs/agora/api-client-angular/src/lib/model/rnaDistribution.ts rename libs/agora/api-client-angular/src/lib/model/{teamList.ts => teamsList.ts} (93%) create mode 100644 libs/agora/api-description/src/components/schemas/BioDomain.yaml create mode 100644 libs/agora/api-description/src/components/schemas/BioDomainInfo.yaml create mode 100644 libs/agora/api-description/src/components/schemas/Distribution.yaml create mode 100644 libs/agora/api-description/src/components/schemas/GCTGene.yaml create mode 100644 libs/agora/api-description/src/components/schemas/GCTGeneNominations.yaml create mode 100644 libs/agora/api-description/src/components/schemas/GCTGeneTissue.yaml create mode 100644 libs/agora/api-description/src/components/schemas/GCTGenesList.yaml create mode 100644 libs/agora/api-description/src/components/schemas/OverallScoresDistribution.yaml create mode 100644 libs/agora/api-description/src/components/schemas/ProteomicsDistribution.yaml create mode 100644 libs/agora/api-description/src/components/schemas/RnaDistribution.yaml create mode 100644 libs/agora/api-description/src/components/schemas/Scores.yaml rename libs/agora/api-description/src/components/schemas/{TeamList.yaml => TeamsList.yaml} (100%) create mode 100644 libs/agora/api-description/src/paths/biodomains.yaml create mode 100644 libs/agora/api-description/src/paths/biodomains/@{ensg}.yaml create mode 100644 libs/agora/api-description/src/paths/distribution.yaml create mode 100644 libs/agora/api-description/src/paths/genes.yaml create mode 100644 libs/agora/api-description/src/paths/genes/@{ensg}.yaml create mode 100644 libs/agora/api-description/src/paths/genes/comparison.yaml create mode 100644 libs/agora/api-description/src/paths/genes/nominated.yaml create mode 100644 libs/agora/api-description/src/paths/genes/search.yaml diff --git a/apps/agora/api/src/components/biodomains.ts b/apps/agora/api/src/components/biodomains.ts index fcbacc7ba0..6f075d982c 100644 --- a/apps/agora/api/src/components/biodomains.ts +++ b/apps/agora/api/src/components/biodomains.ts @@ -3,8 +3,8 @@ // -------------------------------------------------------------------------- // import { Request, Response, NextFunction } from 'express'; import { cache, setHeaders } from '../helpers'; -import { AllBioDomainsCollection, BioDomains, BioDomainsCollection } from '../models'; -import { BioDomainInfo } from '../../app/models'; +import { AllBioDomainsCollection, BioDomainsCollection } from '../models'; +import { BioDomains, BioDomainInfo } from '@sagebionetworks/agora/api-client-angular'; // -------------------------------------------------------------------------- // // Functions diff --git a/apps/agora/api/src/components/comparison.ts b/apps/agora/api/src/components/comparison.ts index 36ac06fdb6..dac678b791 100644 --- a/apps/agora/api/src/components/comparison.ts +++ b/apps/agora/api/src/components/comparison.ts @@ -12,16 +12,19 @@ import { Gene, GCTGene, GCTGeneNominations, - RnaDifferentialExpression, RnaDifferentialExpressionCollection, - ProteinDifferentialExpression, ProteomicsLFQCollection, ProteomicsTMTCollection, - Team, ProteomicsSRMCollection, } from '../models'; -import { BioDomains, TargetNomination, Scores } from '../../app/models'; - +import { + BioDomains, + ProteinDifferentialExpression, + RnaDifferentialExpression, + TargetNomination, + Team, +} from '@sagebionetworks/agora/api-client-angular'; +import { Scores } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions // -------------------------------------------------------------------------- // diff --git a/apps/agora/api/src/components/distribution.ts b/apps/agora/api/src/components/distribution.ts index fac93d3f5d..0cf08a5084 100644 --- a/apps/agora/api/src/components/distribution.ts +++ b/apps/agora/api/src/components/distribution.ts @@ -12,6 +12,13 @@ import { ProteomicDistributionCollection, OverallScoresDistributionCollection, } from '../models'; +import { + RnaDistribution, + Distribution, + OverallScores, + OverallScoresDistribution, + ProteomicsDistribution, +} from '@sagebionetworks/agora/api-client-angular'; // -------------------------------------------------------------------------- // // Functions @@ -19,7 +26,7 @@ import { export async function getRnaDistribution() { const cacheKey = 'rna-distribution'; - let result = cache.get(cacheKey); + let result: RnaDistribution[] | undefined = cache.get(cacheKey); if (result) { return result; @@ -33,7 +40,7 @@ export async function getRnaDistribution() { export async function getProteomicDistribution(type: string) { const cacheKey = 'proteomics-' + type + '-distribution'; - let result = cache.get(cacheKey); + let result: ProteomicsDistribution[] | undefined = cache.get(cacheKey); if (result) { return result; @@ -47,7 +54,7 @@ export async function getProteomicDistribution(type: string) { export async function getOverallScoresDistribution() { const cacheKey = 'overall-scores-distribution'; - let result: any = cache.get(cacheKey); + let result: OverallScoresDistribution[] | undefined = cache.get(cacheKey); if (result) { return result; @@ -66,7 +73,7 @@ export async function getOverallScoresDistribution() { export async function getDistribution() { const cacheKey = 'distribution'; - let result: any = cache.get(cacheKey); + let result: Distribution | undefined = cache.get(cacheKey); if (result) { return result; diff --git a/apps/agora/api/src/components/experimental-validation.ts b/apps/agora/api/src/components/experimental-validation.ts index 491d03bb37..04f6959d72 100644 --- a/apps/agora/api/src/components/experimental-validation.ts +++ b/apps/agora/api/src/components/experimental-validation.ts @@ -2,7 +2,8 @@ // Internal // -------------------------------------------------------------------------- // import { cache } from '../helpers'; -import { ExperimentalValidation, ExperimentalValidationCollection } from '../models'; +import { ExperimentalValidationCollection } from '../models'; +import { ExperimentalValidation } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions diff --git a/apps/agora/api/src/components/metabolomics.ts b/apps/agora/api/src/components/metabolomics.ts index d914a54665..3ea4204afa 100644 --- a/apps/agora/api/src/components/metabolomics.ts +++ b/apps/agora/api/src/components/metabolomics.ts @@ -2,7 +2,8 @@ // Internal // -------------------------------------------------------------------------- // import { cache } from '../helpers'; -import { Metabolomics, MetabolomicsCollection } from '../models'; +import { MetabolomicsCollection } from '../models'; +import { Metabolomics } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions diff --git a/apps/agora/api/src/components/neuropathologic-correlations.ts b/apps/agora/api/src/components/neuropathologic-correlations.ts index ffc285b843..124a99c88f 100644 --- a/apps/agora/api/src/components/neuropathologic-correlations.ts +++ b/apps/agora/api/src/components/neuropathologic-correlations.ts @@ -2,7 +2,8 @@ // Internal // -------------------------------------------------------------------------- // import { cache } from '../helpers'; -import { NeuropathologicCorrelation, NeuropathologicCorrelationCollection } from '../models'; +import { NeuropathologicCorrelationCollection } from '../models'; +import { NeuropathologicCorrelation } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions diff --git a/apps/agora/api/src/components/overall-scores.ts b/apps/agora/api/src/components/overall-scores.ts index f4c5a65465..5386dd5ccb 100644 --- a/apps/agora/api/src/components/overall-scores.ts +++ b/apps/agora/api/src/components/overall-scores.ts @@ -2,7 +2,8 @@ // Internal // -------------------------------------------------------------------------- // import { cache } from '../helpers'; -import { OverallScores, OverallScoresCollection } from '../models'; +import { OverallScoresCollection } from '../models'; +import { OverallScores } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions diff --git a/apps/agora/api/src/components/proteomics.ts b/apps/agora/api/src/components/proteomics.ts index a4322816f2..b659bafc3b 100644 --- a/apps/agora/api/src/components/proteomics.ts +++ b/apps/agora/api/src/components/proteomics.ts @@ -3,11 +3,11 @@ // -------------------------------------------------------------------------- // import { cache } from '../helpers'; import { - ProteinDifferentialExpression, ProteomicsLFQCollection, ProteomicsSRMCollection, ProteomicsTMTCollection, } from '../models'; +import { ProteinDifferentialExpression } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions diff --git a/apps/agora/api/src/components/rna.ts b/apps/agora/api/src/components/rna.ts index c751ebe910..475b41d59f 100644 --- a/apps/agora/api/src/components/rna.ts +++ b/apps/agora/api/src/components/rna.ts @@ -2,9 +2,8 @@ // Internal // -------------------------------------------------------------------------- // import { cache } from '../helpers'; - -import { RnaDifferentialExpression, RnaDifferentialExpressionCollection } from '../models'; - +import { RnaDifferentialExpressionCollection } from '../models'; +import { RnaDifferentialExpression } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions // -------------------------------------------------------------------------- // diff --git a/apps/agora/api/src/components/scores.ts b/apps/agora/api/src/components/scores.ts index a2f7c3d554..f08afe5dcd 100644 --- a/apps/agora/api/src/components/scores.ts +++ b/apps/agora/api/src/components/scores.ts @@ -2,7 +2,8 @@ // Internal // -------------------------------------------------------------------------- // import { cache } from '../helpers'; -import { Scores, ScoresCollection } from '../models'; +import { ScoresCollection } from '../models'; +import { Scores } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Functions diff --git a/apps/agora/api/src/models/biodomains.ts b/apps/agora/api/src/models/biodomains.ts index 44551edcd0..a98dc21f2a 100644 --- a/apps/agora/api/src/models/biodomains.ts +++ b/apps/agora/api/src/models/biodomains.ts @@ -1,17 +1,6 @@ -// -------------------------------------------------------------------------- // -// External -// -------------------------------------------------------------------------- // import { Schema, model } from 'mongoose'; +import { BioDomains, BioDomain, BioDomainInfo } from '@sagebionetworks/agora/api-client-angular'; -// -------------------------------------------------------------------------- // -// Internal -// -------------------------------------------------------------------------- // -import { BioDomains, BioDomain, BioDomainInfo } from '../../app/models'; -export { BioDomains, BioDomain } from '../../app/models'; - -// -------------------------------------------------------------------------- // -// Schemas -// -------------------------------------------------------------------------- // const BioDomainSchema = new Schema({ biodomain: { type: String, required: true }, go_terms: { type: [String], required: true }, diff --git a/apps/agora/api/src/models/comparison.ts b/apps/agora/api/src/models/comparison.ts index 5f5a1ded88..71fc33b871 100644 --- a/apps/agora/api/src/models/comparison.ts +++ b/apps/agora/api/src/models/comparison.ts @@ -2,4 +2,8 @@ // Internal // -------------------------------------------------------------------------- // -export { GCTGene, GCTGeneTissue, GCTGeneNominations } from '../../app/models'; +export { + GCTGene, + GCTGeneTissue, + GCTGeneNominations, +} from '@sagebionetworks/agora/api-client-angular'; diff --git a/apps/agora/api/src/models/dataversion.ts b/apps/agora/api/src/models/dataversion.ts index 886a5b4969..9a53661c84 100644 --- a/apps/agora/api/src/models/dataversion.ts +++ b/apps/agora/api/src/models/dataversion.ts @@ -1,5 +1,5 @@ -import { Dataversion } from '@sagebionetworks/agora/api-client-angular'; import { Schema, model } from 'mongoose'; +import { Dataversion } from '@sagebionetworks/agora/api-client-angular'; const DataVersionSchema = new Schema( { diff --git a/apps/agora/api/src/models/distribution.ts b/apps/agora/api/src/models/distribution.ts index a530484262..88cd9ba316 100644 --- a/apps/agora/api/src/models/distribution.ts +++ b/apps/agora/api/src/models/distribution.ts @@ -10,12 +10,7 @@ import { RnaDistribution, OverallScoresDistribution, ProteomicsDistribution, -} from '../../app/models'; -export { - RnaDistribution, - OverallScoresDistribution, - ProteomicsDistribution, -} from '../../app/models'; +} from '@sagebionetworks/agora/api-client-angular'; // -------------------------------------------------------------------------- // // Schemas @@ -34,14 +29,14 @@ const RnaDistributionSchema = new Schema( { collection: 'rnaboxdistribution' }, ); -const ProteomicDistributionSchema = new Schema( +const ProteomicDistributionSchema = new Schema( { type: String, }, { collection: 'proteomicsboxdistribution' }, ); -const OverallScoresDistributionSchema = new Schema( +const OverallScoresDistributionSchema = new Schema( { distribution: [{ type: Number, required: true }], bins: [[{ type: Number, required: true }]], diff --git a/apps/agora/api/src/models/experimental-validation.ts b/apps/agora/api/src/models/experimental-validation.ts index f446d67185..b6a652c27a 100644 --- a/apps/agora/api/src/models/experimental-validation.ts +++ b/apps/agora/api/src/models/experimental-validation.ts @@ -1,17 +1,6 @@ -// -------------------------------------------------------------------------- // -// External -// -------------------------------------------------------------------------- // import { Schema, model } from 'mongoose'; +import { ExperimentalValidation } from '@sagebionetworks/agora/api-client-angular'; -// -------------------------------------------------------------------------- // -// Internal -// -------------------------------------------------------------------------- // -import { ExperimentalValidation } from '../../app/models'; -export { ExperimentalValidation } from '../../app/models'; - -// -------------------------------------------------------------------------- // -// Schemas -// -------------------------------------------------------------------------- // const ExperimentalValidationSchema = new Schema( { _id: { type: String, required: true }, diff --git a/apps/agora/api/src/models/gene-links.ts b/apps/agora/api/src/models/gene-links.ts index fa66edb028..1a6ee9cd55 100644 --- a/apps/agora/api/src/models/gene-links.ts +++ b/apps/agora/api/src/models/gene-links.ts @@ -1,17 +1,6 @@ -// -------------------------------------------------------------------------- // -// External -// -------------------------------------------------------------------------- // import { Schema, model } from 'mongoose'; +import { GeneNetworkLinks } from 'libs/agora/models'; -// -------------------------------------------------------------------------- // -// Internal -// -------------------------------------------------------------------------- // -import { GeneNetworkLinks } from '../../app/models'; -export { GeneNetworkLinks } from '../../app/models'; - -// -------------------------------------------------------------------------- // -// Schemas -// -------------------------------------------------------------------------- // const GeneLinkSchema = new Schema( { geneA_ensembl_gene_id: { type: String, required: true }, @@ -23,7 +12,4 @@ const GeneLinkSchema = new Schema( { collection: 'geneslinks' }, ); -// -------------------------------------------------------------------------- // -// Models -// -------------------------------------------------------------------------- // export const GeneLinkCollection = model('GeneLinksCollection', GeneLinkSchema); diff --git a/apps/agora/api/src/models/index.ts b/apps/agora/api/src/models/index.ts index 2bfd69d5e1..c6b6c929cb 100644 --- a/apps/agora/api/src/models/index.ts +++ b/apps/agora/api/src/models/index.ts @@ -1,5 +1,6 @@ -export * from './dataversion'; +export * from './biodomains'; export * from './comparison'; +export * from './dataversion'; export * from './distribution'; export * from './experimental-validation'; export * from './gene-links'; @@ -9,6 +10,5 @@ export * from './neuropathologic-correlations'; export * from './overall-scores'; export * from './proteomics'; export * from './rna'; -export * from './teams'; export * from './scores'; -export * from './biodomains'; +export * from './teams'; diff --git a/apps/agora/api/src/models/metabolomics.ts b/apps/agora/api/src/models/metabolomics.ts index d37a9cf35c..1590622f2e 100644 --- a/apps/agora/api/src/models/metabolomics.ts +++ b/apps/agora/api/src/models/metabolomics.ts @@ -6,8 +6,7 @@ import { Schema, model } from 'mongoose'; // -------------------------------------------------------------------------- // // Internal // -------------------------------------------------------------------------- // -import { Metabolomics } from '../../app/models'; -export { Metabolomics } from '../../app/models'; +import { Metabolomics } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Schemas diff --git a/apps/agora/api/src/models/neuropathologic-correlations.ts b/apps/agora/api/src/models/neuropathologic-correlations.ts index fac396eae8..860bfe4d43 100644 --- a/apps/agora/api/src/models/neuropathologic-correlations.ts +++ b/apps/agora/api/src/models/neuropathologic-correlations.ts @@ -6,8 +6,7 @@ import { Schema, model } from 'mongoose'; // -------------------------------------------------------------------------- // // Internal // -------------------------------------------------------------------------- // -import { NeuropathologicCorrelation } from '../../app/models'; -export { NeuropathologicCorrelation } from '../../app/models'; +import { NeuropathologicCorrelation } from '@sagebionetworks/agora/api-client-angular'; // -------------------------------------------------------------------------- // // Schemas diff --git a/apps/agora/api/src/models/overall-scores.ts b/apps/agora/api/src/models/overall-scores.ts index 696053656f..5707a0889b 100644 --- a/apps/agora/api/src/models/overall-scores.ts +++ b/apps/agora/api/src/models/overall-scores.ts @@ -6,8 +6,10 @@ import { Schema, model } from 'mongoose'; // -------------------------------------------------------------------------- // // Internal // -------------------------------------------------------------------------- // -import { OverallScores } from '../../app/models'; -export { OverallScores, OverallScoresDistribution } from '../../app/models'; +import { + OverallScores, + OverallScoresDistribution, +} from '@sagebionetworks/agora/api-client-angular'; // -------------------------------------------------------------------------- // // Schemas diff --git a/apps/agora/api/src/models/proteomics.ts b/apps/agora/api/src/models/proteomics.ts index 33e19c3a60..f2eac12b6a 100644 --- a/apps/agora/api/src/models/proteomics.ts +++ b/apps/agora/api/src/models/proteomics.ts @@ -6,8 +6,7 @@ import { Schema, model } from 'mongoose'; // -------------------------------------------------------------------------- // // Internal // -------------------------------------------------------------------------- // -import { ProteinDifferentialExpression } from '../../app/models'; -export { ProteinDifferentialExpression } from '../../app/models'; +import { ProteinDifferentialExpression } from '@sagebionetworks/agora/api-client-angular'; // -------------------------------------------------------------------------- // // Schemas diff --git a/apps/agora/api/src/models/rna.ts b/apps/agora/api/src/models/rna.ts index 85f0cfc551..f9fb8f0390 100644 --- a/apps/agora/api/src/models/rna.ts +++ b/apps/agora/api/src/models/rna.ts @@ -6,8 +6,7 @@ import { Schema, model } from 'mongoose'; // -------------------------------------------------------------------------- // // Internal // -------------------------------------------------------------------------- // -import { RnaDifferentialExpression } from '../../app/models'; -export { RnaDifferentialExpression } from '../../app/models'; +import { RnaDifferentialExpression } from '@sagebionetworks/agora/api-client-angular'; // -------------------------------------------------------------------------- // // Schemas diff --git a/apps/agora/api/src/models/scores.ts b/apps/agora/api/src/models/scores.ts index a2165b71b7..5d7abb75ff 100644 --- a/apps/agora/api/src/models/scores.ts +++ b/apps/agora/api/src/models/scores.ts @@ -6,8 +6,7 @@ import { Schema, model } from 'mongoose'; // -------------------------------------------------------------------------- // // Internal // -------------------------------------------------------------------------- // -import { Scores } from '../../app/models'; -export { Scores } from '../../app/models'; +import { Scores } from 'libs/agora/models'; // -------------------------------------------------------------------------- // // Schemas diff --git a/libs/agora/api-client-angular/src/lib/.openapi-generator/FILES b/libs/agora/api-client-angular/src/lib/.openapi-generator/FILES index a2ad674872..5096c294b2 100644 --- a/libs/agora/api-client-angular/src/lib/.openapi-generator/FILES +++ b/libs/agora/api-client-angular/src/lib/.openapi-generator/FILES @@ -2,34 +2,45 @@ README.md api.module.ts api/api.ts +api/bioDomains.service.ts api/dataversion.service.ts -api/nominatedGenes.service.ts -api/team.service.ts -api/teamMember.service.ts +api/distribution.service.ts +api/genes.service.ts +api/teams.service.ts configuration.ts encoder.ts git_push.sh index.ts model/basicError.ts +model/bioDomain.ts +model/bioDomainInfo.ts model/bioDomains.ts model/dataversion.ts +model/distribution.ts model/druggability.ts model/ensemblInfo.ts model/experimentalValidation.ts +model/gCTGene.ts +model/gCTGeneNominations.ts +model/gCTGeneTissue.ts +model/gCTGenesList.ts model/gene.ts model/medianExpression.ts model/models.ts model/neuropathologicCorrelation.ts model/nominatedGenesList.ts model/overallScores.ts +model/overallScoresDistribution.ts model/proteinDifferentialExpression.ts +model/proteomicsDistribution.ts model/rnaDifferentialExpression.ts +model/rnaDistribution.ts model/similarGenesNetwork.ts model/similarGenesNetworkLink.ts model/similarGenesNetworkNode.ts model/targetNomination.ts model/team.ts -model/teamList.ts model/teamMember.ts +model/teamsList.ts param.ts variables.ts diff --git a/libs/agora/api-client-angular/src/lib/api.module.ts b/libs/agora/api-client-angular/src/lib/api.module.ts index 61c2186b98..b6a24dcb2f 100644 --- a/libs/agora/api-client-angular/src/lib/api.module.ts +++ b/libs/agora/api-client-angular/src/lib/api.module.ts @@ -2,10 +2,11 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; +import { BioDomainsService } from './api/bioDomains.service'; import { DataversionService } from './api/dataversion.service'; -import { NominatedGenesService } from './api/nominatedGenes.service'; -import { TeamService } from './api/team.service'; -import { TeamMemberService } from './api/teamMember.service'; +import { DistributionService } from './api/distribution.service'; +import { GenesService } from './api/genes.service'; +import { TeamsService } from './api/teams.service'; @NgModule({ imports: [], diff --git a/libs/agora/api-client-angular/src/lib/api/api.ts b/libs/agora/api-client-angular/src/lib/api/api.ts index 45ae2e77eb..7bc6a749f1 100644 --- a/libs/agora/api-client-angular/src/lib/api/api.ts +++ b/libs/agora/api-client-angular/src/lib/api/api.ts @@ -1,9 +1,17 @@ +export * from './bioDomains.service'; +import { BioDomainsService } from './bioDomains.service'; export * from './dataversion.service'; import { DataversionService } from './dataversion.service'; -export * from './nominatedGenes.service'; -import { NominatedGenesService } from './nominatedGenes.service'; -export * from './team.service'; -import { TeamService } from './team.service'; -export * from './teamMember.service'; -import { TeamMemberService } from './teamMember.service'; -export const APIS = [DataversionService, NominatedGenesService, TeamService, TeamMemberService]; +export * from './distribution.service'; +import { DistributionService } from './distribution.service'; +export * from './genes.service'; +import { GenesService } from './genes.service'; +export * from './teams.service'; +import { TeamsService } from './teams.service'; +export const APIS = [ + BioDomainsService, + DataversionService, + DistributionService, + GenesService, + TeamsService, +]; diff --git a/libs/agora/api-client-angular/src/lib/api/nominatedGenes.service.ts b/libs/agora/api-client-angular/src/lib/api/bioDomains.service.ts similarity index 61% rename from libs/agora/api-client-angular/src/lib/api/nominatedGenes.service.ts rename to libs/agora/api-client-angular/src/lib/api/bioDomains.service.ts index 3575fa0ed5..e10d73690f 100644 --- a/libs/agora/api-client-angular/src/lib/api/nominatedGenes.service.ts +++ b/libs/agora/api-client-angular/src/lib/api/bioDomains.service.ts @@ -27,7 +27,9 @@ import { Observable } from 'rxjs'; // @ts-ignore import { BasicError } from '../model/basicError'; // @ts-ignore -import { NominatedGenesList } from '../model/nominatedGenesList'; +import { BioDomain } from '../model/bioDomain'; +// @ts-ignore +import { BioDomainInfo } from '../model/bioDomainInfo'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -36,7 +38,7 @@ import { Configuration } from '../configuration'; @Injectable({ providedIn: 'root', }) -export class NominatedGenesService { +export class BioDomainsService { protected basePath = 'http://localhost/v1'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -108,36 +110,110 @@ export class NominatedGenesService { } /** - * Get nominated genes - * Get nominated genes + * Retrieve bioDomain for a given ENSG + * Get bioDomain + * @param ensg The ENSG (Ensembl Gene ID) for which to retrieve biodomain data. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBioDomain( + ensg: string, + observe?: 'body', + reportProgress?: boolean, + options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext }, + ): Observable>; + public getBioDomain( + ensg: string, + observe?: 'response', + reportProgress?: boolean, + options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext }, + ): Observable>>; + public getBioDomain( + ensg: string, + observe?: 'events', + reportProgress?: boolean, + options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext }, + ): Observable>>; + public getBioDomain( + ensg: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext }, + ): Observable { + if (ensg === null || ensg === undefined) { + throw new Error('Required parameter ensg was null or undefined when calling getBioDomain.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/biodomains/${this.configuration.encodeParam({ name: 'ensg', value: ensg, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * List BioDomains + * List BioDomains * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public listNominatedGenes( + public listBioDomains( observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/problem+json'; context?: HttpContext; }, - ): Observable; - public listNominatedGenes( + ): Observable>; + public listBioDomains( observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/problem+json'; context?: HttpContext; }, - ): Observable>; - public listNominatedGenes( + ): Observable>>; + public listBioDomains( observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/problem+json'; context?: HttpContext; }, - ): Observable>; - public listNominatedGenes( + ): Observable>>; + public listBioDomains( observe: any = 'body', reportProgress: boolean = false, options?: { @@ -173,8 +249,8 @@ export class NominatedGenesService { } } - let localVarPath = `/genes/nominated`; - return this.httpClient.get( + let localVarPath = `/biodomains`; + return this.httpClient.get>( `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, diff --git a/libs/agora/api-client-angular/src/lib/api/team.service.ts b/libs/agora/api-client-angular/src/lib/api/distribution.service.ts similarity index 91% rename from libs/agora/api-client-angular/src/lib/api/team.service.ts rename to libs/agora/api-client-angular/src/lib/api/distribution.service.ts index 0064447ce6..2888e8e7ae 100644 --- a/libs/agora/api-client-angular/src/lib/api/team.service.ts +++ b/libs/agora/api-client-angular/src/lib/api/distribution.service.ts @@ -27,7 +27,7 @@ import { Observable } from 'rxjs'; // @ts-ignore import { BasicError } from '../model/basicError'; // @ts-ignore -import { TeamList } from '../model/teamList'; +import { Distribution } from '../model/distribution'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -36,7 +36,7 @@ import { Configuration } from '../configuration'; @Injectable({ providedIn: 'root', }) -export class TeamService { +export class DistributionService { protected basePath = 'http://localhost/v1'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -108,36 +108,36 @@ export class TeamService { } /** - * List Teams - * List Teams + * Get distribution data + * Get distribution data * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public listTeams( + public getDistribution( observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/problem+json'; context?: HttpContext; }, - ): Observable; - public listTeams( + ): Observable; + public getDistribution( observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/problem+json'; context?: HttpContext; }, - ): Observable>; - public listTeams( + ): Observable>; + public getDistribution( observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json' | 'application/problem+json'; context?: HttpContext; }, - ): Observable>; - public listTeams( + ): Observable>; + public getDistribution( observe: any = 'body', reportProgress: boolean = false, options?: { @@ -173,8 +173,8 @@ export class TeamService { } } - let localVarPath = `/teams`; - return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, { + let localVarPath = `/distribution`; + return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, diff --git a/libs/agora/api-client-angular/src/lib/api/genes.service.ts b/libs/agora/api-client-angular/src/lib/api/genes.service.ts new file mode 100644 index 0000000000..cb722d9377 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/api/genes.service.ts @@ -0,0 +1,573 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { BasicError } from '../model/basicError'; +// @ts-ignore +import { GCTGenesList } from '../model/gCTGenesList'; +// @ts-ignore +import { Gene } from '../model/gene'; +// @ts-ignore +import { NominatedGenesList } from '../model/nominatedGenesList'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + +@Injectable({ + providedIn: 'root', +}) +export class GenesService { + protected basePath = 'http://localhost/v1'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration: Configuration, + ) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === 'object' && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === 'object') { + if (Array.isArray(value)) { + (value as any[]).forEach( + (elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)), + ); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); + } else { + throw Error('key may not be null if value is Date'); + } + } else { + Object.keys(value).forEach( + (k) => + (httpParams = this.addToHttpParamsRecursive( + httpParams, + value[k], + key != null ? `${key}[${k}]` : k, + )), + ); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error('key may not be null if value is not object or array'); + } + return httpParams; + } + + /** + * Get comparison genes based on category and subcategory + * Get comparison genes based on category and subcategory + * @param category The category of the comparison (either RNA or Protein Differential Expression). + * @param subCategory The subcategory for gene comparison (sub-category must be a string). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getComparisonGenes( + category: 'RNA - Differential Expression' | 'Protein - Differential Expression', + subCategory: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable; + public getComparisonGenes( + category: 'RNA - Differential Expression' | 'Protein - Differential Expression', + subCategory: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public getComparisonGenes( + category: 'RNA - Differential Expression' | 'Protein - Differential Expression', + subCategory: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public getComparisonGenes( + category: 'RNA - Differential Expression' | 'Protein - Differential Expression', + subCategory: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable { + if (category === null || category === undefined) { + throw new Error( + 'Required parameter category was null or undefined when calling getComparisonGenes.', + ); + } + if (subCategory === null || subCategory === undefined) { + throw new Error( + 'Required parameter subCategory was null or undefined when calling getComparisonGenes.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (category !== undefined && category !== null) { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + category, + 'category', + ); + } + if (subCategory !== undefined && subCategory !== null) { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + subCategory, + 'subCategory', + ); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json', 'application/problem+json']; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/genes/comparison`; + return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Get gene details by Ensembl Gene ID + * @param ensg Ensembl Gene ID (ENSG) + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGene( + ensg: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable; + public getGene( + ensg: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public getGene( + ensg: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public getGene( + ensg: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable { + if (ensg === null || ensg === undefined) { + throw new Error('Required parameter ensg was null or undefined when calling getGene.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json', 'application/problem+json']; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/genes/${this.configuration.encodeParam({ name: 'ensg', value: ensg, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Retrieve a list of genes or filter by Ensembl gene IDs + * This endpoint returns all genes or filters genes by Ensembl gene IDs if provided. + * @param ids + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getGenes( + ids?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public getGenes( + ids?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>>; + public getGenes( + ids?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>>; + public getGenes( + ids?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (ids !== undefined && ids !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, ids, 'ids'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json', 'application/problem+json']; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/genes`; + return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress, + }); + } + + /** + * Get nominated genes + * Retrieves a list of genes with nominations and relevant information. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getNominatedGenes( + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable; + public getNominatedGenes( + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public getNominatedGenes( + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public getNominatedGenes( + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable { + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json', 'application/problem+json']; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/genes/nominated`; + return this.httpClient.get( + `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress, + }, + ); + } + + /** + * Search Genes + * Search Genes + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchGene( + id: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public searchGene( + id: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>>; + public searchGene( + id: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>>; + public searchGene( + id: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling searchGene.'); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (id !== undefined && id !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, id, 'id'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json', 'application/problem+json']; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/genes/search`; + return this.httpClient.get>(`${this.configuration.basePath}${localVarPath}`, { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress, + }); + } +} diff --git a/libs/agora/api-client-angular/src/lib/api/teamMember.service.ts b/libs/agora/api-client-angular/src/lib/api/teams.service.ts similarity index 68% rename from libs/agora/api-client-angular/src/lib/api/teamMember.service.ts rename to libs/agora/api-client-angular/src/lib/api/teams.service.ts index 234831b942..257feae7c9 100644 --- a/libs/agora/api-client-angular/src/lib/api/teamMember.service.ts +++ b/libs/agora/api-client-angular/src/lib/api/teams.service.ts @@ -26,6 +26,8 @@ import { Observable } from 'rxjs'; // @ts-ignore import { BasicError } from '../model/basicError'; +// @ts-ignore +import { TeamsList } from '../model/teamsList'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -34,7 +36,7 @@ import { Configuration } from '../configuration'; @Injectable({ providedIn: 'root', }) -export class TeamMemberService { +export class TeamsService { protected basePath = 'http://localhost/v1'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -186,4 +188,81 @@ export class TeamMemberService { reportProgress: reportProgress, }); } + + /** + * List Teams + * List Teams + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listTeams( + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable; + public listTeams( + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public listTeams( + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable>; + public listTeams( + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json' | 'application/problem+json'; + context?: HttpContext; + }, + ): Observable { + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json', 'application/problem+json']; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/teams`; + return this.httpClient.get(`${this.configuration.basePath}${localVarPath}`, { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress, + }); + } } diff --git a/libs/agora/api-client-angular/src/lib/model/bioDomain.ts b/libs/agora/api-client-angular/src/lib/model/bioDomain.ts new file mode 100644 index 0000000000..ef6d36e210 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/bioDomain.ts @@ -0,0 +1,37 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * BioDomain + */ +export interface BioDomain { + /** + * Name of the biological domain + */ + biodomain: string; + /** + * List of Gene Ontology (GO) terms + */ + go_terms: Array; + /** + * Number of terms associated with the biological domain + */ + n_biodomain_terms: number; + /** + * Number of gene terms linked to the biological domain + */ + n_gene_biodomain_terms: number; + /** + * Percentage of terms linking to the domain + */ + pct_linking_terms: number; +} diff --git a/libs/agora/api-client-angular/src/lib/model/bioDomainInfo.ts b/libs/agora/api-client-angular/src/lib/model/bioDomainInfo.ts new file mode 100644 index 0000000000..c6e1d27de8 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/bioDomainInfo.ts @@ -0,0 +1,18 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * BioDomainInfo + */ +export interface BioDomainInfo { + name: string; +} diff --git a/libs/agora/api-client-angular/src/lib/model/bioDomains.ts b/libs/agora/api-client-angular/src/lib/model/bioDomains.ts index 9c32ed62ff..b147dc320a 100644 --- a/libs/agora/api-client-angular/src/lib/model/bioDomains.ts +++ b/libs/agora/api-client-angular/src/lib/model/bioDomains.ts @@ -9,29 +9,18 @@ * https://openapi-generator.tech * Do not edit the class manually. */ +import { BioDomain } from './bioDomain'; /** * BioDomains */ export interface BioDomains { /** - * Name of the biological domain + * The Ensembl Gene ID. */ - biodomain: string; + ensembl_gene_id: string; /** - * List of Gene Ontology (GO) terms + * A list of gene biodomains. */ - go_terms: Array; - /** - * Number of terms associated with the biological domain - */ - n_biodomain_terms: number; - /** - * Number of gene terms linked to the biological domain - */ - n_gene_biodomain_terms: number; - /** - * Percentage of terms linking to the domain - */ - pct_linking_terms: number; + gene_biodomains: Array; } diff --git a/libs/agora/api-client-angular/src/lib/model/distribution.ts b/libs/agora/api-client-angular/src/lib/model/distribution.ts new file mode 100644 index 0000000000..d73c488e98 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/distribution.ts @@ -0,0 +1,25 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { RnaDistribution } from './rnaDistribution'; +import { ProteomicsDistribution } from './proteomicsDistribution'; +import { OverallScoresDistribution } from './overallScoresDistribution'; + +/** + * Distributions + */ +export interface Distribution { + rna_differential_expression: Array; + proteomics_LFQ: Array; + proteomics_SRM: Array; + proteomics_TMT: Array; + overall_scores: Array; +} diff --git a/libs/agora/api-client-angular/src/lib/model/experimentalValidation.ts b/libs/agora/api-client-angular/src/lib/model/experimentalValidation.ts index 4db402e512..1218180a67 100644 --- a/libs/agora/api-client-angular/src/lib/model/experimentalValidation.ts +++ b/libs/agora/api-client-angular/src/lib/model/experimentalValidation.ts @@ -11,7 +11,7 @@ */ /** - * Gene + * Experimental Validation */ export interface ExperimentalValidation { _id: string; @@ -30,5 +30,4 @@ export interface ExperimentalValidation { team: string; reference_doi: string; date_report: string; - abability_bucket_definition: string; } diff --git a/libs/agora/api-client-angular/src/lib/model/gCTGene.ts b/libs/agora/api-client-angular/src/lib/model/gCTGene.ts new file mode 100644 index 0000000000..1c47453be8 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/gCTGene.ts @@ -0,0 +1,76 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { GCTGeneNominations } from './gCTGeneNominations'; +import { GCTGeneTissue } from './gCTGeneTissue'; + +/** + * GCT Gene + */ +export interface GCTGene { + /** + * Ensembl gene identifier + */ + ensembl_gene_id: string; + /** + * HGNC gene symbol + */ + hgnc_symbol: string; + /** + * UniProt identifier + */ + uniprotid?: string | null; + /** + * Unique identifier + */ + uid?: string | null; + /** + * Search string + */ + search_string?: string | null; + /** + * Array of search terms + */ + search_array?: Array | null; + /** + * Array of gene tissues + */ + tissues: Array; + nominations?: GCTGeneNominations; + /** + * Array of association values + */ + associations?: Array | null; + /** + * Target risk score + */ + target_risk_score: number | null; + /** + * Genetics score + */ + genetics_score: number | null; + /** + * Multi-omics score + */ + multi_omics_score: number | null; + /** + * Array of biological domains + */ + biodomains?: Array | null; + /** + * Whether the gene is pinned + */ + pinned?: boolean | null; + /** + * Target enabling resources + */ + target_enabling_resources?: Array | null; +} diff --git a/libs/agora/api-client-angular/src/lib/model/gCTGeneNominations.ts b/libs/agora/api-client-angular/src/lib/model/gCTGeneNominations.ts new file mode 100644 index 0000000000..9a75a5e631 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/gCTGeneNominations.ts @@ -0,0 +1,45 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * GCTGeneNominations + */ +export interface GCTGeneNominations { + /** + * The total number of gene nominations. + */ + count: number; + /** + * The year of the nominations. + */ + year: number; + /** + * The list of teams involved in the nominations. + */ + teams: Array; + /** + * The list of studies related to the nominations. + */ + studies: Array; + /** + * The input data used for the nominations. + */ + inputs: Array; + /** + * The list of programs associated with the nominations. + */ + programs: Array; + /** + * The list of validations for the nominations. + */ + validations: Array; +} diff --git a/libs/agora/api-client-angular/src/lib/model/gCTGeneTissue.ts b/libs/agora/api-client-angular/src/lib/model/gCTGeneTissue.ts new file mode 100644 index 0000000000..e5701ead3e --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/gCTGeneTissue.ts @@ -0,0 +1,39 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { MedianExpression } from './medianExpression'; + +/** + * GCTGeneTissue + */ +export interface GCTGeneTissue { + /** + * Name of the gene or tissue. + */ + name: string; + /** + * Log fold change value. + */ + logfc: number; + /** + * Adjusted p-value. + */ + adj_p_val: number; + /** + * Lower confidence interval. + */ + ci_l: number; + /** + * Upper confidence interval. + */ + ci_r: number; + medianexpression?: MedianExpression; +} diff --git a/libs/agora/api-client-angular/src/lib/model/gCTGenesList.ts b/libs/agora/api-client-angular/src/lib/model/gCTGenesList.ts new file mode 100644 index 0000000000..3f2cdc61df --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/gCTGenesList.ts @@ -0,0 +1,19 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { GCTGene } from './gCTGene'; + +/** + * List of GCTGene + */ +export interface GCTGenesList { + items?: Array; +} diff --git a/libs/agora/api-client-angular/src/lib/model/gene.ts b/libs/agora/api-client-angular/src/lib/model/gene.ts index 7b2c7ef9a0..377938232d 100644 --- a/libs/agora/api-client-angular/src/lib/model/gene.ts +++ b/libs/agora/api-client-angular/src/lib/model/gene.ts @@ -29,6 +29,7 @@ export interface Gene { ensembl_gene_id: string; name: string; summary: string; + hgnc_symbol: string; alias: Array; is_igap: boolean; is_eqtl: boolean; diff --git a/libs/agora/api-client-angular/src/lib/model/models.ts b/libs/agora/api-client-angular/src/lib/model/models.ts index fe4b8d4518..d683eb3a3e 100644 --- a/libs/agora/api-client-angular/src/lib/model/models.ts +++ b/libs/agora/api-client-angular/src/lib/model/models.ts @@ -1,20 +1,30 @@ export * from './basicError'; +export * from './bioDomain'; +export * from './bioDomainInfo'; export * from './bioDomains'; export * from './dataversion'; +export * from './distribution'; export * from './druggability'; export * from './ensemblInfo'; export * from './experimentalValidation'; +export * from './gCTGene'; +export * from './gCTGeneNominations'; +export * from './gCTGeneTissue'; +export * from './gCTGenesList'; export * from './gene'; export * from './medianExpression'; export * from './neuropathologicCorrelation'; export * from './nominatedGenesList'; export * from './overallScores'; +export * from './overallScoresDistribution'; export * from './proteinDifferentialExpression'; +export * from './proteomicsDistribution'; export * from './rnaDifferentialExpression'; +export * from './rnaDistribution'; export * from './similarGenesNetwork'; export * from './similarGenesNetworkLink'; export * from './similarGenesNetworkNode'; export * from './targetNomination'; export * from './team'; -export * from './teamList'; export * from './teamMember'; +export * from './teamsList'; diff --git a/libs/agora/api-client-angular/src/lib/model/overallScoresDistribution.ts b/libs/agora/api-client-angular/src/lib/model/overallScoresDistribution.ts new file mode 100644 index 0000000000..b5ebead8e8 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/overallScoresDistribution.ts @@ -0,0 +1,37 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Distributions + */ +export interface OverallScoresDistribution { + /** + * Distribution of overall scores + */ + distribution: Array; + /** + * Bins used in the distribution + */ + bins: Array>; + /** + * Name of the score distribution + */ + name: string; + /** + * Synapse ID associated with the score + */ + syn_id: string; + /** + * Wiki ID associated with the score + */ + wiki_id: string; +} diff --git a/libs/agora/api-client-angular/src/lib/model/proteomicsDistribution.ts b/libs/agora/api-client-angular/src/lib/model/proteomicsDistribution.ts new file mode 100644 index 0000000000..4e62823234 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/proteomicsDistribution.ts @@ -0,0 +1,21 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Distributions + */ +export interface ProteomicsDistribution { + /** + * Type of proteomics distribution (e.g., LFQ, SRM, TMT) + */ + type: string; +} diff --git a/libs/agora/api-client-angular/src/lib/model/rnaDistribution.ts b/libs/agora/api-client-angular/src/lib/model/rnaDistribution.ts new file mode 100644 index 0000000000..307e82a450 --- /dev/null +++ b/libs/agora/api-client-angular/src/lib/model/rnaDistribution.ts @@ -0,0 +1,49 @@ +/** + * Agora REST API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Distributions + */ +export interface RnaDistribution { + /** + * ID of the RNA distribution + */ + _id: string; + /** + * Model of the RNA data + */ + model: string; + /** + * Tissue type + */ + tissue: string; + /** + * Minimum value in the distribution + */ + min: number; + /** + * Maximum value in the distribution + */ + max: number; + /** + * First quartile value + */ + first_quartile: number; + /** + * Median value + */ + median: number; + /** + * Third quartile value + */ + third_quartile: number; +} diff --git a/libs/agora/api-client-angular/src/lib/model/teamList.ts b/libs/agora/api-client-angular/src/lib/model/teamsList.ts similarity index 93% rename from libs/agora/api-client-angular/src/lib/model/teamList.ts rename to libs/agora/api-client-angular/src/lib/model/teamsList.ts index bb3fb7fcf1..50d7e78d6b 100644 --- a/libs/agora/api-client-angular/src/lib/model/teamList.ts +++ b/libs/agora/api-client-angular/src/lib/model/teamsList.ts @@ -14,6 +14,6 @@ import { Team } from './team'; /** * List of Teams */ -export interface TeamList { +export interface TeamsList { items?: Array; } diff --git a/libs/agora/api-description/build/openapi.yaml b/libs/agora/api-description/build/openapi.yaml index fd8d787649..0bb12af76b 100644 --- a/libs/agora/api-description/build/openapi.yaml +++ b/libs/agora/api-description/build/openapi.yaml @@ -21,6 +21,183 @@ tags: - name: TeamMember description: Operations about team members. paths: + /biodomains: + get: + tags: + - BioDomains + summary: List BioDomains + description: List BioDomains + operationId: listBioDomains + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/BioDomainInfo' + description: Success + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' + /biodomains/{ensg}: + get: + tags: + - BioDomains + summary: Retrieve bioDomain for a given ENSG + description: Get bioDomain + operationId: getBioDomain + parameters: + - name: ensg + in: path + required: true + description: The ENSG (Ensembl Gene ID) for which to retrieve biodomain data. + schema: + type: string + responses: + '200': + description: Successful retrieval of bio-domains + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/BioDomain' + '404': + description: ENSG not found + '500': + description: Internal server error + /genes: + get: + tags: + - Genes + summary: Retrieve a list of genes or filter by Ensembl gene IDs + description: This endpoint returns all genes or filters genes by Ensembl gene IDs if provided. + operationId: getGenes + parameters: + - in: query + name: ids + schema: + type: string + description: Comma-separated list of Ensembl gene IDs to filter. + required: false + example: ENSG00000139618,ENSG00000248378 + responses: + '200': + description: A list of genes. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Gene' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' + /genes/{ensg}: + get: + tags: + - Genes + summary: Get gene details by Ensembl Gene ID + operationId: getGene + parameters: + - name: ensg + in: path + required: true + description: Ensembl Gene ID (ENSG) + schema: + type: string + responses: + '200': + description: Gene details successfully retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/Gene' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' + /genes/search: + get: + tags: + - Genes + summary: Search Genes + description: Search Genes + operationId: searchGene + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Gene' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' + /genes/comparison: + get: + tags: + - Genes + summary: Get comparison genes based on category and subcategory + description: Get comparison genes based on category and subcategory + operationId: getComparisonGenes + parameters: + - in: query + name: category + required: true + schema: + type: string + enum: + - RNA - Differential Expression + - Protein - Differential Expression + description: The category of the comparison (either RNA or Protein Differential Expression). + - in: query + name: subCategory + required: true + schema: + type: string + description: The subcategory for gene comparison (sub-category must be a string). + responses: + '200': + description: Successful response with comparison genes + content: + application/json: + schema: + $ref: '#/components/schemas/GCTGenesList' + '404': + $ref: '#/components/responses/NotFound' + '500': + $ref: '#/components/responses/InternalServerError' + /genes/nominated: + get: + tags: + - Genes + summary: Get nominated genes + description: Retrieves a list of genes with nominations and relevant information. + operationId: getNominatedGenes + responses: + '200': + description: A list of nominated genes. + content: + application/json: + schema: + $ref: '#/components/schemas/NominatedGenesList' + '400': + $ref: '#/components/responses/BadRequest' + '500': + $ref: '#/components/responses/InternalServerError' /dataversion: get: tags: @@ -39,20 +216,20 @@ paths: $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/InternalServerError' - /genes/nominated: + /distribution: get: tags: - - NominatedGenes - summary: Get nominated genes - description: Get nominated genes - operationId: listNominatedGenes + - Distribution + summary: Get distribution data + description: Get distribution data + operationId: getDistribution responses: '200': content: application/json: schema: - $ref: '#/components/schemas/NominatedGenesList' - description: Success + $ref: '#/components/schemas/Distribution' + description: A successful response '400': $ref: '#/components/responses/BadRequest' '500': @@ -60,7 +237,7 @@ paths: /teams: get: tags: - - Team + - Teams summary: List Teams description: List Teams operationId: listTeams @@ -69,7 +246,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TeamList' + $ref: '#/components/schemas/TeamsList' description: Success '400': $ref: '#/components/responses/BadRequest' @@ -78,7 +255,7 @@ paths: /teamMembers/{name}/image: get: tags: - - TeamMember + - Teams summary: Get Team Member Image description: Get Team Member Image operationId: getTeamMemberImage @@ -107,20 +284,14 @@ paths: $ref: '#/components/responses/InternalServerError' components: schemas: - Dataversion: + BioDomainInfo: type: object - description: Synapse data version + description: BioDomainInfo properties: - data_file: - type: string - data_version: - type: string - team_images_id: + name: type: string required: - - data_file - - data_version - - team_images_id + - name BasicError: type: object description: Problem details (tools.ietf.org/html/rfc7807) @@ -143,6 +314,34 @@ components: x-java-class-annotations: - '@lombok.AllArgsConstructor' - '@lombok.Builder' + BioDomain: + type: object + description: BioDomain + properties: + biodomain: + type: string + description: Name of the biological domain + go_terms: + type: array + description: List of Gene Ontology (GO) terms + items: + type: string + n_biodomain_terms: + type: integer + description: Number of terms associated with the biological domain + n_gene_biodomain_terms: + type: integer + description: Number of gene terms linked to the biological domain + pct_linking_terms: + type: number + format: float + description: Percentage of terms linking to the domain + required: + - biodomain + - go_terms + - n_biodomain_terms + - n_gene_biodomain_terms + - pct_linking_terms TargetNomination: type: object description: TargetNomination @@ -373,7 +572,7 @@ components: - neuropath_type ExperimentalValidation: type: object - description: Gene + description: Experimental Validation properties: _id: type: string @@ -407,8 +606,6 @@ components: type: string date_report: type: string - abability_bucket_definition: - type: string required: - _id - ensembl_gene_id @@ -475,30 +672,17 @@ components: type: object description: BioDomains properties: - biodomain: + ensembl_gene_id: type: string - description: Name of the biological domain - go_terms: + description: The Ensembl Gene ID. + gene_biodomains: type: array - description: List of Gene Ontology (GO) terms items: - type: string - n_biodomain_terms: - type: integer - description: Number of terms associated with the biological domain - n_gene_biodomain_terms: - type: integer - description: Number of gene terms linked to the biological domain - pct_linking_terms: - type: number - format: float - description: Percentage of terms linking to the domain + $ref: '#/components/schemas/BioDomain' + description: A list of gene biodomains. required: - - biodomain - - go_terms - - n_biodomain_terms - - n_gene_biodomain_terms - - pct_linking_terms + - ensembl_gene_id + - gene_biodomains EnsemblInfo: type: object description: EnsemblInfo @@ -527,6 +711,8 @@ components: type: string summary: type: string + hgnc_symbol: + type: string alias: type: array items: @@ -670,6 +856,168 @@ components: - druggability - total_nominations - ensembl_info + GCTGeneTissue: + type: object + description: GCTGeneTissue + properties: + name: + type: string + description: Name of the gene or tissue. + logfc: + type: number + format: float + description: Log fold change value. + adj_p_val: + type: number + format: float + description: Adjusted p-value. + ci_l: + type: number + format: float + description: Lower confidence interval. + ci_r: + type: number + format: float + description: Upper confidence interval. + medianexpression: + $ref: '#/components/schemas/MedianExpression' + nullable: true + required: + - name + - logfc + - adj_p_val + - ci_l + - ci_r + - mediaexpression + GCTGeneNominations: + type: object + description: GCTGeneNominations + properties: + count: + type: integer + description: The total number of gene nominations. + year: + type: integer + description: The year of the nominations. + teams: + type: array + items: + type: string + description: The list of teams involved in the nominations. + studies: + type: array + items: + type: string + description: The list of studies related to the nominations. + inputs: + type: array + items: + type: string + description: The input data used for the nominations. + programs: + type: array + items: + type: string + description: The list of programs associated with the nominations. + validations: + type: array + items: + type: string + description: The list of validations for the nominations. + required: + - count + - year + - teams + - studies + - inputs + - programs + - validations + GCTGene: + type: object + description: GCT Gene + properties: + ensembl_gene_id: + type: string + description: Ensembl gene identifier + hgnc_symbol: + type: string + description: HGNC gene symbol + uniprotid: + type: string + nullable: true + description: UniProt identifier + uid: + type: string + nullable: true + description: Unique identifier + search_string: + type: string + nullable: true + description: Search string + search_array: + type: array + items: + type: string + nullable: true + description: Array of search terms + tissues: + type: array + items: + $ref: '#/components/schemas/GCTGeneTissue' + description: Array of gene tissues + nominations: + $ref: '#/components/schemas/GCTGeneNominations' + nullable: true + description: Gene nominations data + associations: + type: array + items: + type: number + nullable: true + description: Array of association values + target_risk_score: + type: number + nullable: true + description: Target risk score + genetics_score: + type: number + nullable: true + description: Genetics score + multi_omics_score: + type: number + nullable: true + description: Multi-omics score + biodomains: + type: array + items: + type: string + nullable: true + description: Array of biological domains + pinned: + type: boolean + nullable: true + description: Whether the gene is pinned + target_enabling_resources: + type: array + items: + type: string + nullable: true + description: Target enabling resources + required: + - ensembl_gene_id + - hgnc_symbol + - tissues + - target_risk_score + - genetics_score + - multi_omics_score + GCTGenesList: + type: object + description: List of GCTGene + properties: + items: + type: array + items: + $ref: '#/components/schemas/GCTGene' NominatedGenesList: type: object description: List of nominated genes @@ -678,6 +1026,127 @@ components: type: array items: $ref: '#/components/schemas/Gene' + Dataversion: + type: object + description: Synapse data version + properties: + data_file: + type: string + data_version: + type: string + team_images_id: + type: string + required: + - data_file + - data_version + - team_images_id + RnaDistribution: + type: object + description: Distributions + properties: + _id: + type: string + description: ID of the RNA distribution + model: + type: string + description: Model of the RNA data + tissue: + type: string + description: Tissue type + min: + type: number + description: Minimum value in the distribution + max: + type: number + description: Maximum value in the distribution + first_quartile: + type: number + description: First quartile value + median: + type: number + description: Median value + third_quartile: + type: number + description: Third quartile value + required: + - _id + - model + - tissue + - min + - max + - first_quartile + - median + - third_quartile + ProteomicsDistribution: + type: object + description: Distributions + properties: + type: + type: string + description: Type of proteomics distribution (e.g., LFQ, SRM, TMT) + required: + - type + OverallScoresDistribution: + type: object + description: Distributions + properties: + distribution: + type: array + items: + type: number + description: Distribution of overall scores + bins: + type: array + items: + type: array + items: + type: number + description: Bins used in the distribution + name: + type: string + description: Name of the score distribution + syn_id: + type: string + description: Synapse ID associated with the score + wiki_id: + type: string + description: Wiki ID associated with the score + required: + - distribution + - bins + - name + - syn_id + - wiki_id + Distribution: + type: object + description: Distributions + properties: + rna_differential_expression: + type: array + items: + $ref: '#/components/schemas/RnaDistribution' + proteomics_LFQ: + type: array + items: + $ref: '#/components/schemas/ProteomicsDistribution' + proteomics_SRM: + type: array + items: + $ref: '#/components/schemas/ProteomicsDistribution' + proteomics_TMT: + type: array + items: + $ref: '#/components/schemas/ProteomicsDistribution' + overall_scores: + type: array + items: + $ref: '#/components/schemas/OverallScoresDistribution' + required: + - rna_differential_expression + - proteomics_LFQ + - proteomics_SRM + - proteomics_TMT + - overall_scores TeamMember: type: object description: Team Member @@ -713,7 +1182,7 @@ components: - program - description - members - TeamList: + TeamsList: type: object description: List of Teams properties: @@ -737,3 +1206,9 @@ components: application/problem+json: schema: $ref: '#/components/schemas/BasicError' + NotFound: + description: The specified resource was not found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/BasicError' diff --git a/libs/agora/api-description/src/components/schemas/BioDomain.yaml b/libs/agora/api-description/src/components/schemas/BioDomain.yaml new file mode 100644 index 0000000000..c19b2c3864 --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/BioDomain.yaml @@ -0,0 +1,27 @@ +type: object +description: BioDomain +properties: + biodomain: + type: string + description: Name of the biological domain + go_terms: + type: array + description: List of Gene Ontology (GO) terms + items: + type: string + n_biodomain_terms: + type: integer + description: Number of terms associated with the biological domain + n_gene_biodomain_terms: + type: integer + description: Number of gene terms linked to the biological domain + pct_linking_terms: + type: number + format: float + description: Percentage of terms linking to the domain +required: + - biodomain + - go_terms + - n_biodomain_terms + - n_gene_biodomain_terms + - pct_linking_terms diff --git a/libs/agora/api-description/src/components/schemas/BioDomainInfo.yaml b/libs/agora/api-description/src/components/schemas/BioDomainInfo.yaml new file mode 100644 index 0000000000..209fd9b22b --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/BioDomainInfo.yaml @@ -0,0 +1,7 @@ +type: object +description: BioDomainInfo +properties: + name: + type: string +required: + - name diff --git a/libs/agora/api-description/src/components/schemas/BioDomains.yaml b/libs/agora/api-description/src/components/schemas/BioDomains.yaml index 765ee185c3..e600f2e3a2 100644 --- a/libs/agora/api-description/src/components/schemas/BioDomains.yaml +++ b/libs/agora/api-description/src/components/schemas/BioDomains.yaml @@ -1,27 +1,14 @@ type: object description: BioDomains properties: - biodomain: + ensembl_gene_id: type: string - description: Name of the biological domain - go_terms: + description: The Ensembl Gene ID. + gene_biodomains: type: array - description: List of Gene Ontology (GO) terms items: - type: string - n_biodomain_terms: - type: integer - description: Number of terms associated with the biological domain - n_gene_biodomain_terms: - type: integer - description: Number of gene terms linked to the biological domain - pct_linking_terms: - type: number - format: float - description: Percentage of terms linking to the domain + $ref: BioDomain.yaml + description: A list of gene biodomains. required: - - biodomain - - go_terms - - n_biodomain_terms - - n_gene_biodomain_terms - - pct_linking_terms + - ensembl_gene_id + - gene_biodomains diff --git a/libs/agora/api-description/src/components/schemas/Distribution.yaml b/libs/agora/api-description/src/components/schemas/Distribution.yaml new file mode 100644 index 0000000000..6aad0216a5 --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/Distribution.yaml @@ -0,0 +1,29 @@ +type: object +description: Distributions +properties: + rna_differential_expression: + type: array + items: + $ref: RnaDistribution.yaml + proteomics_LFQ: + type: array + items: + $ref: ProteomicsDistribution.yaml + proteomics_SRM: + type: array + items: + $ref: ProteomicsDistribution.yaml + proteomics_TMT: + type: array + items: + $ref: ProteomicsDistribution.yaml + overall_scores: + type: array + items: + $ref: OverallScoresDistribution.yaml +required: + - rna_differential_expression + - proteomics_LFQ + - proteomics_SRM + - proteomics_TMT + - overall_scores diff --git a/libs/agora/api-description/src/components/schemas/ExperimentalValidation.yaml b/libs/agora/api-description/src/components/schemas/ExperimentalValidation.yaml index 0055672443..0009fa672f 100644 --- a/libs/agora/api-description/src/components/schemas/ExperimentalValidation.yaml +++ b/libs/agora/api-description/src/components/schemas/ExperimentalValidation.yaml @@ -1,5 +1,5 @@ type: object -description: Gene +description: Experimental Validation properties: _id: type: string @@ -33,8 +33,6 @@ properties: type: string date_report: type: string - abability_bucket_definition: - type: string required: - _id - ensembl_gene_id diff --git a/libs/agora/api-description/src/components/schemas/GCTGene.yaml b/libs/agora/api-description/src/components/schemas/GCTGene.yaml new file mode 100644 index 0000000000..2e0f6d5afd --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/GCTGene.yaml @@ -0,0 +1,77 @@ +type: object +description: GCT Gene +properties: + ensembl_gene_id: + type: string + description: 'Ensembl gene identifier' + hgnc_symbol: + type: string + description: 'HGNC gene symbol' + uniprotid: + type: string + nullable: true + description: 'UniProt identifier' + uid: + type: string + nullable: true + description: 'Unique identifier' + search_string: + type: string + nullable: true + description: 'Search string' + search_array: + type: array + items: + type: string + nullable: true + description: 'Array of search terms' + tissues: + type: array + items: + $ref: GCTGeneTissue.yaml + description: 'Array of gene tissues' + nominations: + $ref: GCTGeneNominations.yaml + nullable: true + description: 'Gene nominations data' + associations: + type: array + items: + type: number + nullable: true + description: 'Array of association values' + target_risk_score: + type: number + nullable: true + description: 'Target risk score' + genetics_score: + type: number + nullable: true + description: 'Genetics score' + multi_omics_score: + type: number + nullable: true + description: 'Multi-omics score' + biodomains: + type: array + items: + type: string + nullable: true + description: 'Array of biological domains' + pinned: + type: boolean + nullable: true + description: 'Whether the gene is pinned' + target_enabling_resources: + type: array + items: + type: string + nullable: true + description: 'Target enabling resources' +required: + - ensembl_gene_id + - hgnc_symbol + - tissues + - target_risk_score + - genetics_score + - multi_omics_score diff --git a/libs/agora/api-description/src/components/schemas/GCTGeneNominations.yaml b/libs/agora/api-description/src/components/schemas/GCTGeneNominations.yaml new file mode 100644 index 0000000000..b0af0c42be --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/GCTGeneNominations.yaml @@ -0,0 +1,42 @@ +type: object +description: GCTGeneNominations +properties: + count: + type: integer + description: 'The total number of gene nominations.' + year: + type: integer + description: 'The year of the nominations.' + teams: + type: array + items: + type: string + description: 'The list of teams involved in the nominations.' + studies: + type: array + items: + type: string + description: 'The list of studies related to the nominations.' + inputs: + type: array + items: + type: string + description: 'The input data used for the nominations.' + programs: + type: array + items: + type: string + description: 'The list of programs associated with the nominations.' + validations: + type: array + items: + type: string + description: 'The list of validations for the nominations.' +required: + - count + - year + - teams + - studies + - inputs + - programs + - validations diff --git a/libs/agora/api-description/src/components/schemas/GCTGeneTissue.yaml b/libs/agora/api-description/src/components/schemas/GCTGeneTissue.yaml new file mode 100644 index 0000000000..45b6d0eacf --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/GCTGeneTissue.yaml @@ -0,0 +1,32 @@ +type: object +description: GCTGeneTissue +properties: + name: + type: string + description: 'Name of the gene or tissue.' + logfc: + type: number + format: float + description: 'Log fold change value.' + adj_p_val: + type: number + format: float + description: 'Adjusted p-value.' + ci_l: + type: number + format: float + description: 'Lower confidence interval.' + ci_r: + type: number + format: float + description: 'Upper confidence interval.' + medianexpression: + $ref: MedianExpression.yaml + nullable: true +required: + - name + - logfc + - adj_p_val + - ci_l + - ci_r + - mediaexpression diff --git a/libs/agora/api-description/src/components/schemas/GCTGenesList.yaml b/libs/agora/api-description/src/components/schemas/GCTGenesList.yaml new file mode 100644 index 0000000000..cc53b437d2 --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/GCTGenesList.yaml @@ -0,0 +1,7 @@ +type: object +description: List of GCTGene +properties: + items: + type: array + items: + $ref: GCTGene.yaml diff --git a/libs/agora/api-description/src/components/schemas/Gene.yaml b/libs/agora/api-description/src/components/schemas/Gene.yaml index b20dbbbde8..7a7cff7ab9 100644 --- a/libs/agora/api-description/src/components/schemas/Gene.yaml +++ b/libs/agora/api-description/src/components/schemas/Gene.yaml @@ -9,6 +9,8 @@ properties: type: string summary: type: string + hgnc_symbol: + type: string alias: type: array items: diff --git a/libs/agora/api-description/src/components/schemas/OverallScoresDistribution.yaml b/libs/agora/api-description/src/components/schemas/OverallScoresDistribution.yaml new file mode 100644 index 0000000000..327df5c5bc --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/OverallScoresDistribution.yaml @@ -0,0 +1,30 @@ +type: object +description: Distributions +properties: + distribution: + type: array + items: + type: number + description: Distribution of overall scores + bins: + type: array + items: + type: array + items: + type: number + description: Bins used in the distribution + name: + type: string + description: Name of the score distribution + syn_id: + type: string + description: Synapse ID associated with the score + wiki_id: + type: string + description: Wiki ID associated with the score +required: + - distribution + - bins + - name + - syn_id + - wiki_id diff --git a/libs/agora/api-description/src/components/schemas/ProteomicsDistribution.yaml b/libs/agora/api-description/src/components/schemas/ProteomicsDistribution.yaml new file mode 100644 index 0000000000..ea9fcfccf1 --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/ProteomicsDistribution.yaml @@ -0,0 +1,8 @@ +type: object +description: Distributions +properties: + type: + type: string + description: Type of proteomics distribution (e.g., LFQ, SRM, TMT) +required: + - type diff --git a/libs/agora/api-description/src/components/schemas/RnaDistribution.yaml b/libs/agora/api-description/src/components/schemas/RnaDistribution.yaml new file mode 100644 index 0000000000..c070969f97 --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/RnaDistribution.yaml @@ -0,0 +1,36 @@ +type: object +description: Distributions +properties: + _id: + type: string + description: ID of the RNA distribution + model: + type: string + description: Model of the RNA data + tissue: + type: string + description: Tissue type + min: + type: number + description: Minimum value in the distribution + max: + type: number + description: Maximum value in the distribution + first_quartile: + type: number + description: First quartile value + median: + type: number + description: Median value + third_quartile: + type: number + description: Third quartile value +required: + - _id + - model + - tissue + - min + - max + - first_quartile + - median + - third_quartile diff --git a/libs/agora/api-description/src/components/schemas/Scores.yaml b/libs/agora/api-description/src/components/schemas/Scores.yaml new file mode 100644 index 0000000000..c96942252f --- /dev/null +++ b/libs/agora/api-description/src/components/schemas/Scores.yaml @@ -0,0 +1,25 @@ +type: object +description: Scores +properties: + ensembl_gene_id: + type: string + description: The ensembl gene ID. + target_risk_score: + type: number + description: The target risk score. + genetics_score: + type: number + description: The genetics score. + multi_omics_score: + type: number + description: The multi-omics score. +required: + - ensembl_gene_id + - target_risk_score + - genetics_score + - multi_omics_score +example: + ensembl_gene_id: 'ENSG00000139618' + target_risk_score: 12.5 + genetics_score: 8.3 + multi_omics_score: 15.2 diff --git a/libs/agora/api-description/src/components/schemas/TeamList.yaml b/libs/agora/api-description/src/components/schemas/TeamsList.yaml similarity index 100% rename from libs/agora/api-description/src/components/schemas/TeamList.yaml rename to libs/agora/api-description/src/components/schemas/TeamsList.yaml diff --git a/libs/agora/api-description/src/openapi.yaml b/libs/agora/api-description/src/openapi.yaml index 71869bbbf5..e9bf42e939 100644 --- a/libs/agora/api-description/src/openapi.yaml +++ b/libs/agora/api-description/src/openapi.yaml @@ -21,10 +21,24 @@ tags: - name: TeamMember description: Operations about team members. paths: + /biodomains: + $ref: paths/biodomains.yaml + /biodomains/{ensg}: + $ref: paths/biodomains/@{ensg}.yaml + /genes: + $ref: paths/genes.yaml + /genes/{ensg}: + $ref: paths/genes/@{ensg}.yaml + /genes/search: + $ref: paths/genes/search.yaml + /genes/comparison: + $ref: paths/genes/comparison.yaml + /genes/nominated: + $ref: paths/genes/nominated.yaml /dataversion: $ref: paths/dataversion.yaml - /genes/nominated: - $ref: paths/nominated.yaml + /distribution: + $ref: paths/distribution.yaml /teams: $ref: paths/teams.yaml /teamMembers/{name}/image: diff --git a/libs/agora/api-description/src/paths/biodomains.yaml b/libs/agora/api-description/src/paths/biodomains.yaml new file mode 100644 index 0000000000..1ce6c686a7 --- /dev/null +++ b/libs/agora/api-description/src/paths/biodomains.yaml @@ -0,0 +1,19 @@ +get: + tags: + - BioDomains + summary: List BioDomains + description: List BioDomains + operationId: listBioDomains + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/BioDomainInfo.yaml + description: Success + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/libs/agora/api-description/src/paths/biodomains/@{ensg}.yaml b/libs/agora/api-description/src/paths/biodomains/@{ensg}.yaml new file mode 100644 index 0000000000..51c80d39ef --- /dev/null +++ b/libs/agora/api-description/src/paths/biodomains/@{ensg}.yaml @@ -0,0 +1,26 @@ +get: + tags: + - BioDomains + summary: Retrieve bioDomain for a given ENSG + description: Get bioDomain + operationId: getBioDomain + parameters: + - name: ensg + in: path + required: true + description: The ENSG (Ensembl Gene ID) for which to retrieve biodomain data. + schema: + type: string + responses: + '200': + description: Successful retrieval of bio-domains + content: + application/json: + schema: + type: array + items: + $ref: ../../components/schemas/BioDomain.yaml + '404': + description: ENSG not found + '500': + description: Internal server error diff --git a/libs/agora/api-description/src/paths/distribution.yaml b/libs/agora/api-description/src/paths/distribution.yaml new file mode 100644 index 0000000000..1ce1826586 --- /dev/null +++ b/libs/agora/api-description/src/paths/distribution.yaml @@ -0,0 +1,17 @@ +get: + tags: + - Distribution + summary: Get distribution data + description: Get distribution data + operationId: getDistribution + responses: + '200': + content: + application/json: + schema: + $ref: ../components/schemas/Distribution.yaml + description: A successful response + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/libs/agora/api-description/src/paths/genes.yaml b/libs/agora/api-description/src/paths/genes.yaml new file mode 100644 index 0000000000..da51d24950 --- /dev/null +++ b/libs/agora/api-description/src/paths/genes.yaml @@ -0,0 +1,27 @@ +get: + tags: + - Genes + summary: Retrieve a list of genes or filter by Ensembl gene IDs + description: This endpoint returns all genes or filters genes by Ensembl gene IDs if provided. + operationId: getGenes + parameters: + - in: query + name: ids + schema: + type: string + description: Comma-separated list of Ensembl gene IDs to filter. + required: false + example: 'ENSG00000139618,ENSG00000248378' + responses: + '200': + description: A list of genes. + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/Gene.yaml + '400': + $ref: ../components/responses/BadRequest.yaml + '500': + $ref: ../components/responses/InternalServerError.yaml diff --git a/libs/agora/api-description/src/paths/genes/@{ensg}.yaml b/libs/agora/api-description/src/paths/genes/@{ensg}.yaml new file mode 100644 index 0000000000..5e735e02de --- /dev/null +++ b/libs/agora/api-description/src/paths/genes/@{ensg}.yaml @@ -0,0 +1,23 @@ +get: + tags: + - Genes + summary: Get gene details by Ensembl Gene ID + operationId: getGene + parameters: + - name: ensg + in: path + required: true + description: Ensembl Gene ID (ENSG) + schema: + type: string + responses: + '200': + description: Gene details successfully retrieved + content: + application/json: + schema: + $ref: ../../components/schemas/Gene.yaml + '400': + $ref: ../../components/responses/BadRequest.yaml + '500': + $ref: ../../components/responses/InternalServerError.yaml diff --git a/libs/agora/api-description/src/paths/genes/comparison.yaml b/libs/agora/api-description/src/paths/genes/comparison.yaml new file mode 100644 index 0000000000..c3817b0cf9 --- /dev/null +++ b/libs/agora/api-description/src/paths/genes/comparison.yaml @@ -0,0 +1,33 @@ +get: + tags: + - Genes + summary: Get comparison genes based on category and subcategory + description: Get comparison genes based on category and subcategory + operationId: getComparisonGenes + parameters: + - in: query + name: category + required: true + schema: + type: string + enum: + - 'RNA - Differential Expression' + - 'Protein - Differential Expression' + description: The category of the comparison (either RNA or Protein Differential Expression). + - in: query + name: subCategory + required: true + schema: + type: string + description: The subcategory for gene comparison (sub-category must be a string). + responses: + '200': + description: Successful response with comparison genes + content: + application/json: + schema: + $ref: ../../components/schemas/GCTGenesList.yaml + '404': + $ref: ../../components/responses/NotFound.yaml + '500': + $ref: ../../components/responses/InternalServerError.yaml diff --git a/libs/agora/api-description/src/paths/genes/nominated.yaml b/libs/agora/api-description/src/paths/genes/nominated.yaml new file mode 100644 index 0000000000..1745c6285e --- /dev/null +++ b/libs/agora/api-description/src/paths/genes/nominated.yaml @@ -0,0 +1,17 @@ +get: + tags: + - Genes + summary: Get nominated genes + description: Retrieves a list of genes with nominations and relevant information. + operationId: getNominatedGenes + responses: + '200': + description: A list of nominated genes. + content: + application/json: + schema: + $ref: ../../components/schemas/NominatedGenesList.yaml + '400': + $ref: ../../components/responses/BadRequest.yaml + '500': + $ref: ../../components/responses/InternalServerError.yaml diff --git a/libs/agora/api-description/src/paths/genes/search.yaml b/libs/agora/api-description/src/paths/genes/search.yaml new file mode 100644 index 0000000000..a25a8f9909 --- /dev/null +++ b/libs/agora/api-description/src/paths/genes/search.yaml @@ -0,0 +1,25 @@ +get: + tags: + - Genes + summary: Search Genes + description: Search Genes + operationId: searchGene + parameters: + - name: id + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ../../components/schemas/Gene.yaml + '400': + $ref: ../../components/responses/BadRequest.yaml + '500': + $ref: ../../components/responses/InternalServerError.yaml diff --git a/libs/agora/api-description/src/paths/teamMembers/@{name}/image.yaml b/libs/agora/api-description/src/paths/teamMembers/@{name}/image.yaml index 6d7dd96d9e..ac2bc6e94f 100644 --- a/libs/agora/api-description/src/paths/teamMembers/@{name}/image.yaml +++ b/libs/agora/api-description/src/paths/teamMembers/@{name}/image.yaml @@ -1,6 +1,6 @@ get: tags: - - TeamMember + - Teams summary: Get Team Member Image description: Get Team Member Image operationId: getTeamMemberImage diff --git a/libs/agora/api-description/src/paths/teams.yaml b/libs/agora/api-description/src/paths/teams.yaml index 144863dc18..c3720a9d4c 100644 --- a/libs/agora/api-description/src/paths/teams.yaml +++ b/libs/agora/api-description/src/paths/teams.yaml @@ -1,6 +1,6 @@ get: tags: - - Team + - Teams summary: List Teams description: List Teams operationId: listTeams @@ -9,7 +9,7 @@ get: content: application/json: schema: - $ref: ../components/schemas/TeamList.yaml + $ref: ../components/schemas/TeamsList.yaml description: Success '400': $ref: ../components/responses/BadRequest.yaml diff --git a/libs/agora/nominated-targets/src/lib/nominated-targets.component.ts b/libs/agora/nominated-targets/src/lib/nominated-targets.component.ts index a7ce46b72e..5990e73194 100644 --- a/libs/agora/nominated-targets/src/lib/nominated-targets.component.ts +++ b/libs/agora/nominated-targets/src/lib/nominated-targets.component.ts @@ -1,12 +1,7 @@ import { CommonModule } from '@angular/common'; import { Component, inject, OnInit } from '@angular/core'; import { RouterLink } from '@angular/router'; -import { - Gene, - NominatedGenesList, - NominatedGenesService, - TargetNomination, -} from '@sagebionetworks/agora/api-client-angular'; +import { Gene, TargetNomination, GenesService } from '@sagebionetworks/agora/api-client-angular'; import { GeneTableComponent } from '@sagebionetworks/agora/genes'; import { GeneTableColumn } from '@sagebionetworks/agora/models'; import { ModalLinkComponent, SvgIconComponent } from '@sagebionetworks/agora/ui'; @@ -19,7 +14,7 @@ import { ModalLinkComponent, SvgIconComponent } from '@sagebionetworks/agora/ui' styleUrls: ['./nominated-targets.component.scss'], }) export class NominatedTargetsComponent implements OnInit { - apiService = inject(NominatedGenesService); + apiService = inject(GenesService); genes: Gene[] = []; searchTerm = ''; @@ -71,7 +66,7 @@ export class NominatedTargetsComponent implements OnInit { ]; ngOnInit() { - this.apiService.listNominatedGenes().subscribe((response: NominatedGenesList) => { + this.apiService.getNominatedGenes().subscribe((response) => { if (!response.items) return; const genes = response.items; genes.forEach((de: Gene) => { diff --git a/libs/agora/teams/src/lib/team-member-list/team-member-list.component.ts b/libs/agora/teams/src/lib/team-member-list/team-member-list.component.ts index 2ea1ccff23..f90b5ab1c3 100644 --- a/libs/agora/teams/src/lib/team-member-list/team-member-list.component.ts +++ b/libs/agora/teams/src/lib/team-member-list/team-member-list.component.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common'; import { Component, inject, Input } from '@angular/core'; -import { Team, TeamMember, TeamMemberService } from '@sagebionetworks/agora/api-client-angular'; +import { Team, TeamMember, TeamsService } from '@sagebionetworks/agora/api-client-angular'; import { map, Observable } from 'rxjs'; @Component({ @@ -9,10 +9,10 @@ import { map, Observable } from 'rxjs'; imports: [CommonModule], templateUrl: './team-member-list.component.html', styleUrls: ['./team-member-list.component.scss'], - providers: [TeamMemberService], + providers: [TeamsService], }) export class TeamMemberListComponent { - teamMemberService = inject(TeamMemberService); + teamsService = inject(TeamsService); _team: Team = {} as Team; get team(): Team { @@ -46,7 +46,7 @@ export class TeamMemberListComponent { } getTeamMemberImageUrl(name: string): Observable { - return this.teamMemberService.getTeamMemberImage(name).pipe( + return this.teamsService.getTeamMemberImage(name).pipe( map((buffer) => { if (!buffer || buffer.size <= 0) { return; diff --git a/libs/agora/teams/src/lib/teams/teams.component.ts b/libs/agora/teams/src/lib/teams/teams.component.ts index 3e42cc4140..5f0ae38f73 100644 --- a/libs/agora/teams/src/lib/teams/teams.component.ts +++ b/libs/agora/teams/src/lib/teams/teams.component.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common'; import { Component, OnInit } from '@angular/core'; -import { Team, TeamList, TeamService } from '@sagebionetworks/agora/api-client-angular'; +import { Team, TeamsList, TeamsService } from '@sagebionetworks/agora/api-client-angular'; import { HelperService } from '@sagebionetworks/agora/services'; import { TeamListComponent } from '../team-list/team-list.component'; import { catchError, finalize, map, Observable, of } from 'rxjs'; @@ -11,14 +11,14 @@ import { catchError, finalize, map, Observable, of } from 'rxjs'; imports: [CommonModule, TeamListComponent], templateUrl: './teams.component.html', styleUrls: ['./teams.component.scss'], - providers: [HelperService, TeamService], + providers: [HelperService, TeamsService], }) export class TeamsComponent implements OnInit { teams$!: Observable; constructor( private helperService: HelperService, - private teamService: TeamService, + private teamsService: TeamsService, ) {} ngOnInit() { @@ -28,8 +28,8 @@ export class TeamsComponent implements OnInit { loadTeams() { this.helperService.setLoading(true); - this.teams$ = this.teamService.listTeams().pipe( - map((res: TeamList) => res.items || []), + this.teams$ = this.teamsService.listTeams().pipe( + map((res: TeamsList) => res.items || []), catchError((error: Error) => { console.error('Error loading teams:', error.message); return of([]);