Comments (1)
Yep, I agree that in heatmaps positive values are usually assigned red, and negative values blue.
As you likely will know, since September the default colors have been changed:
(2023-09-13, Wed): change default color: from c("red", "blue") to c("#e06663", "#327eba")
Somehow this change apparently also resulted in reversing the order of the Fold Change
in the legend of the heatplot
(i.e. negative values [-2] are now at the top, positive values [4] at the bottom). This is opposite on how it used to be... For that see e.g. Fig 15.6 here: https://yulab-smu.top/biomedical-knowledge-mining-book/enrichplot.html#heatmap-like-functional-classification
@huerqiang ; @GuangchuangYu : would you mind having a look at this? So that by default negative values in the heatplot
are blue, and positive values red again? So the old behavior is restored?
For now a quick fix for the heatplot
colors could be that manually the colors are reversed before generating the heatplot
:
options(enrichplot.colours = c("#327eba","#e06663")) ##these are the new colors
> library(DOSE)
> library(enrichplot)
>
> data(geneList)
> de <- names(geneList)[abs(geneList) > 2]
> edo <- enrichDGN(de)
> ## convert gene ID to Symbol
> edox <- setReadable(edo, 'org.Hs.eg.db', 'ENTREZID')
>
>
> ## using the new default pastel colors
> p1 <- heatplot(edox, showCategory=5)
> p2 <- heatplot(edox, foldChange=geneList, showCategory=5)
> cowplot::plot_grid(p1, p2, ncol=1, labels=LETTERS[1:2])
>
>
> ## apply fix; reverse colors
> options(enrichplot.colours = c("#327eba","#e06663"))
> p3 <- heatplot(edox, showCategory=5)
> p4 <- heatplot(edox, foldChange=geneList, showCategory=5)
> cowplot::plot_grid(p3, p4, ncol=1, labels=LETTERS[1:2])
>
>
Finally, please note that the heatplot
is a ggplot2
, so if assigned to an object you can easily further fine-tune the plot. See for example here to get some inspiration: #667 (comment)
from clusterprofiler.
Related Issues (20)
- something wrong of setReadable HOT 6
- Error in testForValidKeytype(x, keytype) : Invalid keytype: GOALL. Please use the keytypes method to see a listing of valid arguments. HOT 1
- gson 格式在最新版 enrichKEGG中出错 HOT 4
- ont = "BP" in enricher () function HOT 1
- OrgDb for maize HOT 1
- How to convert geneID from the enrichKEGG output from entrez to gene symbol? HOT 2
- enrichKEGG "No gene can be mapped" HOT 2
- All p-values are equal to 1 HOT 1
- compareCluster - Error in check_gene_id - but work perfectly with standar procedure (not using compareCluster) HOT 1
- How do I change the width of each coloum in the heatmap in the treeplot?
- Perform gseaplot2 using seurat DEG output.
- gseKEGG using KEGG database error (cannot open URL 'https://rest.kegg.jp/conv/ncbi=geneid/mmu': HTTP status was '400 Bad Request') HOT 1
- Different behaviour of gseGO upon setting nPerm=1000 HOT 2
- Upsetplot is cropped HOT 4
- A strange non-given GO comment appears HOT 8
- Retrieve the set of genes with assigned GO HOT 1
- Error with Enricher function HOT 1
- FeatureRequest: color category and gene labels differently in `cnetplot`
- User Manual Has Minimal Discussion of Universe Choices
- gseGO Produces Results Table with Zero Rows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clusterprofiler.