diff --git a/package-lock.json b/package-lock.json index 8e88c671f..1f46ff90c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11634,9 +11634,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "dev": true, "funding": [ { @@ -31367,9 +31367,9 @@ } }, "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "dev": true }, "for-each": { diff --git a/src/app/core/pages/home/home.component.html b/src/app/core/pages/home/home.component.html index 8eb2d948b..d3063a77c 100644 --- a/src/app/core/pages/home/home.component.html +++ b/src/app/core/pages/home/home.component.html @@ -89,9 +89,10 @@

- Agora hosts evidence for whether or not genes are associated with - Alzheimer's disease (AD). Agora also contains a list of over 600 - nascent drug targets for AD that were nominated by AD researchers. + Agora hosts high-dimensional human transcriptomic, proteomic, and metabolomic evidence for whether or not genes are associated with Alzheimer’s disease (AD). + Agora also contains a list of over 900 nascent drug targets for AD that were nominated by AD researchers from the National Institute on Aging's Accelerating Medicines Partnership in Alzheimer's Disease + (AMP-AD) consortium and Target Enablement to Accelerate Therapy Development for Alzheimer's Disease + (TREAT-AD) centers, as well as other research teams.

Gene Comparison

Explore differential RNA and protein expression results for 20k+ - genes. Build custom result sets by sorting, filtering, and + human genes. Build custom result sets by sorting, filtering, and searching for genes of particular interest.

@@ -266,7 +267,7 @@

Gene Comparison

Gene Search

- Find one of 20K+ genes in the Agora database and get detailed + Search for genes in the Agora database to get detailed information about Experimental Evidence, Nominations, and Association with Alzheimer's Disease.

@@ -279,7 +280,7 @@

Gene Search

Nominated Targets

Browse genes that research teams have nominated as potential new - targets for Alzheimer's Disease treatment or prevention. + therapeutic targets for Alzheimer's Disease treatment or prevention.

diff --git a/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.spec.ts b/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.spec.ts index 6391565b2..29d8f2526 100644 --- a/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.spec.ts +++ b/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.spec.ts @@ -36,4 +36,24 @@ describe('Component: Gene Proteomics', () => { it('should create', () => { expect(component).toBeTruthy(); }); + + it('should create the right tooltip text', () => { + const item = + { + '_id': '65a5f61467fa5462e23fe5eb', + 'uniqid': 'PLEC|Q15149', + 'hgnc_symbol': 'PLEC', + 'uniprotid': 'Q15149', + 'ensembl_gene_id': 'ENSG00000178209', + 'tissue': 'DLPFC', + 'log2_fc': 0.111785229513828, + 'ci_upr': 0.147173483154117, + 'ci_lwr': 0.0763969758735386, + 'pval': 4.54382282575789e-9, + 'cor_pval': 0.00000174186460237858 + }; + const tooltipText = component.getTooltipText(item); + const expected = 'PLEC is significantly differentially expressed in DLPFC with a log fold change value of 0.112 and an adjusted p-value of 0.00000174.'; + expect(tooltipText).toBe(expected); + }); }); diff --git a/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.ts b/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.ts index 72a619af8..b4e08f3bd 100644 --- a/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.ts +++ b/src/app/features/genes/components/gene-evidence-proteomics/gene-evidence-proteomics.component.ts @@ -84,6 +84,32 @@ export class GeneEvidenceProteomicsComponent { this.initTMT(); } + processDifferentialExpressionData(item: any, data: any, dataYAxisMin: number | undefined, dataYAxisMax: number | undefined, proteomicData: any) { + const yAxisMin = item.log2_fc < data.min ? item.log2_fc : data.min; + const yAxisMax = item.log2_fc > data.max ? item.log2_fc : data.max; + + if (dataYAxisMin === undefined || yAxisMin < dataYAxisMin) { + dataYAxisMin = yAxisMin; + } + + if (dataYAxisMax == undefined || yAxisMax > dataYAxisMax) { + dataYAxisMax = yAxisMax; + } + + proteomicData.push({ + key: data.tissue, + value: [data.min, data.median, data.max], + circle: { + value: item.log2_fc, + tooltip: this.getTooltipText(item) + }, + quartiles: + data.first_quartile > data.third_quartile + ? [data.third_quartile, data.median, data.first_quartile] + : [data.first_quartile, data.median, data.third_quartile], + }); + } + initSRM() { this.geneService.getDistribution().subscribe((data: any) => { const distribution = data.proteomics_SRM; @@ -93,7 +119,7 @@ export class GeneEvidenceProteomicsComponent { return item.uniprotid === this.selectedUniProtId; }) || []; - const SRMData: any = []; + const proteomicData: any = []; differentialExpression.forEach((item: any) => { const data: any = distribution.find((d: any) => { @@ -101,39 +127,7 @@ export class GeneEvidenceProteomicsComponent { }); if (data) { - const yAxisMin = item.log2_fc < data.min ? item.log2_fc : data.min; - const yAxisMax = item.log2_fc > data.max ? item.log2_fc : data.max; - - if (this.SRMYAxisMin == undefined || yAxisMin < this.SRMYAxisMin) { - this.SRMYAxisMin = yAxisMin; - } - - if (this.SRMYAxisMax == undefined || yAxisMax > this.SRMYAxisMax) { - this.SRMYAxisMax = yAxisMax; - } - - SRMData.push({ - key: data.tissue, - value: [data.min, data.median, data.max], - circle: { - value: item.log2_fc, - tooltip: - (item.hgnc_symbol || item.ensembl_gene_id) + - ' is ' + - (item.cor_pval <= 0.05 ? ' ' : 'not ') + - 'significantly differentially expressed in ' + - item.tissue + - ' with a log fold change value of ' + - this.helperService.getSignificantFigures(item.log2_fc, 3) + - ' and an adjusted p-value of ' + - this.helperService.getSignificantFigures(item.cor_pval, 3) + - '.', - }, - quartiles: - data.first_quartile > data.third_quartile - ? [data.third_quartile, data.median, data.first_quartile] - : [data.first_quartile, data.median, data.third_quartile], - }); + this.processDifferentialExpressionData(item, data, this.SRMYAxisMin, this.SRMYAxisMax, proteomicData); } }); @@ -145,7 +139,7 @@ export class GeneEvidenceProteomicsComponent { this.SRMYAxisMax += 0.2; } - this.SRMData = SRMData; + this.SRMData = proteomicData; }); } @@ -158,7 +152,7 @@ export class GeneEvidenceProteomicsComponent { return item.uniprotid === this.selectedUniProtId; }) || []; - const LFQData: any = []; + const proteomicData: any = []; differentialExpression.forEach((item: any) => { const data: any = distribution.find((d: any) => { @@ -166,39 +160,7 @@ export class GeneEvidenceProteomicsComponent { }); if (data) { - const yAxisMin = item.log2_fc < data.min ? item.log2_fc : data.min; - const yAxisMax = item.log2_fc > data.max ? item.log2_fc : data.max; - - if (this.LFQYAxisMin == undefined || yAxisMin < this.LFQYAxisMin) { - this.LFQYAxisMin = yAxisMin; - } - - if (this.LFQYAxisMax == undefined || yAxisMax > this.LFQYAxisMax) { - this.LFQYAxisMax = yAxisMax; - } - - LFQData.push({ - key: data.tissue, - value: [data.min, data.median, data.max], - circle: { - value: item.log2_fc, - tooltip: - (item.hgnc_symbol || item.ensembl_gene_id) + - ' is ' + - (item.cor_pval <= 0.05 ? ' ' : 'not ') + - 'significantly differentially expressed in ' + - item.tissue + - ' with a log fold change value of ' + - this.helperService.getSignificantFigures(item.log2_fc, 3) + - ' and an adjusted p-value of ' + - this.helperService.getSignificantFigures(item.cor_pval, 3) + - '.', - }, - quartiles: - data.first_quartile > data.third_quartile - ? [data.third_quartile, data.median, data.first_quartile] - : [data.first_quartile, data.median, data.third_quartile], - }); + this.processDifferentialExpressionData(item, data, this.LFQYAxisMin, this.LFQYAxisMax, proteomicData); } }); @@ -210,7 +172,7 @@ export class GeneEvidenceProteomicsComponent { this.LFQYAxisMax += 0.2; } - this.LFQData = LFQData; + this.LFQData = proteomicData; }); } @@ -223,7 +185,7 @@ export class GeneEvidenceProteomicsComponent { return item.uniprotid === this.selectedUniProtId; }) || []; - const TMTData: any = []; + const proteomicData: any = []; differentialExpression.forEach((item: any) => { const data: any = distribution.find((d: any) => { @@ -231,39 +193,7 @@ export class GeneEvidenceProteomicsComponent { }); if (data) { - const yAxisMin = item.log2_fc < data.min ? item.log2_fc : data.min; - const yAxisMax = item.log2_fc > data.max ? item.log2_fc : data.max; - - if (this.TMTYAxisMin == undefined || yAxisMin < this.TMTYAxisMin) { - this.TMTYAxisMin = yAxisMin; - } - - if (this.TMTYAxisMax == undefined || yAxisMax > this.TMTYAxisMax) { - this.TMTYAxisMax = yAxisMax; - } - - TMTData.push({ - key: data.tissue, - value: [data.min, data.median, data.max], - circle: { - value: item.log2_fc, - tooltip: - (item.hgnc_symbol || item.ensembl_gene_id) + - ' is ' + - (item.cor_pval <= 0.05 ? ' ' : 'not ') + - 'significantly differentially expressed in ' + - item.tissue + - ' with a log fold change value of ' + - this.helperService.getSignificantFigures(item.log2_fc, 3) + - ' and an adjusted p-value of ' + - this.helperService.getSignificantFigures(item.cor_pval, 3) + - '.', - }, - quartiles: - data.first_quartile > data.third_quartile - ? [data.third_quartile, data.median, data.first_quartile] - : [data.first_quartile, data.median, data.third_quartile], - }); + this.processDifferentialExpressionData(item, data, this.TMTYAxisMin, this.TMTYAxisMax, proteomicData); } }); @@ -275,7 +205,7 @@ export class GeneEvidenceProteomicsComponent { this.TMTYAxisMax += 0.2; } - this.TMTData = TMTData; + this.TMTData = proteomicData; }); } @@ -287,4 +217,9 @@ export class GeneEvidenceProteomicsComponent { this.initLFQ(); this.initTMT(); } + + getTooltipText(item: any) { + const tooltipText = `${ item.hgnc_symbol || item.ensembl_gene_id } is${ item.cor_pval <= 0.05 ? '' : ' not' } significantly differentially expressed in ${ item.tissue } with a log fold change value of ${ this.helperService.getSignificantFigures(item.log2_fc, 3) } and an adjusted p-value of ${ this.helperService.getSignificantFigures(item.cor_pval, 3) }.`; + return tooltipText; + } }