Skip to content

Commit

Permalink
feat(agora): agora fixes (AG-1604) and Q4 2024 changes (AG-1605) (#2955)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagely1 authored Jan 10, 2025
1 parent 9597389 commit 4314449
Show file tree
Hide file tree
Showing 61 changed files with 1,169 additions and 479 deletions.
2 changes: 1 addition & 1 deletion apps/agora/api/src/components/genes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export async function genesRoute(req: Request, res: Response, next: NextFunction
try {
const result = await getGenes(<string | string[]>req.query.ids);
setHeaders(res);
res.json({ items: result });
res.json(result);
} catch (err) {
next(err);
}
Expand Down
5 changes: 3 additions & 2 deletions apps/agora/api/src/models/genes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const DruggabilitySchema = new Schema<Druggability>({
sm_druggability_bucket: { type: Number, required: true },
safety_bucket: { type: Number, required: true },
abability_bucket: { type: Number, required: true },
pharos_class: { type: String, required: true },
pharos_class: { type: [String], required: true },
classification: { type: String, required: true },
safety_bucket_definition: { type: String, required: true },
abability_bucket_definition: { type: String, required: true },
Expand All @@ -67,6 +67,7 @@ const GeneSchema = new Schema<Gene>(
summary: { type: String, required: true },
hgnc_symbol: { type: String, required: true },
alias: [{ type: String, required: true }],
uniprotkb_accessions: [{ type: String, required: true }],
is_igap: { type: Boolean, required: true },
is_eqtl: { type: Boolean, required: true },
is_any_rna_changed_in_ad_brain: { type: Boolean, required: true },
Expand All @@ -75,7 +76,7 @@ const GeneSchema = new Schema<Gene>(
protein_brain_change_studied: { type: Boolean, required: true },
target_nominations: { type: [TargetNominationSchema], required: true },
median_expression: { type: [MedianExpressionSchema], required: true },
druggability: { type: [DruggabilitySchema], required: true },
druggability: { type: DruggabilitySchema, required: true },
total_nominations: { type: Number, required: true },
ensembl_info: { type: EnsemblInfoSchema, required: true },
},
Expand Down
1 change: 0 additions & 1 deletion apps/agora/app/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
<agora-footer></agora-footer>
</div>
<p-toast class="global-toast" position="bottom-center"></p-toast>
<agora-loading-overlay [isGlobal]="true"></agora-loading-overlay>
8 changes: 2 additions & 6 deletions apps/agora/app/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import { Component, inject, OnInit } from '@angular/core';
import { Meta, Title } from '@angular/platform-browser';
import { ActivatedRoute, NavigationEnd, Router, RouterModule } from '@angular/router';
import {
FooterComponent,
HeaderComponent,
LoadingOverlayComponent,
} from '@sagebionetworks/agora/ui';
import { FooterComponent, HeaderComponent } from '@sagebionetworks/agora/ui';
import { filter } from 'rxjs';
import { ToastModule } from 'primeng/toast';
import { MessageService } from 'primeng/api';

@Component({
imports: [RouterModule, HeaderComponent, FooterComponent, LoadingOverlayComponent, ToastModule],
imports: [RouterModule, HeaderComponent, FooterComponent, ToastModule],
providers: [MessageService],
selector: 'app-root',
templateUrl: './app.component.html',
Expand Down
11 changes: 8 additions & 3 deletions apps/agora/app/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,25 @@ export const routes: Route[] = [
description: 'Nominate a gene as a new candidate for AD treatment or prevention.',
},
},
{
path: 'genes/:id/similar',
loadChildren: () =>
import('@sagebionetworks/agora/genes').then((routes) => routes.similarRoute),
},
{
path: 'genes/:id/:tab/:subtab',
loadChildren: () =>
import('@sagebionetworks/agora/gene-details').then((routes) => routes.routes),
import('@sagebionetworks/agora/genes').then((routes) => routes.detailsRoute),
},
{
path: 'genes/:id/:tab',
loadChildren: () =>
import('@sagebionetworks/agora/gene-details').then((routes) => routes.routes),
import('@sagebionetworks/agora/genes').then((routes) => routes.detailsRoute),
},
{
path: 'genes/:id',
loadChildren: () =>
import('@sagebionetworks/agora/gene-details').then((routes) => routes.routes),
import('@sagebionetworks/agora/genes').then((routes) => routes.detailsRoute),
data: {
title: 'Agora | Gene Details',
description: "View information and evidence about genes in Alzheimer's disease.",
Expand Down
3 changes: 2 additions & 1 deletion apps/agora/app/src/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"appVersion": "4.0.0",
"csrApiUrl": "http://localhost:3333/v1",
"ssrApiUrl": "http://agora-api:3333/v1",
"rollbarToken": "e788198867474855a996485580b08d03"
"rollbarToken": "e788198867474855a996485580b08d03",
"tagName": "agora/v0.0.2"
}
3 changes: 2 additions & 1 deletion apps/agora/app/src/config/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"appVersion": "${APP_VERSION}",
"csrApiUrl": "${CSR_API_URL}",
"ssrApiUrl": "${SSR_API_URL}",
"rollbarToken": "${ROLLBAR_TOKEN}"
"rollbarToken": "${ROLLBAR_TOKEN}",
"tagName": "${TAG_NAME}"
}
2 changes: 1 addition & 1 deletion apps/agora/data/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ DB_HOST="agora-mongo" # must match mongo service name

# specifies data release manifest and team images folder
DATA_FILE="syn13363290"
DATA_VERSION="68"
DATA_VERSION="71"
TEAM_IMAGES_ID="syn12861877"
SYNAPSE_AUTH_TOKEN="agora-service-user-pat-here"
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ model/gCTGeneNominations.ts
model/gCTGeneTissue.ts
model/gCTGenesList.ts
model/gene.ts
model/geneNetworkLinks.ts
model/genesList.ts
model/medianExpression.ts
model/models.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface Druggability {
sm_druggability_bucket: number;
safety_bucket: number;
abability_bucket: number;
pharos_class: string;
pharos_class: Array<string>;
classification: string;
safety_bucket_definition: string;
abability_bucket_definition: string;
Expand Down
8 changes: 5 additions & 3 deletions libs/agora/api-client-angular/src/lib/model/gene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { ExperimentalValidation } from './experimentalValidation';
import { EnsemblInfo } from './ensemblInfo';
import { RnaDifferentialExpression } from './rnaDifferentialExpression';
import { BioDomains } from './bioDomains';
import { GeneNetworkLinks } from './geneNetworkLinks';
import { TargetNomination } from './targetNomination';
import { NeuropathologicCorrelation } from './neuropathologicCorrelation';
import { SimilarGenesNetwork } from './similarGenesNetwork';
Expand All @@ -31,6 +32,7 @@ export interface Gene {
summary: string;
hgnc_symbol: string;
alias: Array<string>;
uniprotkb_accessions?: Array<string>;
is_igap: boolean;
is_eqtl: boolean;
is_any_rna_changed_in_ad_brain: boolean;
Expand All @@ -39,7 +41,7 @@ export interface Gene {
protein_brain_change_studied: boolean;
target_nominations: Array<TargetNomination> | null;
median_expression: Array<MedianExpression>;
druggability: Array<Druggability>;
druggability: Druggability;
total_nominations: number | null;
is_adi?: boolean;
is_tep?: boolean;
Expand All @@ -52,12 +54,12 @@ export interface Gene {
overall_scores?: OverallScores;
neuropathologic_correlations?: Array<NeuropathologicCorrelation> | null;
experimental_validation?: Array<ExperimentalValidation> | null;
links?: { [key: string]: object } | null;
links?: { [key: string]: GeneNetworkLinks } | null;
similar_genes_network?: SimilarGenesNetwork;
ab_modality_display_value?: string | null;
safety_rating_display_value?: string | null;
sm_druggability_display_value?: string | null;
pharos_class_display_value?: string | null;
pharos_class_display_value?: Array<string> | null;
is_any_rna_changed_in_ad_brain_display_value?: string | null;
is_any_protein_changed_in_ad_brain_display_value?: string | null;
nominated_target_display_value?: boolean | null;
Expand Down
37 changes: 37 additions & 0 deletions libs/agora/api-client-angular/src/lib/model/geneNetworkLinks.ts
Original file line number Diff line number Diff line change
@@ -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.
*/

/**
* Gene Network Links
*/
export interface GeneNetworkLinks {
/**
* Ensembl gene ID for gene A
*/
geneA_ensembl_gene_id: string;
/**
* Ensembl gene ID for gene B
*/
geneB_ensembl_gene_id: string;
/**
* External gene name for gene A
*/
geneA_external_gene_name: string;
/**
* External gene name for gene B
*/
geneB_external_gene_name: string;
/**
* Associated brain region
*/
brainRegion: string;
}
1 change: 1 addition & 0 deletions libs/agora/api-client-angular/src/lib/model/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export * from './gCTGeneNominations';
export * from './gCTGeneTissue';
export * from './gCTGenesList';
export * from './gene';
export * from './geneNetworkLinks';
export * from './genesList';
export * from './medianExpression';
export * from './neuropathologicCorrelation';
Expand Down
44 changes: 37 additions & 7 deletions libs/agora/api-description/build/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,9 @@ components:
type: integer
example: 3
pharos_class:
type: string
example: Tclin
type: array
items:
type: string
classification:
type: string
example: Enzyme
Expand Down Expand Up @@ -622,6 +623,31 @@ components:
- reference_doi
- date_report
- abability_bucket_definition
GeneNetworkLinks:
type: object
description: Gene Network Links
properties:
geneA_ensembl_gene_id:
type: string
description: Ensembl gene ID for gene A
geneB_ensembl_gene_id:
type: string
description: Ensembl gene ID for gene B
geneA_external_gene_name:
type: string
description: External gene name for gene A
geneB_external_gene_name:
type: string
description: External gene name for gene B
brainRegion:
type: string
description: Associated brain region
required:
- geneA_ensembl_gene_id
- geneB_ensembl_gene_id
- geneA_external_gene_name
- geneB_external_gene_name
- brainRegion
SimilarGenesNetworkNode:
type: object
description: SimilarGenesNetworkNode
Expand Down Expand Up @@ -730,6 +756,10 @@ components:
type: array
items:
type: string
uniprotkb_accessions:
type: array
items:
type: string
is_igap:
type: boolean
is_eqtl:
Expand All @@ -752,9 +782,7 @@ components:
items:
$ref: '#/components/schemas/MedianExpression'
druggability:
type: array
items:
$ref: '#/components/schemas/Druggability'
$ref: '#/components/schemas/Druggability'
total_nominations:
type: integer
nullable: true
Expand Down Expand Up @@ -805,7 +833,7 @@ components:
links:
type: object
additionalProperties:
type: object
$ref: '#/components/schemas/GeneNetworkLinks'
nullable: true
similar_genes_network:
$ref: '#/components/schemas/SimilarGenesNetwork'
Expand All @@ -820,7 +848,9 @@ components:
type: string
nullable: true
pharos_class_display_value:
type: string
type: array
items:
type: string
nullable: true
is_any_rna_changed_in_ad_brain_display_value:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ properties:
type: integer
example: 3
pharos_class:
type: string
example: 'Tclin'
type: array
items:
type: string
classification:
type: string
example: 'Enzyme'
Expand Down
14 changes: 9 additions & 5 deletions libs/agora/api-description/src/components/schemas/Gene.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ properties:
type: array
items:
type: string
uniprotkb_accessions:
type: array
items:
type: string
is_igap:
type: boolean
is_eqtl:
Expand All @@ -37,9 +41,7 @@ properties:
items:
$ref: MedianExpression.yaml
druggability:
type: array
items:
$ref: Druggability.yaml
$ref: Druggability.yaml
total_nominations:
type: integer
nullable: true
Expand Down Expand Up @@ -90,7 +92,7 @@ properties:
links:
type: object
additionalProperties:
type: object
$ref: GeneNetworkLinks.yaml
nullable: true
similar_genes_network:
$ref: SimilarGenesNetwork.yaml
Expand All @@ -105,7 +107,9 @@ properties:
type: string
nullable: true
pharos_class_display_value:
type: string
type: array
items:
type: string
nullable: true
is_any_rna_changed_in_ad_brain_display_value:
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
type: object
description: Gene Network Links
properties:
geneA_ensembl_gene_id:
type: string
description: 'Ensembl gene ID for gene A'
geneB_ensembl_gene_id:
type: string
description: 'Ensembl gene ID for gene B'
geneA_external_gene_name:
type: string
description: 'External gene name for gene A'
geneB_external_gene_name:
type: string
description: 'External gene name for gene B'
brainRegion:
type: string
description: 'Associated brain region'
required:
- geneA_ensembl_gene_id
- geneB_ensembl_gene_id
- geneA_external_gene_name
- geneB_external_gene_name
- brainRegion
Loading

0 comments on commit 4314449

Please sign in to comment.