# #——回声= FALSE ------------------------------------------------------------ 库(knitr) knitr: opts_chunk美元集(错误= FALSE,整洁= FALSE,消息= FALSE,警告= FALSE,fig.align = "中心 " ) ## ---- 回声= FALSE ------------------------------------------------------------ suppressPackageStartupMessages(图书馆(InteractiveComplexHeatmap )) ## ---- eval = FALSE ------------------------------------------------------------ # 库(ComplexHeatmap) #库(InteractiveComplexHeatmap) # m =矩阵(rnorm (100 * 100), nrow = 100) # ht =热图(m) # ht =画(ht) #不是必要的,但推荐# # htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # # 下面的代码是runable #库(可乐)#可乐来自Bioconductor #数据(golub_cola) # get_signatures (golub_cola(“ATC: skmeans”),k = 2) #这使得热图# htShiny () ## ---- eval = FALSE ------------------------------------------------------------ # htShiny (ht,output_ui_float = TRUE ) ## ---- eval = FALSE ------------------------------------------------------------ # htShiny (ht、紧凑= TRUE ) ## ---- eval = FALSE ------------------------------------------------------------ # set.seed (123) # mat1 =矩阵(rnorm (100), 10) # rownames (mat1) = colnames (mat1) = paste0(“a”,1:10)# mat2 =矩阵(样本(字母[1:10],100年,取代= TRUE), 10) # rownames (mat2) = colnames (mat2) = paste0(“b”,1:10)# # ht_list =热图(mat1、name = " mat_a row_km = 2,column_km = 2) + #热图(name = " mat_b mat2) # htShiny (ht_list ) ## ---- eval = FALSE ------------------------------------------------------------ # ht_list =热图(mat1 name = " mat_a " row_km = 2, column_km = 2) % v % #热图(mat2,name = " mat_b ") # htShiny (ht_list ) ## ---- eval = FALSE ------------------------------------------------------------ # ht = densityHeatmap(…)# htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # ht = oncoPrint(…)# htShiny (ht) # # ht = oncoPrint(…)+热图(…)+ rowAnnotation(…)# htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # 厘米= make_comb_mat(…)# ht =沮丧(厘米,…)# htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # 垫= normalizeToMatrix(…)# ht = EnrichedHeatmap(垫、…)# htShiny (ht) # # ht = EnrichedHeatmap(垫,…)+ EnrichedHeatmap(…)+热图(…)# htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # ht = pheatmap(…)# ComplexHeatmap: pheatmap应该覆盖pheatmap:: pheatmap # htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # ht = ComplexHeatmap:::热图(…)# htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # ht = ComplexHeatmap::: heatmap.2(…)#htShiny (ht ) ## ---- eval = FALSE ------------------------------------------------------------ # 库(tidyverse) #库(tidyHeatmap) # mtcars_tidy < - # mtcars % > % # as_tibble (rownames =“汽车名称”)% > % # mutate_at (var(——“汽车的名字”,惠普,vs),规模)% > % # pivot_longer(关口= - c(汽车的名字,惠普,vs), names_to =“财产”,values_to =“价值”)# # mtcars_heatmap < - # mtcars_tidy % > % #热图(汽车名称,属性,值)% > % # add_tile (hp) # # htShiny (mtcars_heatmap ) ## ---- eval = FALSE ------------------------------------------------------------ # ComplexHeatmap: pheatmap(…)# htShiny () # # oncoPrint(…)# htShiny () ## ----------------------------------------------------------------------------- htShinyExample () ## ---- eval = FALSE ------------------------------------------------------------ # htShinyExample (1.4 ) ## ----------------------------------------------------------------------------- sessionInfo()