![]() Top_annotation = ha1, bottom_annotation = ha_column, Row_names_side = "left", row_names_gp = gpar (fontsize = 8 ),Ĭolumn_title = 'Measles cases in US states 1930-2001\nVaccine introduced 1961', Year = anno_text ( year_text, rot = 0, location = unit ( 1, "npc" ), just = "top" ) ) col_fun = colorRamp2 ( c ( 0, 800, 1000, 127000 ), c ( "white", "cornflowerblue", "yellow", "red" ) ) ht_list = Heatmap ( mat, name = "cases", col = col_fun,Ĭluster_columns = FALSE, show_row_dend = FALSE, rect_gp = gpar (col = "white" ), Width = unit ( 2, "cm" ) ), show_annotation_name = FALSE ) year_text = as.numeric ( colnames ( mat ) ) year_text = "" ha_column = HeatmapAnnotation ( Height = unit ( 2, "cm" ) ), show_annotation_name = FALSE ) ha2 = rowAnnotation (Īxis_param = list (at = c ( 0, 5e5, 1e6, 1.5e6 ), Mat = readRDS ( system.file ( "extdata", "measles.rds", package = "ComplexHeatmap" ) ) ha1 = HeatmapAnnotation ( Width = unit ( 2, "mm" ) ) ht_list draw ( ht_list ) Width = unit ( 15, "mm" ) ) ht_list = rowAnnotation (block = anno_block (gp = gpar (fill = 2 : 6, col = NA ) ), Top_annotation = HeatmapAnnotation (summary = anno_summary (height = unit ( 2, "cm" ) ) ), Width = unit ( 2, "cm" ) ) ) Heatmap ( expr $ type, name = "gene type", Width = unit ( 15, "mm" ) ) rowAnnotation (length = anno_points ( expr $ length, pch = 16, size = unit ( 1, "mm" ),Īxis_param = list (at = c ( 0, 2e5, 4e5, 6e5 ), Top_annotation = HeatmapAnnotation (summary = anno_summary (gp = gpar (fill = 2 : 6 ), Show_column_names = FALSE, row_title = NULL, show_row_dend = FALSE ) Heatmap ( base_mean, name = "base mean", Library ( ComplexHeatmap ) library ( circlize ) expr = readRDS ( system.file (package = "ComplexHeatmap", "extdata", "gene_expression.rds" ) ) mat = as.matrix ( expr ) base_mean = rowMeans ( mat ) mat_scaled = t ( apply ( mat, 1, scale ) ) type = gsub ( "s\\d _", "", colnames ( mat ) ) ha = HeatmapAnnotation (type = type, annotation_name_side = "left" ) ht_list = Heatmap ( mat_scaled, name = "expression", row_km = 5,Ĭol = colorRamp2 ( c ( - 2, 0, 2 ), c ( "green", "white", "red" ) ), ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |