Package: clusterProfiler by Guangchuang Yu
Let start with the example code (just the same as from the vignette):
library(clusterProfiler) library(enrichplot) # basic analysis data(geneList, package="DOSE") kegg <- gseKEGG(geneList = geneList, organism = 'hsa') # plotting cnetplot(kegg, categorySize="pvalue", foldChange=geneList)
I want to change two things in this cnetplot
- Exclude pathways in the graph
- Providing gene names instead of the IDs
1. Using the example:
require(dplyr) head(kegg@result) %>% select(Description, setSize) Description setSize hsa04510 Focal adhesion 188 hsa00982 Drug metabolism - cytochrome P450 49 hsa03050 Proteasome 42 hsa03030 DNA replication 33 hsa05340 Primary immunodeficiency 34 hsa04151 PI3K-Akt signaling pathway 320
Let's say I do not want the genes for the Focal adhesion
in the cnet graph, how can this be accomplished.
2. using the example
Instead of the ids (such as 6891
) I want to show the gene names which I provide myself (or maybe this can be done automatically)
Dear Guangchuang Yu,
Regarding question 1:
The version I currently have is
enrichplot_1.1.1.001
, which is >=1.0.1 as recommended by you. However when I pass a vector of pathway names to thecnetplot
command ( like sox <- cnetplot(kegg, showCategory = kegg$Description[-2])
) it will give this error:Can't figure out what I'm doing wrong here.
Regarding question 2:
After re-reading this question I think I wasn't that clear with what I mean. I love that function, however what I meant is that I could pass this to
cnetplot
. Of course I could convert the ids to the gene names before calling thegseKEGG
function, but this will probably interfere with mapping. Therefore, I want to be able to pass the gene names tocnetplot
pls use enrichplot v >= 1.0.2 or v >= 1.1.2, which address the issue you reported.
you misunderstand how setReadable works.
1. Thankyou! that version seems to work fine
2. The setReadable will of course only work whenever a db is available for the species in question, this is not the case for me. Therefore I mentioned
gene names which I provide myself
in my question I looked at the code of and thought I could easily mimic the setReadable function like so:However this will still only show the ids (and loses coloring in the network), instead the names I provided in the
gene.name.vector
, is there any way to provide these manually?Dear Guangchuang Yu, Can cnetplot just show the common genes between pathways? There are so many unique genes that the results are hard to read.