cytoscape / enrichment-map-webapp

MIT License
6 stars 0 forks source link

Describe what the gene scores are #89

Closed maxkfranz closed 1 year ago

maxkfranz commented 1 year ago

Description of new feature

Motivation for new feature

Some users really want to be sure about this.

maxkfranz commented 1 year ago

The tooltip might be interesting also for the edge cases where the score is harder to read. The tooltip could read something like:

Metric X: 1.23

mikekucera commented 1 year ago

FGSEA paper: https://www.frontiersin.org/articles/10.3389/fgene.2021.577623/full EM Protocol: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6607905/

mikekucera commented 1 year ago

The ranks represent "differential gene expression". They give each gene a value based on if it was more expressed (up-regulated, positive) or less expressed (down-regulated, negative) between the two experiments that are being compared. The GSEA algorithm then uses that list, and a database of gene sets, to determine which gene sets are overall more or less expressed (or enriched?). So if a gene set contains a lot of the up-regulated genes then the gene set likely gets a high enrichment score (NES stands for normalized enrichment score, I'm not sure how the normalization works).

We also compress clusters of similar gene sets into a "compound" node and take the average of the NES values. I think similar gene sets will naturally have similar NES values, so I think taking the average is safe.

mikekucera commented 1 year ago

I think we should consider having a separate FAQ/Wiki page that describes how the application works and what the numbers mean, and just link out to it. That way it can contain as much information as necessary without cluttering the app UI, and we can update it without having to update the application itself. This GeneMANIA help site is an example: http://pages.genemania.org/help/

maxkfranz commented 1 year ago

We could use a markdown file in the repo or a github wiki to start

maxkfranz commented 1 year ago

How about this for now?

Tooltip on hover of gene score bar:

Differential gene expression: 1.23 (up-regulated)

maxkfranz commented 1 year ago

Tooltip: 'Differential gene expression: +1.23 (up regulated)'

Later: tap on the bar when it's already open then it shows the tooltip

mikekucera commented 1 year ago

The EnrichmentMap protocol paper describes the ranks like this...

(iii) effect size and direction of expression change so that upregulated genes are positive and at the top of the list and downregulated genes are negative and at the bottom of the list, often expressed as log-transformed fold-change. The gene list is then ranked by one or more of these values (e.g., —log10 P value multiplied by the sign of log-transformed fold-change)

This is indeed what we are doing in the R code...

ranks = sign(table_res$table$logFC) * -log10(table_res$table$PValue)

So maybe the tooltip could say something like "rank represents differential gene expression, expressed as —log10 pvalue multiplied by sign of log-transformed fold-change". Or maybe that's too complicated I don't know.

chrtannus commented 1 year ago

The tooltip so far:

Desktop:

rank-tooltip-desktop

Mobile:

rank-tooltip-mobile