diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 43f9d360..d8172629 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,18 +5,19 @@ name: Node.js CI on: push: - branches: [ "develop" ] + branches: [ develop, main ] pull_request: - branches: [ "develop" ] + branches: [ develop, main ] jobs: build: - + timeout-minutes: 60 + runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x, 18.x] + node-version: [16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ # Allow OIDC Integration (so we can assume the AWS role to deploy) # permissions: diff --git a/playwright.config.ts b/playwright.config.ts index 2bcdc21b..9c6e531a 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,5 +1,7 @@ import { defineConfig, devices } from '@playwright/test'; +export const baseURL = 'http://localhost:8080'; + /** * Read environment variables from file. * https://github.com/motdotla/dotenv @@ -26,7 +28,7 @@ export default defineConfig({ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://127.0.0.1:8080', + baseURL: baseURL, /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -71,9 +73,9 @@ export default defineConfig({ ], /* Run your local dev server before starting the tests */ - // webServer: { - // command: 'npm run start', - // url: 'http://127.0.0.1:3000', - // reuseExistingServer: !process.env.CI, - // }, + webServer: { + command: 'npm run start', + url: baseURL, + reuseExistingServer: !process.env.CI, + }, }); diff --git a/src/app/features/genes/components/gene-hero/gene-hero.component.html b/src/app/features/genes/components/gene-hero/gene-hero.component.html index aa2e8959..e148f544 100644 --- a/src/app/features/genes/components/gene-hero/gene-hero.component.html +++ b/src/app/features/genes/components/gene-hero/gene-hero.component.html @@ -14,7 +14,7 @@

{{ getSummary() }}

- +

Biological Domains

@@ -22,10 +22,24 @@

Biological Domains

{{ getBiodomains() }}

-
+

Also known as

-

{{ gene.ensembl_gene_id }}

-

+ +

+ {{ gene.ensembl_gene_id }} + + (Ensembl Release {{ gene.ensembl_info[0].ensembl_release }}) + +

+ + + {{ gene.ensembl_gene_id }} + +

+ Possible replacement values: + {{ gene.ensembl_info[0].ensembl_possible_replacements.join(', ')}} +

+

{{ getAlias() }}

diff --git a/src/app/features/genes/components/gene-hero/gene-hero.component.scss b/src/app/features/genes/components/gene-hero/gene-hero.component.scss index 57f98b79..f2c8c354 100644 --- a/src/app/features/genes/components/gene-hero/gene-hero.component.scss +++ b/src/app/features/genes/components/gene-hero/gene-hero.component.scss @@ -53,3 +53,7 @@ hr { text-transform: uppercase; margin-bottom: 15px; } + +.possible-replacements { + margin-bottom: 15px; +} \ No newline at end of file diff --git a/src/app/features/genes/components/gene-hero/gene-hero.component.spec.ts b/src/app/features/genes/components/gene-hero/gene-hero.component.spec.ts index d732b85f..f47342de 100644 --- a/src/app/features/genes/components/gene-hero/gene-hero.component.spec.ts +++ b/src/app/features/genes/components/gene-hero/gene-hero.component.spec.ts @@ -8,7 +8,7 @@ import { RouterTestingModule } from '@angular/router/testing'; // Internal // -------------------------------------------------------------------------- // import { GeneHeroComponent } from './'; -import { geneMock1, geneMock3 } from '../../../../testing'; +import { geneMissingEnsemblInfo, geneMock1, geneMock3 } from '../../../../testing'; // -------------------------------------------------------------------------- // // Tests @@ -110,4 +110,20 @@ describe('Component: Gene Hero', () => { const expected = 'Immune Response, Lipid Metabolism, Structural Stabilization, Synapse, Vasculature'; expect(component.getBiodomains()).toBe(expected); }); + + it('should return the ensembl permalink', () => { + component.gene = geneMock1; + expect(component.getEnsemblUrl()).toBe('https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794'); + }); + + it('should return an empty string if the gene is missing ensembl info', () => { + // if gene does not have a url + component.gene = geneMissingEnsemblInfo; + expect(component.getEnsemblUrl()).toBe(''); + }); + + it('should return a url with ensembl id', () => { + component.gene = geneMock1; + expect(component.getPossibleReplacementsURL()).toBe('https://useast.ensembl.org/Homo_sapiens/Gene/Idhistory?g=ENSG00000147065'); + }); }); diff --git a/src/app/features/genes/components/gene-hero/gene-hero.component.ts b/src/app/features/genes/components/gene-hero/gene-hero.component.ts index 07a7d389..56c0e735 100644 --- a/src/app/features/genes/components/gene-hero/gene-hero.component.ts +++ b/src/app/features/genes/components/gene-hero/gene-hero.component.ts @@ -101,4 +101,15 @@ export class GeneHeroComponent { .sort(ascending); return biodomains.join(', '); } + + getEnsemblUrl() { + if (!this.gene?.ensembl_info || this.gene.ensembl_info.length <= 0) + return ''; + return this.gene?.ensembl_info[0].ensembl_permalink; + } + + getPossibleReplacementsURL() { + let url = 'https://useast.ensembl.org/Homo_sapiens/Gene/Idhistory?g='; + return url += this.gene?.ensembl_gene_id; + } } diff --git a/src/app/models/EnsemblInfo.ts b/src/app/models/EnsemblInfo.ts new file mode 100644 index 00000000..a1b08a2e --- /dev/null +++ b/src/app/models/EnsemblInfo.ts @@ -0,0 +1,5 @@ +export interface EnsemblInfo { + ensembl_release: number; + ensembl_possible_replacements: string[]; + ensembl_permalink: string; +} \ No newline at end of file diff --git a/src/app/models/genes.ts b/src/app/models/genes.ts index f979fc0d..acb5320a 100644 --- a/src/app/models/genes.ts +++ b/src/app/models/genes.ts @@ -8,6 +8,7 @@ import { SimilarGenesNetwork, BioDomains } from './'; +import { EnsemblInfo } from './EnsemblInfo'; export interface TargetNomination { source: string; @@ -98,6 +99,9 @@ export interface Gene { input_data_display_value?: string; bio_domains?: BioDomains; + + // FIXME Will be fixed by AG-1324 in a future data release as it doesn't make sense to have an array here + ensembl_info: EnsemblInfo[]; } export interface GenesResponse { diff --git a/src/app/testing/gene-mocks.ts b/src/app/testing/gene-mocks.ts index f744697e..08e2ccb0 100644 --- a/src/app/testing/gene-mocks.ts +++ b/src/app/testing/gene-mocks.ts @@ -2,6 +2,1007 @@ import { Gene, GCTGene } from '../models'; +export const geneMissingEnsemblInfo: Gene = { + _id: '628ea1be0e8d04279fdbaa26', + ensembl_gene_id: 'ENSG00000147065', + name: 'moesin', + summary: + 'Moesin (for membrane-organizing extension spike protein) is a member of the ERM family which includes ezrin and radixin. ERM proteins appear to function as cross-linkers between plasma membranes and actin-based cytoskeletons. Moesin is localized to filopodia and other membranous protrusions that are important for cell-cell recognition and signaling and for cell movement. [provided by RefSeq, Jul 2008].', + hgnc_symbol: 'MSN', + alias: ['HEL70', 'IMD50'], + is_igap: false, + is_eqtl: false, + is_any_rna_changed_in_ad_brain: true, + rna_brain_change_studied: true, + is_any_protein_changed_in_ad_brain: true, + protein_brain_change_studied: true, + target_nominations: [], + median_expression: [], + druggability: [], + total_nominations: 5, + rna_differential_expression: [], + proteomics_LFQ: [], + proteomics_TMT: [], + metabolomics: '', + neuropathologic_correlations: [], + overall_scores: { + ensembl_gene_id: 'ENSG00000147065', + target_risk_score: 3.27647279338428, + genetics_score: 0.36140442487816, + multi_omics_score: 1.99912990696766, + literature_score: 0.915938461538462, + }, + experimental_validation: [], + links: [], + similar_genes_network: { + nodes: [ + { + ensembl_gene_id: 'ENSG00000147065', + hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000135046', + hgnc_symbol: 'ANXA1', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000137285', + hgnc_symbol: 'TUBB2B', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000117519', + hgnc_symbol: 'CNN3', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000111348', + hgnc_symbol: 'ARHGDIB', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000163191', + hgnc_symbol: 'S100A11', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000196924', + hgnc_symbol: 'FLNA', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000155366', + hgnc_symbol: 'RHOC', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000174021', + hgnc_symbol: 'GNG5', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG'], + }, + { + ensembl_gene_id: 'ENSG00000134531', + hgnc_symbol: 'EMP1', + brain_regions: ['DLPFC', 'FP', 'PHG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000101160', + hgnc_symbol: 'CTSZ', + brain_regions: ['DLPFC', 'FP', 'IFG', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000134871', + hgnc_symbol: 'COL4A2', + brain_regions: ['DLPFC', 'FP', 'IFG', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000111321', + hgnc_symbol: 'LTBR', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000119408', + hgnc_symbol: 'NEK6', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000102265', + hgnc_symbol: 'TIMP1', + brain_regions: ['CBE', 'DLPFC', 'IFG', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000087086', + hgnc_symbol: 'FTL', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG'], + }, + { + ensembl_gene_id: 'ENSG00000168610', + hgnc_symbol: 'STAT3', + brain_regions: ['CBE', 'FP', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000177119', + hgnc_symbol: 'ANO6', + brain_regions: ['DLPFC', 'FP', 'IFG', 'STG'], + }, + { + ensembl_gene_id: 'ENSG00000135363', + hgnc_symbol: 'LMO2', + brain_regions: ['DLPFC', 'FP', 'IFG', 'PHG'], + }, + { + ensembl_gene_id: 'ENSG00000018408', + hgnc_symbol: 'WWTR1', + brain_regions: ['DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000170989', + hgnc_symbol: 'S1PR1', + brain_regions: ['CBE', 'DLPFC', 'IFG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000141510', + hgnc_symbol: 'TP53', + brain_regions: ['DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000168899', + hgnc_symbol: 'VAMP5', + brain_regions: ['CBE', 'DLPFC', 'PHG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000117226', + hgnc_symbol: 'GBP3', + brain_regions: ['FP', 'IFG', 'PHG'], + }, + { + ensembl_gene_id: 'ENSG00000132561', + hgnc_symbol: 'MATN2', + brain_regions: ['CBE', 'DLPFC', 'IFG'], + }, + { + ensembl_gene_id: 'ENSG00000113140', + hgnc_symbol: 'SPARC', + brain_regions: ['CBE', 'STG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000111145', + hgnc_symbol: 'ELK3', + brain_regions: ['DLPFC', 'IFG', 'STG'], + }, + { + ensembl_gene_id: 'ENSG00000120278', + hgnc_symbol: 'PLEKHG1', + brain_regions: ['DLPFC', 'IFG', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000132688', + hgnc_symbol: 'NES', + brain_regions: ['DLPFC', 'IFG', 'PHG'], + }, + { + ensembl_gene_id: 'ENSG00000166340', + hgnc_symbol: 'TPP1', + brain_regions: ['CBE', 'DLPFC'], + }, + { + ensembl_gene_id: 'ENSG00000168309', + hgnc_symbol: 'FAM107A', + brain_regions: ['CBE', 'PHG'], + }, + { + ensembl_gene_id: 'ENSG00000172164', + hgnc_symbol: 'SNTB1', + brain_regions: ['CBE', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000169504', + hgnc_symbol: 'CLIC4', + brain_regions: ['DLPFC', 'FP'], + }, + { + ensembl_gene_id: 'ENSG00000131724', + hgnc_symbol: 'IL13RA1', + brain_regions: ['FP', 'TCX'], + }, + { + ensembl_gene_id: 'ENSG00000136754', + hgnc_symbol: 'ABI1', + brain_regions: ['CBE'], + }, + { + ensembl_gene_id: 'ENSG00000078295', + hgnc_symbol: 'ADCY2', + brain_regions: ['CBE'], + }, + ], + links: [ + { + source: 'ENSG00000147065', + target: 'ENSG00000196924', + source_hgnc_symbol: 'MSN', + target_hgnc_symbol: 'FLNA', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000147065', + target: 'ENSG00000131724', + source_hgnc_symbol: 'MSN', + target_hgnc_symbol: 'IL13RA1', + brain_regions: ['FP', 'TCX'], + }, + { + source: 'ENSG00000147065', + target: 'ENSG00000163191', + source_hgnc_symbol: 'MSN', + target_hgnc_symbol: 'S100A11', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000169504', + target: 'ENSG00000147065', + source_hgnc_symbol: 'CLIC4', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'FP'], + }, + { + source: 'ENSG00000155366', + target: 'ENSG00000147065', + source_hgnc_symbol: 'RHOC', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000132688', + target: 'ENSG00000147065', + source_hgnc_symbol: 'NES', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'IFG', 'PHG'], + }, + { + source: 'ENSG00000168899', + target: 'ENSG00000147065', + source_hgnc_symbol: 'VAMP5', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000120278', + target: 'ENSG00000147065', + source_hgnc_symbol: 'PLEKHG1', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'IFG', 'TCX'], + }, + { + source: 'ENSG00000111348', + target: 'ENSG00000147065', + source_hgnc_symbol: 'ARHGDIB', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000111145', + target: 'ENSG00000147065', + source_hgnc_symbol: 'ELK3', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'IFG', 'STG'], + }, + { + source: 'ENSG00000102265', + target: 'ENSG00000147065', + source_hgnc_symbol: 'TIMP1', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'IFG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000172164', + target: 'ENSG00000147065', + source_hgnc_symbol: 'SNTB1', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'TCX'], + }, + { + source: 'ENSG00000141510', + target: 'ENSG00000147065', + source_hgnc_symbol: 'TP53', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000147065', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000170989', + target: 'ENSG00000147065', + source_hgnc_symbol: 'S1PR1', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'IFG', 'TCX'], + }, + { + source: 'ENSG00000168309', + target: 'ENSG00000147065', + source_hgnc_symbol: 'FAM107A', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'PHG'], + }, + { + source: 'ENSG00000078295', + target: 'ENSG00000147065', + source_hgnc_symbol: 'ADCY2', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000113140', + target: 'ENSG00000147065', + source_hgnc_symbol: 'SPARC', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'STG', 'TCX'], + }, + { + source: 'ENSG00000137285', + target: 'ENSG00000147065', + source_hgnc_symbol: 'TUBB2B', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000132561', + target: 'ENSG00000147065', + source_hgnc_symbol: 'MATN2', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'IFG'], + }, + { + source: 'ENSG00000136754', + target: 'ENSG00000147065', + source_hgnc_symbol: 'ABI1', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000166340', + target: 'ENSG00000147065', + source_hgnc_symbol: 'TPP1', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC'], + }, + { + source: 'ENSG00000117226', + target: 'ENSG00000147065', + source_hgnc_symbol: 'GBP3', + target_hgnc_symbol: 'MSN', + brain_regions: ['FP', 'IFG', 'PHG'], + }, + { + source: 'ENSG00000018408', + target: 'ENSG00000147065', + source_hgnc_symbol: 'WWTR1', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000119408', + target: 'ENSG00000147065', + source_hgnc_symbol: 'NEK6', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000135363', + target: 'ENSG00000147065', + source_hgnc_symbol: 'LMO2', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'FP', 'IFG', 'PHG'], + }, + { + source: 'ENSG00000111321', + target: 'ENSG00000147065', + source_hgnc_symbol: 'LTBR', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000177119', + target: 'ENSG00000147065', + source_hgnc_symbol: 'ANO6', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'FP', 'IFG', 'STG'], + }, + { + source: 'ENSG00000134871', + target: 'ENSG00000147065', + source_hgnc_symbol: 'COL4A2', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'FP', 'IFG', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000168610', + target: 'ENSG00000147065', + source_hgnc_symbol: 'STAT3', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'FP', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000087086', + target: 'ENSG00000147065', + source_hgnc_symbol: 'FTL', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG'], + }, + { + source: 'ENSG00000101160', + target: 'ENSG00000147065', + source_hgnc_symbol: 'CTSZ', + target_hgnc_symbol: 'MSN', + brain_regions: ['DLPFC', 'FP', 'IFG', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000018408', + target: 'ENSG00000177119', + source_hgnc_symbol: 'WWTR1', + target_hgnc_symbol: 'ANO6', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000018408', + target: 'ENSG00000111145', + source_hgnc_symbol: 'WWTR1', + target_hgnc_symbol: 'ELK3', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000018408', + target: 'ENSG00000113140', + source_hgnc_symbol: 'WWTR1', + target_hgnc_symbol: 'SPARC', + brain_regions: ['TCX'], + }, + { + source: 'ENSG00000018408', + target: 'ENSG00000135046', + source_hgnc_symbol: 'WWTR1', + target_hgnc_symbol: 'ANXA1', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000018408', + target: 'ENSG00000119408', + source_hgnc_symbol: 'WWTR1', + target_hgnc_symbol: 'NEK6', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000087086', + target: 'ENSG00000196924', + source_hgnc_symbol: 'FTL', + target_hgnc_symbol: 'FLNA', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000101160', + target: 'ENSG00000163191', + source_hgnc_symbol: 'CTSZ', + target_hgnc_symbol: 'S100A11', + brain_regions: ['PHG'], + }, + { + source: 'ENSG00000102265', + target: 'ENSG00000196924', + source_hgnc_symbol: 'TIMP1', + target_hgnc_symbol: 'FLNA', + brain_regions: ['TCX'], + }, + { + source: 'ENSG00000111321', + target: 'ENSG00000168610', + source_hgnc_symbol: 'LTBR', + target_hgnc_symbol: 'STAT3', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000111321', + target: 'ENSG00000101160', + source_hgnc_symbol: 'LTBR', + target_hgnc_symbol: 'CTSZ', + brain_regions: ['PHG'], + }, + { + source: 'ENSG00000111348', + target: 'ENSG00000131724', + source_hgnc_symbol: 'ARHGDIB', + target_hgnc_symbol: 'IL13RA1', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000113140', + target: 'ENSG00000172164', + source_hgnc_symbol: 'SPARC', + target_hgnc_symbol: 'SNTB1', + brain_regions: ['TCX'], + }, + { + source: 'ENSG00000113140', + target: 'ENSG00000111145', + source_hgnc_symbol: 'SPARC', + target_hgnc_symbol: 'ELK3', + brain_regions: ['STG'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000141510', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'TP53', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000196924', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'FLNA', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000018408', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'WWTR1', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000177119', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'ANO6', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000134531', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'EMP1', + brain_regions: ['DLPFC', 'FP', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000120278', + target: 'ENSG00000134531', + source_hgnc_symbol: 'PLEKHG1', + target_hgnc_symbol: 'EMP1', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000132561', + target: 'ENSG00000177119', + source_hgnc_symbol: 'MATN2', + target_hgnc_symbol: 'ANO6', + brain_regions: ['IFG'], + }, + { + source: 'ENSG00000132688', + target: 'ENSG00000196924', + source_hgnc_symbol: 'NES', + target_hgnc_symbol: 'FLNA', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000132688', + target: 'ENSG00000018408', + source_hgnc_symbol: 'NES', + target_hgnc_symbol: 'WWTR1', + brain_regions: ['PHG'], + }, + { + source: 'ENSG00000132688', + target: 'ENSG00000135046', + source_hgnc_symbol: 'NES', + target_hgnc_symbol: 'ANXA1', + brain_regions: ['IFG'], + }, + { + source: 'ENSG00000134531', + target: 'ENSG00000177119', + source_hgnc_symbol: 'EMP1', + target_hgnc_symbol: 'ANO6', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000135046', + target: 'ENSG00000102265', + source_hgnc_symbol: 'ANXA1', + target_hgnc_symbol: 'TIMP1', + brain_regions: ['STG'], + }, + { + source: 'ENSG00000135363', + target: 'ENSG00000111145', + source_hgnc_symbol: 'LMO2', + target_hgnc_symbol: 'ELK3', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000135363', + target: 'ENSG00000131724', + source_hgnc_symbol: 'LMO2', + target_hgnc_symbol: 'IL13RA1', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000135363', + target: 'ENSG00000101160', + source_hgnc_symbol: 'LMO2', + target_hgnc_symbol: 'CTSZ', + brain_regions: ['PHG'], + }, + { + source: 'ENSG00000137285', + target: 'ENSG00000087086', + source_hgnc_symbol: 'TUBB2B', + target_hgnc_symbol: 'FTL', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000137285', + target: 'ENSG00000166340', + source_hgnc_symbol: 'TUBB2B', + target_hgnc_symbol: 'TPP1', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000155366', + target: 'ENSG00000018408', + source_hgnc_symbol: 'RHOC', + target_hgnc_symbol: 'WWTR1', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000163191', + target: 'ENSG00000111321', + source_hgnc_symbol: 'S100A11', + target_hgnc_symbol: 'LTBR', + brain_regions: ['TCX'], + }, + { + source: 'ENSG00000163191', + target: 'ENSG00000135046', + source_hgnc_symbol: 'S100A11', + target_hgnc_symbol: 'ANXA1', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000166340', + target: 'ENSG00000087086', + source_hgnc_symbol: 'TPP1', + target_hgnc_symbol: 'FTL', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000168309', + target: 'ENSG00000087086', + source_hgnc_symbol: 'FAM107A', + target_hgnc_symbol: 'FTL', + brain_regions: ['PHG'], + }, + { + source: 'ENSG00000168899', + target: 'ENSG00000018408', + source_hgnc_symbol: 'VAMP5', + target_hgnc_symbol: 'WWTR1', + brain_regions: ['TCX'], + }, + { + source: 'ENSG00000169504', + target: 'ENSG00000132561', + source_hgnc_symbol: 'CLIC4', + target_hgnc_symbol: 'MATN2', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000169504', + target: 'ENSG00000102265', + source_hgnc_symbol: 'CLIC4', + target_hgnc_symbol: 'TIMP1', + brain_regions: ['DLPFC'], + }, + { + source: 'ENSG00000169504', + target: 'ENSG00000117519', + source_hgnc_symbol: 'CLIC4', + target_hgnc_symbol: 'CNN3', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000170989', + target: 'ENSG00000113140', + source_hgnc_symbol: 'S1PR1', + target_hgnc_symbol: 'SPARC', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000170989', + target: 'ENSG00000137285', + source_hgnc_symbol: 'S1PR1', + target_hgnc_symbol: 'TUBB2B', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000170989', + target: 'ENSG00000136754', + source_hgnc_symbol: 'S1PR1', + target_hgnc_symbol: 'ABI1', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000170989', + target: 'ENSG00000166340', + source_hgnc_symbol: 'S1PR1', + target_hgnc_symbol: 'TPP1', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000172164', + target: 'ENSG00000119408', + source_hgnc_symbol: 'SNTB1', + target_hgnc_symbol: 'NEK6', + brain_regions: ['CBE'], + }, + { + source: 'ENSG00000174021', + target: 'ENSG00000155366', + source_hgnc_symbol: 'GNG5', + target_hgnc_symbol: 'RHOC', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG'], + }, + { + source: 'ENSG00000174021', + target: 'ENSG00000111348', + source_hgnc_symbol: 'GNG5', + target_hgnc_symbol: 'ARHGDIB', + brain_regions: ['FP'], + }, + { + source: 'ENSG00000174021', + target: 'ENSG00000168899', + source_hgnc_symbol: 'GNG5', + target_hgnc_symbol: 'VAMP5', + brain_regions: ['PHG'], + }, + { + source: 'ENSG00000174021', + target: 'ENSG00000135363', + source_hgnc_symbol: 'GNG5', + target_hgnc_symbol: 'LMO2', + brain_regions: ['IFG'], + }, + { + source: 'ENSG00000177119', + target: 'ENSG00000111145', + source_hgnc_symbol: 'ANO6', + target_hgnc_symbol: 'ELK3', + brain_regions: ['IFG'], + }, + { + source: 'ENSG00000174021', + target: 'ENSG00000147065', + source_hgnc_symbol: 'GNG5', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'FP'], + }, + { + source: 'ENSG00000018408', + target: 'ENSG00000134531', + source_hgnc_symbol: 'WWTR1', + target_hgnc_symbol: 'EMP1', + brain_regions: ['DLPFC', 'FP'], + }, + { + source: 'ENSG00000111321', + target: 'ENSG00000141510', + source_hgnc_symbol: 'LTBR', + target_hgnc_symbol: 'TP53', + brain_regions: ['DLPFC', 'FP'], + }, + { + source: 'ENSG00000117226', + target: 'ENSG00000135046', + source_hgnc_symbol: 'GBP3', + target_hgnc_symbol: 'ANXA1', + brain_regions: ['IFG', 'PHG'], + }, + { + source: 'ENSG00000135046', + target: 'ENSG00000134531', + source_hgnc_symbol: 'ANXA1', + target_hgnc_symbol: 'EMP1', + brain_regions: ['FP', 'TCX'], + }, + { + source: 'ENSG00000155366', + target: 'ENSG00000137285', + source_hgnc_symbol: 'RHOC', + target_hgnc_symbol: 'TUBB2B', + brain_regions: ['PHG', 'TCX'], + }, + { + source: 'ENSG00000155366', + target: 'ENSG00000177119', + source_hgnc_symbol: 'RHOC', + target_hgnc_symbol: 'ANO6', + brain_regions: ['FP', 'STG'], + }, + { + source: 'ENSG00000163191', + target: 'ENSG00000102265', + source_hgnc_symbol: 'S100A11', + target_hgnc_symbol: 'TIMP1', + brain_regions: ['CBE', 'DLPFC'], + }, + { + source: 'ENSG00000168899', + target: 'ENSG00000087086', + source_hgnc_symbol: 'VAMP5', + target_hgnc_symbol: 'FTL', + brain_regions: ['CBE', 'DLPFC'], + }, + { + source: 'ENSG00000169504', + target: 'ENSG00000177119', + source_hgnc_symbol: 'CLIC4', + target_hgnc_symbol: 'ANO6', + brain_regions: ['DLPFC', 'FP'], + }, + { + source: 'ENSG00000135046', + target: 'ENSG00000147065', + source_hgnc_symbol: 'ANXA1', + target_hgnc_symbol: 'MSN', + brain_regions: ['CBE', 'DLPFC', 'TCX'], + }, + { + source: 'ENSG00000134871', + target: 'ENSG00000102265', + source_hgnc_symbol: 'COL4A2', + target_hgnc_symbol: 'TIMP1', + brain_regions: ['DLPFC', 'IFG', 'TCX'], + }, + { + source: 'ENSG00000134871', + target: 'ENSG00000196924', + source_hgnc_symbol: 'COL4A2', + target_hgnc_symbol: 'FLNA', + brain_regions: ['FP', 'IFG', 'PHG'], + }, + { + source: 'ENSG00000141510', + target: 'ENSG00000168610', + source_hgnc_symbol: 'TP53', + target_hgnc_symbol: 'STAT3', + brain_regions: ['FP', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000155366', + target: 'ENSG00000168899', + source_hgnc_symbol: 'RHOC', + target_hgnc_symbol: 'VAMP5', + brain_regions: ['CBE', 'DLPFC', 'TCX'], + }, + { + source: 'ENSG00000170989', + target: 'ENSG00000120278', + source_hgnc_symbol: 'S1PR1', + target_hgnc_symbol: 'PLEKHG1', + brain_regions: ['DLPFC', 'IFG', 'TCX'], + }, + { + source: 'ENSG00000134531', + target: 'ENSG00000147065', + source_hgnc_symbol: 'EMP1', + target_hgnc_symbol: 'MSN', + brain_regions: ['FP', 'PHG', 'STG', 'TCX'], + }, + { + source: 'ENSG00000111348', + target: 'ENSG00000101160', + source_hgnc_symbol: 'ARHGDIB', + target_hgnc_symbol: 'CTSZ', + brain_regions: ['DLPFC', 'IFG', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000137285', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'TUBB2B', + brain_regions: ['DLPFC', 'FP', 'IFG', 'PHG', 'STG'], + }, + { + source: 'ENSG00000117519', + target: 'ENSG00000119408', + source_hgnc_symbol: 'CNN3', + target_hgnc_symbol: 'NEK6', + brain_regions: ['CBE', 'DLPFC', 'FP', 'PHG', 'TCX'], + }, + { + source: 'ENSG00000111348', + target: 'ENSG00000163191', + source_hgnc_symbol: 'ARHGDIB', + target_hgnc_symbol: 'S100A11', + brain_regions: ['CBE', 'DLPFC', 'FP', 'IFG', 'PHG', 'STG', 'TCX'], + }, + ], + min: 0, + max: 7, + }, + bio_domains: { + ensembl_gene_id: "ENSG00000147065", + gene_biodomains: [ + { + biodomain: "Structural Stabilization", + go_terms: [ + "cytoskeleton", + "focal adhesion", + "cytoskeleton organization", + "adherens junction", + "structural constituent of cytoskeleton", + "cell adhesion molecule binding" + ], + n_biodomain_terms: 466, + n_gene_biodomain_terms: 6, + pct_linking_terms: 40 + }, + { + biodomain: "Immune Response", + go_terms: [ + "leukocyte migration", + "T cell proliferation", + "immunological synapse formation", + "T cell migration", + "leukocyte cell-cell adhesion" + ], + n_biodomain_terms: 852, + n_gene_biodomain_terms: 5, + pct_linking_terms: 33.33 + }, + { + biodomain: "Lipid Metabolism", + go_terms: [ + "basolateral plasma membrane", + "cellular response to testosterone stimulus" + ], + n_biodomain_terms: 827, + n_gene_biodomain_terms: 2, + pct_linking_terms: 13.33 + }, + { + biodomain: "Synapse", + go_terms: [ + "signaling receptor binding" + ], + n_biodomain_terms: 891, + n_gene_biodomain_terms: 1, + pct_linking_terms: 6.67 + }, + { + biodomain: "Vasculature", + go_terms: [ + "blood microparticle" + ], + n_biodomain_terms: 315, + n_gene_biodomain_terms: 1, + pct_linking_terms: 6.67 + }, + ] + }, + is_adi: false, + is_tep: true, + resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22MSN%22%5D%7D%5D%7D', + ensembl_info: [ + ] +} + export const geneMock1: Gene = { _id: '628ea1be0e8d04279fdbaa26', ensembl_gene_id: 'ENSG00000147065', @@ -2934,7 +3935,14 @@ export const geneMock1: Gene = { }, is_adi: false, is_tep: true, - resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22MSN%22%5D%7D%5D%7D' + resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22MSN%22%5D%7D%5D%7D', + ensembl_info: [ + { + ensembl_release: 84, + ensembl_possible_replacements: ['ENSG00000283172'], + ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794' + } + ] }; export const geneMock2: Gene = { @@ -3121,7 +4129,14 @@ export const geneMock2: Gene = { total_nominations: 3, is_adi: false, is_tep: true, - resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22PLEC%22%5D%7D%5D%7D' + resource_url: 'https://adknowledgeportal.synapse.org/Explore/Target%20Enabling%20Resources?QueryWrapper0=%7B%22sql%22%3A%22select%20*%20from%20syn26146692%20WHERE%20%60isPublic%60%20%3D%20true%22%2C%22limit%22%3A25%2C%22offset%22%3A0%2C%22selectedFacets%22%3A%5B%7B%22concreteType%22%3A%22org.sagebionetworks.repo.model.table.FacetColumnValuesRequest%22%2C%22columnName%22%3A%22target%22%2C%22facetValues%22%3A%5B%22PLEC%22%5D%7D%5D%7D', + ensembl_info: [ + { + ensembl_release: 84, + ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'], + ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794' + } + ] }; export const geneMock3: Gene = { @@ -3243,7 +4258,14 @@ export const geneMock3: Gene = { total_nominations: null, is_adi: false, is_tep: true, - resource_url: null + resource_url: null, + ensembl_info: [ + { + ensembl_release: 84, + ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'], + ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794' + } + ] }; export const gctGeneMock1: GCTGene = { @@ -3421,7 +4443,14 @@ export const nominatedGeneMock1: Gene = { total_nominations: 4, is_adi: false, is_tep: false, - resource_url: null + resource_url: null, + ensembl_info: [ + { + ensembl_release: 84, + ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'], + ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794' + } + ] } as Gene; export const noHGNCgeneMock: Gene = { @@ -3518,5 +4547,12 @@ export const noHGNCgeneMock: Gene = { total_nominations: 4, is_adi: false, is_tep: false, - resource_url: null + resource_url: null, + ensembl_info: [ + { + ensembl_release: 84, + ensembl_possible_replacements: ['ENSG00000283172, ENSG00000283172'], + ensembl_permalink: 'https://may2015.archive.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000264794' + } + ] } as Gene; diff --git a/src/server/api.ts b/src/server/api.ts index d7ee9643..468f58f7 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -69,7 +69,7 @@ if ( ], { region: 'us-east-1' } ); - + if (results && results.Parameters) { database.url = 'mongodb://' + diff --git a/src/server/models/genes.ts b/src/server/models/genes.ts index 94465fca..ac077977 100644 --- a/src/server/models/genes.ts +++ b/src/server/models/genes.ts @@ -12,6 +12,7 @@ import { TargetNomination, Druggability, } from '../../app/models'; +import { EnsemblInfo } from '../../app/models/EnsemblInfo'; export { Gene } from '../../app/models'; // -------------------------------------------------------------------------- // @@ -42,6 +43,12 @@ const MedianExpressionSchema = new Schema({ tissue: { type: String, required: true }, }); +const EnsemblInfoSchema = new Schema({ + ensembl_release: { type: Number, required: true }, + ensembl_possible_replacements: { type: [String], required: true }, + ensembl_permalink: { type: String, required: true } +}); + const DruggabilitySchema = new Schema({ sm_druggability_bucket: { type: Number, required: true }, safety_bucket: { type: Number, required: true }, @@ -70,6 +77,7 @@ const GeneSchema = new Schema( median_expression: { type: [MedianExpressionSchema], required: true }, druggability: { type: [DruggabilitySchema], required: true }, total_nominations: { type: Number, required: true }, + ensembl_info: { type: [EnsemblInfoSchema], required: true } }, { collection: 'geneinfo' } ); diff --git a/tests/nominated-targets.spec.ts.disabled b/tests/nominated-targets.spec.ts similarity index 100% rename from tests/nominated-targets.spec.ts.disabled rename to tests/nominated-targets.spec.ts diff --git a/tests/similar-genes.spec.ts.disabled b/tests/similar-genes.spec.ts similarity index 100% rename from tests/similar-genes.spec.ts.disabled rename to tests/similar-genes.spec.ts