基因表达趋势分析(TCseq使用)

TCseq可根据不同的聚类方法将基因按照表达模式分类

BiocManager::install("TCseq")
library(TCseq)
data <- read.delim('df_TCseq.xls', row.names = 1, sep = '\t', check.names = FALSE)
data <- as.matrix(data)
tca <- timeclust(data, algo = "cm", k = 6, standardize = TRUE)
#character string giving a clustering method. Options are km' (kmeans), 'pam' (partitioning around medoids), 'hc' (hierachical clustering), 'cm' (cmeans).
p <- timeclustplot(tca, value = "z-score(TPM)", cols = 3)#所有cluster合并一个图
print(p[[1]])#单一cluster作图
a <- as.data.frame(tca@cluster)
table(a)
names(a) <- 'Cluster'
Cluster2 <- subset(a,Cluster == 2)
write.table(Cluster2, file="Cluster2_gene.xls", sep="\t", quote=F, row.names=T, col.names=T)

导出不同cluster基因做功能富集


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *