Comments (4)
Does it work with the example code (since your code as such is not reproducible)? What is your sessionInfo()
?
> library(clusterProfiler)
> data(gcSample)
> xx <- compareCluster(gcSample, fun=enrichKEGG,
+ organism="hsa", pvalueCutoff=0.05)
> xx
#
# Result of Comparing 8 gene clusters
#
#.. @fun enrichKEGG
#.. @geneClusters List of 8
$ X1: chr [1:216] "4597" "7111" "5266" "2175" ...
$ X2: chr [1:805] "23450" "5160" "7126" "26118" ...
$ X3: chr [1:392] "894" "7057" "22906" "3339" ...
$ X4: chr [1:838] "5573" "7453" "5245" "23450" ...
$ X5: chr [1:929] "5982" "7318" "6352" "2101" ...
$ X6: chr [1:585] "5337" "9295" "4035" "811" ...
$ X7: chr [1:582] "2621" "2665" "5690" "3608" ...
$ X8: chr [1:237] "2665" "4735" "1327" "3192" ...
#...Result 'data.frame': 76 obs. of 12 variables:
$ Cluster : Factor w/ 8 levels "X1","X2","X3",..: 2 2 2 3 3 3 4 4 4 4 ...
$ category : chr "Human Diseases" "Human Diseases" "Cellular Processes" "Environmental Information Processing" ...
$ subcategory: chr "Infectious disease: viral" "Immune disease" "Cell growth and death" "Signaling molecules and interaction" ...
$ ID : chr "hsa05169" "hsa05340" "hsa04110" "hsa04512" ...
$ Description: chr "Epstein-Barr virus infection" "Primary immunodeficiency" "Cell cycle" "ECM-receptor interaction" ...
$ GeneRatio : chr "23/406" "8/406" "18/406" "9/193" ...
$ BgRatio : chr "202/8662" "38/8662" "157/8662" "89/8662" ...
$ pvalue : num 6.83e-05 3.07e-04 3.83e-04 1.53e-04 3.29e-04 ...
$ p.adjust : num 0.0214 0.0399 0.0399 0.0362 0.0362 ...
$ qvalue : num 0.0199 0.0372 0.0372 0.0335 0.0335 ...
$ geneID : chr "4067/3383/7128/1869/890/1871/578/864/637/9641/6891/355/9134/5971/916/956/6850/7187/3551/919/4734/958/6772" "100/6891/3932/973/916/925/958/64421" "991/1869/890/1871/701/990/10926/9088/8317/9700/9134/1029/2810/699/11200/23594/8555/4173" "7057/3339/1299/3695/1101/3679/3910/3696/3693" ...
$ Count : int 23 8 18 9 17 19 17 10 22 19 ...
#.. number of enriched terms found for each gene cluster:
#.. X1: 0
#.. X2: 3
#.. X3: 3
#.. X4: 22
#.. X5: 10
#.. X6: 1
#.. X7: 17
#.. X8: 20
#
#...Citation
T Wu, E Hu, S Xu, M Chen, P Guo, Z Dai, T Feng, L Zhou,
W Tang, L Zhan, X Fu, S Liu, X Bo, and G Yu.
clusterProfiler 4.0: A universal enrichment tool for interpreting omics data.
The Innovation. 2021, 2(3):100141
>
from clusterprofiler.
from clusterprofiler.
Happy to hear you got it somehow working, but to show for the record/archive that compareCluster
also works with the generic function enricher
:
> library(clusterProfiler)
>
> ## load some example data
> data(gcSample)
>
> ## manually download KEGG data; to be used as input for TERM2GENE and TERM2NAME
> kegg.data <- download_KEGG(species="hsa", keggType = "KEGG", keyType = "kegg")
Reading KEGG annotation online: "https://rest.kegg.jp/link/hsa/pathway"...
Reading KEGG annotation online: "https://rest.kegg.jp/list/pathway/hsa"...
> gene.sets <- kegg.data$KEGGPATHID2EXTID; colnames(gene.sets) <- c("PathwayID","GeneID")
> set.names <- kegg.data$KEGGPATHID2NAME; colnames(set.names) <- c("PathwayID","Description")
>
> ## run compareCluster with generic function enricher
> yy <- compareCluster(geneClusters = gcSample,
+ fun = "enricher",
+ minGSSize = 10,
+ maxGSSize = 500,
+ pvalueCutoff = 1,
+ pAdjustMethod = "BH",
+ TERM2GENE = gene.sets[, c("PathwayID","GeneID") ], #proper order columns
+ TERM2NAME = set.names[, c("PathwayID","Description") ]
+ )
>
> ## check
> yy
#
# Result of Comparing 8 gene clusters
#
#.. @fun enricher
#.. @geneClusters List of 8
$ X1: chr [1:216] "4597" "7111" "5266" "2175" ...
$ X2: chr [1:805] "23450" "5160" "7126" "26118" ...
$ X3: chr [1:392] "894" "7057" "22906" "3339" ...
$ X4: chr [1:838] "5573" "7453" "5245" "23450" ...
$ X5: chr [1:929] "5982" "7318" "6352" "2101" ...
$ X6: chr [1:585] "5337" "9295" "4035" "811" ...
$ X7: chr [1:582] "2621" "2665" "5690" "3608" ...
$ X8: chr [1:237] "2665" "4735" "1327" "3192" ...
#...Result 'data.frame': 226 obs. of 10 variables:
$ Cluster : Factor w/ 8 levels "X1","X2","X3",..: 1 1 1 2 2 2 2 2 2 2 ...
$ ID : chr "hsa04061" "hsa05146" "hsa04060" "hsa05169" ...
$ Description: chr "Viral protein interaction with cytokine and cytokine receptor" "Amoebiasis" "Cytokine-cytokine receptor interaction" "Epstein-Barr virus infection" ...
$ GeneRatio : chr "6/103" "6/103" "10/103" "23/406" ...
$ BgRatio : chr "100/8661" "102/8661" "297/8661" "202/8661" ...
$ pvalue : num 1.18e-03 1.31e-03 2.72e-03 6.84e-05 3.08e-04 ...
$ p.adjust : num 0.1283 0.1283 0.1778 0.0214 0.04 ...
$ qvalue : num 0.1206 0.1206 0.1671 0.0199 0.0373 ...
$ geneID : chr "6364/3559/2921/8793/3576/6374" "7850/2921/6317/3576/1281/22798" "7850/653/6364/3559/3595/2921/8793/10663/3576/6374" "4067/3383/7128/1869/890/1871/578/864/637/9641/6891/355/9134/5971/916/956/6850/7187/3551/919/4734/958/6772" ...
$ Count : int 6 6 10 23 8 18 22 13 12 14 ...
#.. number of enriched terms found for each gene cluster:
#.. X1: 3
#.. X2: 20
#.. X3: 5
#.. X4: 76
#.. X5: 48
#.. X6: 4
#.. X7: 36
#.. X8: 34
#
#...Citation
T Wu, E Hu, S Xu, M Chen, P Guo, Z Dai, T Feng, L Zhou,
W Tang, L Zhan, X Fu, S Liu, X Bo, and G Yu.
clusterProfiler 4.0: A universal enrichment tool for interpreting omics data.
The Innovation. 2021, 2(3):100141
>
from clusterprofiler.
from clusterprofiler.
Related Issues (20)
- How to combine different compareCluster results? HOT 1
- feature request: add message suggesting to cite fgsea package when it's used for GSEA analysis HOT 3
- Count duplicate K Numbers (KEGG) for enrichKEGG?
- bitr报错 HOT 1
- 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
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.