Skip to content

Commit

Permalink
Merge branch 'develop' into AG-1221-add-srm-evidence-to-gct-proteomics
Browse files Browse the repository at this point in the history
  • Loading branch information
sagely1 committed Jan 23, 2024
2 parents 52b7db8 + 9672a3d commit 4292805
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 117 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions src/app/core/pages/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ <h1 class="home-heading">
</h1>
</div>
<p class="description mb-lg">
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
(<a class="link" href="https://www.nia.nih.gov/research/amp-ad" target="_blank">AMP-AD</a>) consortium and Target Enablement to Accelerate Therapy Development for Alzheimer's Disease
(<a class="link" href="https://treatad.org/" target="_blank">TREAT-AD</a>) centers, as well as other research teams.
<a
class="link"
href="https://help.adknowledgeportal.org/apd/Agora-Resources.2646671361.html"
Expand All @@ -108,7 +109,7 @@ <h1 class="home-heading">
<h2>Gene Comparison</h2>
<p>
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.
</p>
</div>
Expand Down Expand Up @@ -266,7 +267,7 @@ <h2>Gene Comparison</h2>
<div>
<h2>Gene Search</h2>
<p>
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.
</p>
Expand All @@ -279,7 +280,7 @@ <h2>Gene Search</h2>
<h2>Nominated Targets</h2>
<p>
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.
</p>
</div>
<div class="icon-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -93,47 +119,15 @@ 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) => {
return d.tissue === item.tissue;
});

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);
}
});

Expand All @@ -145,7 +139,7 @@ export class GeneEvidenceProteomicsComponent {
this.SRMYAxisMax += 0.2;
}

this.SRMData = SRMData;
this.SRMData = proteomicData;
});
}

Expand All @@ -158,47 +152,15 @@ 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) => {
return d.tissue === item.tissue;
});

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);
}
});

Expand All @@ -210,7 +172,7 @@ export class GeneEvidenceProteomicsComponent {
this.LFQYAxisMax += 0.2;
}

this.LFQData = LFQData;
this.LFQData = proteomicData;
});
}

Expand All @@ -223,47 +185,15 @@ 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) => {
return d.tissue === item.tissue;
});

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);
}
});

Expand All @@ -275,7 +205,7 @@ export class GeneEvidenceProteomicsComponent {
this.TMTYAxisMax += 0.2;
}

this.TMTData = TMTData;
this.TMTData = proteomicData;
});
}

Expand All @@ -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;
}
}

0 comments on commit 4292805

Please sign in to comment.