From eeb0877889b786514ec84087054afc6d9941acad Mon Sep 17 00:00:00 2001 From: Lulu Shi Date: Sat, 17 Jun 2023 11:13:58 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Liu=5F=E5=8D=95=E5=80=8D=E5=9E=8BCompl?= =?UTF-8?q?exHeatmap.R?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Liu_\345\215\225\345\200\215\345\236\213ComplexHeatmap.R" | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git "a/Liu_\345\215\225\345\200\215\345\236\213ComplexHeatmap.R" "b/Liu_\345\215\225\345\200\215\345\236\213ComplexHeatmap.R" index da51328..b6ef685 100644 --- "a/Liu_\345\215\225\345\200\215\345\236\213ComplexHeatmap.R" +++ "b/Liu_\345\215\225\345\200\215\345\236\213ComplexHeatmap.R" @@ -3,10 +3,8 @@ library(ComplexHeatmap) # setwd("D:/生信/夜雨声烦/硕士/毕业论文/22.09.26-牛-毕业/22.10.07-文章实验/22.11.17-gene单倍型/单倍型图") -group = read.table("sample_plot.list.txt", stringsAsFactors = F) ##两列,1:ID,2:品种 -names(group) <- c("ID","GroupClass") -rownames(group) <- group$ID -group$ID <- NULL +group = read.table("sample_plot.list.txt", row.names=1, stringsAsFactors = F) # 两列,1:ID,2:品种,ID与txt文件顺序一致 +names(group) <- c("GroupClass") new_order <- c("JPBC", "Mongolian", "Kazakh", "Yanbian") # 新的组顺序 group$GroupClass <- factor(group$GroupClass, levels = new_order)