Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to display selected results of clusterprofiler on emapplot? #176

Closed
Fang777 opened this issue Jan 4, 2019 · 6 comments
Closed

How to display selected results of clusterprofiler on emapplot? #176

Fang777 opened this issue Jan 4, 2019 · 6 comments

Comments

@Fang777
Copy link

Fang777 commented Jan 4, 2019

Dear Mr Yu,
The clusterprofiler is wonderful. When I used enrichplot to display the results of GO, it is in the order of top pvalue. But some of the remarkable terms are not of particular concern to me. I want to select some term,which I concerned, to display using emapplot, how can I do it? Thank you very much. I am so glad to see your reply, thank you!
entrez.txt
ego2.txt
newgo.txt

library(clusterProfiler)
require(clusterProfiler)
library(org.At.tair.db)
x=read.table("entrez.txt",sep = "\t") #entrez.txt为要做富集的一列 entreID
genelist=as.character(x[,1])
ego <- enrichGO(gene=genelist,OrgDb=org.At.tair.db,ont="BP", pAdjustMethod="BH",pvalueCutoff=0.05, qvalueCutoff=0.05,minGSSize=1, keyType="ENTREZID",readable=FALSE)
ego2 <- simplify(ego)
write.table(ego2,sep="\t","ego2.txt")
x<-read.table("newgo.txt",sep="\t") ##“newgo.txt“” is GO terms of picked out from "ego2.txt"
newgo <- data.frame("x")
emapplot(newgo)
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘emapplot’ for signature [‘"data.frame"’]

@GuangchuangYu
Copy link
Member

emapplot(ego2)

@Fang777
Copy link
Author

Fang777 commented Jan 4, 2019

emapplot(ego2)

Dear Yu,thank your reply, but I think you haven't really latched on my explain. I can get emapplot(ego2), but there are a lot of information. So I want to extract some intresting terms from ego2 to display in emapplot. How can I do it? Thank you!

@GuangchuangYu
Copy link
Member

GuangchuangYu commented Jan 4, 2019

emapplot(ego2, showCategory = "a_vector_of_your_selected_terms‘s_DESCRIPTION")

@GuangchuangYu
Copy link
Member

another possible solution is https://github.com/GuangchuangYu/enrichplot/issues/17.

@Fang777
Copy link
Author

Fang777 commented Jan 6, 2019

emapplot(ego2, showCategory = "a_vector_of_your_selected_terms‘s_DESCRIPTION")

Dear Yu,thank you very much, I got it. It's so excellent! And I have one more question. I want to export the relationship between points and edges of emapplot to cytoscape, how can I do it ? Thank you!

@laijen000
Copy link

Dear @GuangchuangYu , thank you for your tool! I have tried to make an emapplot using a compareCluster result, and use showCategory = vector of selected terms' DESCRIPTION to only plot a few GO terms of interest, but instead I get an emapplot with many many terms such that the entire plot is covered in text. May I ask whether showCategory can still take in a vector of DESCRIPTIONs ? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants