Giter Club home page Giter Club logo

clustergvis's Introduction

👨 Hi, I am Jun Zhang. 💻 👋

  • 🔭 I’m currently working on NGS data analysis.
  • 🌱 I’m currently learning R/linux/python/julia languages and bioinformatic skills.
  • 😄 I’m looking forward to developing some R packgaes for visualization.

wechat planet

Shiny tools

R packages

Python packages

What I am doing?

clustergvis's People

Contributors

junjunlab avatar yanpd01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

clustergvis's Issues

mfuzzy序列问题

作者大大,请问一下该包type=both时,可以单独设置mfuzzy的坐标轴范围和坐标轴标题吗,此外我在指定sample.order时,可视化结果并没有按照我的sample.order排序,是因为对列聚类吗,但是不聚类情况下样品顺序并没有与我的指定顺序一致,我希望是我的热图列按照我的指定分组排序(分为四组,每组5个重复)

非常感谢!

谢谢大神做的新包,一直都是您的粉丝。
我在用您的包跑示例数据的时候出现了如下错误:
Error in ComplexHeatmap::anno_block(align_to = align_to, panel_fun = function(index, :
unused arguments (align_to = align_to, panel_fun = function(index, nm) {
npos = as.numeric(unlist(strsplit(nm, split = "C"))[2])
grid::grid.rect(gp = grid::gpar(fill = colanno[npos], col = NA))
if (annnoblock.text == TRUE) {
grid::grid.text(label = paste("n:", length(index), sep = ""), rot = 90, gp = grid::gpar(col = annnoblock.gp[1], fontsize = as.numeric(annnoblock.gp[2])))
}
})

考虑应该是您在修改本库的代码。

其实您可以在这个库里新开一个专用于修整开发的branch, 这样可能就会避免别人在您修改代码的时候下载到使用会出错的包,待您在
这个branch上修改测试完成后您可以把您修改的内容并入main的这个主要的branch, 这样可以不耽误使用,谢谢大神

add.bar does not work as expected

Hi Jun,

Thanks for developing this great package. However, when I use it, I notice some issues.
I use add.bar to add a bar plot for GO, which I thought would be -log10pvalue. However, it turns out it uses the ratio rather than the p-value.
Using ratio is fine, but the default GO label is ordered by p-value, so creating inconsistency, and moreover, the GO barplot only have a maximum of 4 bars even when I supply the enrichment table with 5 GO terms for each cluster.

Here is a screenshot of a cluster
Screen Shot 2023-01-27 at 14 11 04
You can see the bar plot and GO term labels are not ordered in the same way, and missing 1 term as well.
You can also see the enrichment table for this cluster is like this.
Screen Shot 2023-01-27 at 14 13 41

And this is the code I used to plot the figure:

visCluster(object = gene_ck10,
           plot.type = "both",
           annoTerm.data = enrich_ck10,
           add.box = T, show_row_dend = F, add.bar = T,
           line.side = "left",
           markGenes.side = "left",
           boxcol = rep(hue_pal()(4)[1:2], each = 4),
           sample.col	= rep(c(hue_pal()(4)[c(1,4,3)], "#808080"), 2))

Could you please have a look if this is a bug, or I have done something wrong?

Cheers,

希望新的功能

我在想如何使用WGCNA聚类的模块与该软件结合一起,可能会更好。

使用热图分簇后表达模式并不相近的问题

首先十分感谢大神的R包,为我这个小白刚开始的课题打下了第一步。
有一个小问题,就是当我加载我自己数据后使用语句
ck <- clusterData(exp = x,
cluster.method = "kmeans",
cluster.num = 10)
Rstudio会反馈给我一张分为10个簇的热图,这个时候的分簇信息看起来是正确的
但是当我使用语句
visCluster(object = ck,
plot.type = "heatmap",
column_names_rot = 45)
Rstudio反馈给我的热图确实另一张分为10个簇的热图,而这张热图的聚类信息看起来是有问题的,因为他讲表达模式明显不同的基因也聚为一个簇。请问这是什么原因造成的呢?
谢谢!

Ask for help

Dear author,
When I use the package with the testing data, error was found. Can you help me?
报错

某些cluster gene富集trem为0,对应的条形图无法展示

您好,在加入GO富集数据作图时候,不添加add.bar = T参数,图像可以正常形成,添加add.bar = T后,报错,且对应的图片乱码
报错内容如下:

visCluster(object = ck,

  •        plot.type = "both",
    
  •        column_names_rot = 45,
    
  •        show_row_dend = F,
    
  •        ctAnno.col = ggsci::pal_npg()(8),
    
  •        add.box = T,
    
  •        add.line = F,
    
  •        boxcol = ggsci::pal_npg()(8),
    
  •        add.point = T,+           
    
  •        annoTerm.data = enrich.go, 
    
  •        by.go = "anno_block", 
    
  •        # textbox.size=1,
    
  •        add.bar = T, 
    
  •        line.side = "left")
    

Error in unit(x0, default.units) : 'x'和'unit'的长度必需大于零

#列名不显示

您好,可以不显示列名吗?看了说明文档和包里面的查看,没有这个参数可选呢,感谢回答

安装ClusterGVis_0.1.1时报错

尊敬的作者和各位R语言专家:

您好!

我使用R-4.1.2安装ClusterGVis_0.1.1时遇到了一个问题。由于网络原因,我选择用devtools的本地命令来安装ClusterGVis。
命令为:devtools::install_local("D:/users/download/ClusterGVis_0.1.1.zip")

出现了下述错误:

  • installing binary package 'ClusterGVis' ...
    cp: unknown option -- )
    Try '/usr/bin/cp --help' for more information.
    ERROR: installing binary package failed
  • removing 'G:/software/R-4.1.2/library/ClusterGVis'
    Warning message:
    In i.p(...) :
    installation of package ‘C:/Users/users/AppData/Local/Temp/Rtmp8emurQ/remotes2d1410168d6/ClusterGVis’ had non-zero exit status

之前报错的都是依赖包的问题,我也悉数安装。但这个错误,我在网络上寻找到的方法均不能解决。

希望作者或其他知道解决办法的同仁可以告知。在此十分感谢各位!

Add a parameter to control `col_fun` in VisCluster?

Hi there,

Could you add a parameter for users to control the col_fun in VisCluster? Currently, it's hard coded as colorRamp2(c(-2, 0, 2), ht.col) (link).

It will be super useful for plotting the unscaled data (like log2FC) or changing the z-score to a bigger range (like -3 to 3).

Thanks!

热图出图问题

你好作者,我在画图示出现报错,请帮忙看一下。谢谢
image

visCluster(object = df,plot.type = "heatmap")
This palatte have 20 colors!

*** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
1: .setMask(NULL, NULL)
2: resolveMask.NULL(NULL)
3: (function (path) { UseMethod("resolveMask")})(NULL)
4: grid.Call(C_getEngineDLon)
5: grid.draw.grob(rg)
6: grid.draw(rg)
7: grid.rect(x[expand_index[[2]]], y[expand_index[[1]]], width = unit(1/nc, "npc"), height = unit(1/nr, "npc"), gp = do.call("gpar", c(list(fill = col_matrix), gp)))
8: .local(object, ...)
9: draw_heatmap_body(object, kr = i, kc = j, x = slice_x[j], y = slice_y[i], width = slice_width[j], height = slice_height[i], just = c("left", "top"))
10: draw_heatmap_body(object, kr = i, kc = j, x = slice_x[j], y = slice_y[i], width = slice_width[j], height = slice_height[i], just = c("left", "top"))
11: ht_graphic_fun_list[j]
12: .local(object, ...)
13: draw(ht, internal = TRUE)
14: draw(ht, internal = TRUE)
15: .local(object, ...)
16: draw_heatmap_list(object)
17: draw_heatmap_list(object)
18: ht_graphic_fun_list[j]
19: eval(code)
20: eval(code)
21: grDevices::recordGraphics(eval(code), list(), as.environment(-1))
22: .local(object, ...)
23: draw(ht_list, ...)
24: draw(ht_list, ...)
25: .local(object, ...)
26: ComplexHeatmap::draw(htf, merge_legend = TRUE, annotation_legend_list = lgd_list)
27: ComplexHeatmap::draw(htf, merge_legend = TRUE, annotation_legend_list = lgd_list)
28: visCluster(object = df, plot.type = "heatmap")

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 1
R is aborting now ...
Segmentation fault (core dumped)

ask for help

当我使用factor(x, levels=c("1","2","3")改变因子顺序时,在type.plot=both中会出现热图仅改变group名的顺序,而热图顺序无改变的情况。

Hope for new function

This package is good and I have a few thoughts I'd like to share;

  1. Can enriching-related codes be added to the source code so that users can select top5 enrichment GO or KEGG pathways with one parameter, rather than external import?
  2. Can word cloud size be dependent on enrichment information of each cluster such as p value and gene ratio, for example simplifyEnrichment packages?
    Thanks!

求回答

大神:
你好!
我按照您的推文 进行clustervis包安装,出现以下问题

image

devtools::install_github("junjunlab/ClusterGVis")
Downloading GitHub repo junjunlab/ClusterGVis@HEAD
Skipping 1 packages not available: jjAnno

 这个要怎么解决

an error with plotting heatmap

I got an error when I run this package with exps data in my Win10 system. Would you help me to fix it? Thank you! The code and errors listed below:
library(ClusterGVis)
data(exps)
head(exps,3)
getClusters(exp = exps)
cm <- clusterData(exp = exps,
cluster.method = "mfuzz",
cluster.num = 8)
visCluster(object = cm,plot.type = "line")
visCluster(object = cm,plot.type = "heatmap")

When I plot heatmap, the error appeared.
(Error in ComplexHeatmap::anno_block(align_to = align_to, panel_fun = function(index, :
unused arguments (align_to = align_to, panel_fun = function(index, nm) {
npos = as.numeric(unlist(strsplit(nm, split = "C"))[2])
grid::grid.rect(gp = grid::gpar(fill = colanno[npos], col = NA))
if (annnoblock.text == TRUE) {
grid::grid.text(label = paste("n:", length(index), sep = ""), rot = 90, gp = grid::gpar(col = annnoblock.gp[1], fontsize = as.numeric(annnoblock.gp[2])))
}
}))

monocle3 can't install

Hi Jun
I can't install your package in my mac, because monocle3 can't install
Can you give me some advise to install this package?

Thank you for your help!

这个报错可能是什么原因呢

visCluster(object = st.data,

  •        plot.type = "both",
    
  •        line.side = "left",
    
  •        column_names_rot = 45,
    
  •        markGenes = pbmc.markers$gene,
    
  •        cluster.order = c(1:8),
    
  •        ggplot.panel.arg = c(5,0.5,32,"grey90",NA),
    
  •        gglist = gglist)
    

This palatte have 20 colors!
Error in ComplexHeatmap::Heatmap(as.matrix(mat), name = "Z-score", cluster_columns = cluster_columns, :
unused arguments (ggplot.panel.arg = c("5", "0.5", "32", "grey90", NA), gglist = list(list(list(c("C1", "C1", "C1", "C1", "C1"), 1:5, c(1.543012e-05, 9.403808e-06, 7.425671e-06, 7.425671e-06, 5.744775e-06), c(37.5, 37.5, 37.5, 37.5, 37.5)), list(, , ), , list(), list(list("black", 0.5, 1, "butt", FALSE, TRUE), list("white", "black", 0.5, 1, TRUE), list("", "plain", "black", 11, 0.5, 0.5, 0, 0.9, c(0, 0, 0, 0), FALSE, TRUE), NULL, NULL, NULL, list(NULL, NULL,
NULL, NULL, NULL, 1, NULL, NULL, c(2.75, 0, 0, 0), NULL, TRUE), list(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, c(0, 0, 2.75, 0), NULL, TRUE), NULL, list(NULL, NULL, NULL, NULL, NULL, 1, 90, NULL, c(0, 2.75, 0, 0), NULL, TRUE), NULL, list(NULL, NULL, NULL, NULL, NULL, 0, -90, NULL, c(0, 0, 0, 2.75), NULL, TRUE), list(NULL, NULL, "grey30", 0.8, NULL, NULL, NULL, NULL, NULL, NULL, TRUE), list(NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, c(2.2, 0, 0, 0), NULL, TRUE),

绘制热图出错

作者您好,请问我在画热图的时候报如下错误如何解决?

visCluster(object = st.data,

  •        plot.type = "heatmap",
    
  •        column_names_rot = 45,
    
  •        markGenes = markGenes,
    
  •        cluster.order = c(1:14))
    

This palatte have 20 colors!
Error in visCluster(object = st.data, plot.type = "heatmap", column_names_rot = 45, :
object '"heatmap"' not found
,在执行代码visCluster(object = st.data, plot.type = "line")的时候能出图,做热图就不行了,请问是什么原因造成的,应该如何解决。谢谢您!

Installation problem

Dear ClusterGVis team:
Good afternoon.

I faced problem in installation of ClusterGVis package.

The Error message is as below:

Error: Failed to install 'ClusterGVis' from GitHub:
Failed to install 'monocle3' from GitHub:
Could not find tools necessary to compile a package

could not install ClusterGVis

Hi,
I tried to install and got the following error. Can you please help me check? Thanks.

Haiyan lei

library(devtools)
devtools::install_github("junjunlab/ClusterGVis")
Downloading GitHub repo junjunlab/ClusterGVis@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/junjunlab/ClusterGVis/tarball/HEAD'
session_info()
─ Session info ─────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.2.2 (2022-10-31 ucrt)
os Windows 10 x64 (build 19044)
system x86_64, mingw32
ui RStudio
language (EN)
collate English_United States.utf8
ctype English_United States.utf8
tz America/New_York
date 2023-06-21
rstudio 2023.06.0+421 Mountain Hydrangea (desktop)
pandoc NA

Ask for help

Dear author,
When I use the package with the testing data, error was found. Can you help me?

pdf('testbxcolP.pdf',height = 10,width = 6)
visCluster(object = ck,

  •        plot.type = "both",
    
  •        column_names_rot = 45,
    
  •        add.box = T,
    
  •        add.line = F,
    
  •        boxcol = ggsci::pal_npg()(8),
    
  •        add.point = T)
    

[1] "This palatte have 20 colors!"
Error in ComplexHeatmap::rowAnnotation(gene = geneMark, cluster = anno.block, :
object 'baranno' not found
Please help me! Thank you!
A rookie.
微信图片_20221123153321

遇到报错“"This palatte have 20 colors!"”

你好,我作图时遇到报错,怎么解决呢,我也卸载ClusterGVis了,然后重新安装了

[1] "This palatte have 20 colors!"
Error in ComplexHeatmap::anno_block(align_to = align_to, panel_fun = function(index,  : 
  unused arguments (align_to = align_to, panel_fun = function(index, nm) {
    npos = as.numeric(unlist(strsplit(nm, split = "C"))[2])
    grid::grid.rect(gp = grid::gpar(fill = colanno[npos], col = NA))
    if (annnoblock.text == TRUE) {
        grid::grid.text(label = paste("n:", length(index), sep = ""), rot = 90, gp = grid::gpar(col = annnoblock.gp[1], fontsize = as.numeric(annnoblock.gp[2])))
    }
})

how to use this package to achieve the anlysis of KEGG?

when i used this package for GO anlysis ,it is very succeed. However, when I used this package for kegg analysis, errors were always displayed in the drawing part. I suspect that I divided this package into eight clusters before drawing. However, in the case of kegg enrichment, although my pval was 1, there were still several clusters without corresponding pathways, so I would like to ask whether this package can realize the presentation of kegg results.
9ea3043d7ec6f541ab613d2b1f376aa (1) the picture show the code i used.

求解答

使用测试文件进行分析,
命令行如下,
data(exps)
cm <- clusterData(exp = exps,cluster.method = "mfuzz",cluster.num = 8)
返回结果,
Error: No such option: 'message'. If you want to add this new option, please use your_opt_fun(message = ..., ADD = TRUE)
软件包安装完整
image

与Mfuzz包作图有差异

请问作者大大我使用ClusterGvis设置和mfuzz相同的c,m=mestimate但作图结果不一样是为什么><

monocle3的热图

俊俊大佬,怎么实现monocle3的拟时序热图添加一个bar呀,就是表示横坐标轴的。

2ae4a00de0bf5abd9da8514d6927bd1
还有就是怎么调整簇的顺序,想实现最左边的簇在最上面,然后最右边的在最下面,比如这个图C1和C2互换位置,十分感谢大佬!

无法将GO注释条更改为左侧!

您好作者,我的全部作图代码为
visCluster(object = st.data, plot.type = "both", column_names_rot = 45, show_row_dend = F, markGenes = markGenes, markGenes.side = "right", #annoKegg.mside = "left",#把条目放在左边 annoTerm.mside = "left",#把条目放在左边 annoTerm.data = enrich, line.side = "left", cluster.order = c(1:8), sample.col = cols, ctAnno.col = cols, #go.col = rep(jjAnno::useMyCol("stallion",n = 8),each = 6), add.bar = T)
annoTerm.mside = "left"这个没有作用,我无法将注释条更改为左侧,请问您有什么好的解决办法吗?
Best regards,
Yours Lucas

Add multigroup column annotation?

Hi there,

Bravo for the package! One question/suggestion: is there any way to add multiple-column annotations?

I'm aware of the sample.group parameter, but that can only allow one grouping (which is most of the case). I want to add extra column annotations, but got the error below.

Error in ComplexHeatmap::Heatmap(as.matrix(mat), name = "Z-score", cluster_columns = FALSE,  : 
  formal argument "top_annotation" matched by multiple actual arguments

Any idea how I can add extra column annotations? Something like this:

ha = HeatmapAnnotation(foo1 = rep(c("D1","D2"), each = 4),
                       foo2 = rep(c("E1", "E1", "E2", "E2"), 2))
draw(ha)

Thanks!
Ji

非模式生物KEGGE/GO注释如何展示

您好,非常感谢您提供这么好的软件分析和展示数据!在使用过程中我用clusterProfiler等软件自己构建了物种的org.fish.eg.db并且用enrichGO成功做了GO富集。但是用enrichCluster时候一直报错,原因可能是我的org.fish.eg.db的keytypes(具体如下)和您的不一样。不知道问题是我参数设置不对还是自己构建的org.fish.eg.db本身没办法用在enrichCluster呢?谢谢!

enrich.go <- enrichCluster(object = cm,
OrgDb = org.fish.eg.db,
type = "BP"
pvalueCutoff = 0.05,
topn = 5,
seed = 5201314,
fromType= 'GID',
toType= 'GENENAME',
readable= FALSE)

keytypes(org.fish.eg.db)
[1] "EVIDENCE" "EVIDENCEALL" "GENENAME" "GID" "GO" "GOALL" "KO" "ONTOLOGY" "ONTOLOGYALL" "Pathway"

报错:
'select()' returned 1:1 mapping between keys and columns
--> No gene can be mapped....
--> Expected input gene ID: 215358.XP_010732866.1,215358.XP_010730654.1,215358.XP_010731133.1,215358.XP_010729585.1,215358.XP_010738278.1,28737.XP_006883363.1
--> return NULL...
Error in map():
i In index: 1.
Caused by error in dplyr::filter():
i In argument: pvalue < pvalueCutoff.
Caused by error:
! 找不到对象'pvalue'
Run rlang::last_trace() to see where the error occurred.

Error in clusterProfiler::bitr(tmp$gene, fromType = fromType, toType = toType, : (converted from warning) 14.29% of input gene IDs are fail to map...

ClusterGVis包运行到enrich <- enrichCluster(object = st.data,
OrgDb = org.Hs.eg.db,
type = "BP",
organism = "hsa",
pvalueCutoff = 0.5,
topn = 5,
seed = 5201314)

'select()' returned 1:1 mapping between keys and columns
'select()' returned 1:1 mapping between keys and columns
'select()' returned 1:1 mapping between keys and columns
'select()' returned 1:1 mapping between keys and columns
Error in clusterProfiler::bitr(tmp$gene, fromType = fromType, toType = toType, :
(converted from warning) 14.29% of input gene IDs are fail to map...

prepareDataFromscRNA 报错

pbmc<-scObject

new.cluster.ids <- c("Endothelial","Pericytes","Fibroblast","T and NK cells", "Mast cells","DCs","Macrophage","Granulocytes","B cells" )
names(new.cluster.ids) <- levels(pbmc)
pbmc <- RenameIdents(pbmc, new.cluster.ids)
levels(pbmc)
[1] "Endothelial" "Pericytes" "Fibroblast" "T and NK cells" "Mast cells" "DCs" "Macrophage" "Granulocytes" "B cells"
pbmc.markers <- pbmc.markers.all %>%

  • dplyr::group_by(cluster) %>%
  • dplyr::top_n(n = 20, wt = avg_log2FC)

head(pbmc.markers)

A tibble: 6 × 7

Groups: cluster [1]

p_val avg_log2FC pct.1 pct.2 p_val_adj cluster gene

1 0 3.79 0.74 0.035 0 Fibroblast CCL14
2 0 3.48 0.679 0.031 0 Fibroblast ACKR1
3 0 3.38 0.922 0.164 0 Fibroblast TM4SF1
4 0 3.24 0.962 0.039 0 Fibroblast ADGRL4
5 0 3.19 0.982 0.225 0 Fibroblast PECAM1
6 0 3.15 0.918 0.038 0 Fibroblast VWF

st.data <- prepareDataFromscRNA(object = pbmc,

  •                             diffData = pbmc.markers,
    
  •                             showAverage = TRUE)
    

Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
请问大佬,做到这一步总是报错怎么办

自定义展示基因与cluster对应不上

打扰您了,老师,我在对接单细胞数据的时候,自定义展示基因的时候,发现marker基因都会自动往后窜一个cluster。想请问这个情况怎么解决

1680755996488

`# add gene name markGenes<- c("COL1A1","IBSP","ALPL","LYZ","CD14","C1QB","CD3D","CD3E","NKG7", "MKI67","TOP2A","PCNA","DCN","COL3A1","COL1A2_1","CD79A","CD79B","MS4A1","MMP9_1","CTSK", "ACP5","IGKC","IGHG1","IGHG3","VWF","CLDN5","FLT1","CPA3", "TPSAB1", "TPSB2") markersTTTTTT visCluster(object = st.data, plot.type = "line")

pdf('sc2.pdf',height = 12,width = 14,onefile = F)
visCluster(object = st.data,
plot.type = "both",
column_names_rot = 50,
show_row_dend = F,
markGenes = markGenes,
markGenes.side = "left",
annoTerm.data = enrich,
line.side = "left",
cluster.order = c(1:10),
go.col = rep(jjAnno::useMyCol("stallion",n = 10),each = 5),
add.bar = T)
dev.off()`

KEGG富集问题

我用您包里的实例数据集Exp做KEGG
image
这个代码跑KEGG富集的时候会出现
image
这个问题,不知道如何解决
用我自己的数据就会这样
image
麻烦您解答一下,谢谢

Problems when changing the color of the heat map

Dear author,
Glad to see your new creation, which is very important to my current work. However, I encountered a problem when I tried to change the color of the heat map, I hope I can get your help.

col_fun <- colorRamp2(c(-1.5,0,1.5),
                      c("#00AF64","white","#F60018"))
pdf('TEST.pdf',height = 10,width = 6)
visCluster(object = cm,
           plot.type = "both",
           col = col_fun,
           ctAnno.col = ggsci::pal_npg()(5),
           add.box = T,
           add.line = F,
           boxcol = c("#00A087FF","#4DBBD5FF","#E64B35FF"))
dev.off()

Error in rep(x, floor(n/length(x))) :
attempt to replicate an object of type 'closure'

画热图的时候展示的结果和cluster不对应

非常感谢大神的R包!
我在出图的时候发现单独花line type的时候和cluster是对应的,但是画热图的时候展示的结果和cluster不对应。然后我对ck里面的结果重新按照cluster排序后得到的热图结果和cluster就对应上了,不知道是不是我的代码问题。
下面是我调整ck结果的代码:
a=ck$wide.res
x=order(as.numeric(a$cluster))
a=a[x,]
ck$wide.res=a

a=ck$long.res
x=order(as.numeric(a$cluster))
a=a[x,]
ck$long.res=a

ask for help

1.当我添加富集通路的注释时候,无论使用data("termanno2")或者data("termanno"),都会显示相同的错误:1
2.但是用enrichCluster()结果可进行后续可视化,两者添加富集通路的结果有何区别呢?
非常感谢您。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.