标签:数据分析 seurat seq 0.5 dat 0.75 DimHeatmap FALSE axis
上游分析:https://www.jianshu.com/p/4f7aeae81ef1
001、
cell <- pbmc[["pca"]]@cell.embeddings cell <- cell[order(cell[,1], decreasing = T),] cell <- rownames(cell)[c(1:10, (length(rownames(cell)) - 9):length(rownames(cell)))] cell ## 提取细胞 feature <- pbmc[["pca"]]@feature.loadings feature <- feature[order(feature[,1], decreasing = T),] feature <- rownames(feature)[c(1:15, (length(rownames(feature)) - 14):length(rownames(feature)))] feature ## 提取基因 dat <- pbmc[["RNA"]]@scale.data dat <- t(dat)[cell, feature] ## 提取绘图数据 par(mar = c(1, 1, 3, 5)) plot.new() image(dat, axes = FALSE,add = TRUE, ## 绘图 col = PurpleAndYellow() ) axis(side = 4, at = seq(0, 1, length = ncol(dat)), labels = colnames(dat), las = 1, tick = FALSE, mgp = c(0, -0.5, 0), cex.axis = 0.75 ) title(main = "PC1")
002、标准答案
DimHeatmap(pbmc, dims = 1, cells = 20, balanced = TRUE)
003、使用默认颜色
par(mar = c(1, 1, 3, 5)) plot.new() image(dat, axes = FALSE,add = TRUE, #col = PurpleAndYellow() ) axis(side = 4, at = seq(0, 1, length = ncol(dat)), labels = colnames(dat), las = 1, tick = FALSE, mgp = c(0, -0.5, 0), cex.axis = 0.75 ) title(main = "PC1")
004、增加细胞名称
par(mar = c(9, 1, 3, 5)) plot.new() image(dat, axes = FALSE,add = TRUE, #col = PurpleAndYellow() ) axis(side = 4, at = seq(0, 1, length = ncol(dat)), labels = colnames(dat), las = 1, tick = FALSE, mgp = c(0, -0.5, 0), cex.axis = 0.75 ) axis(side = 1, at = seq(0, 1, length = nrow(dat)), labels = rownames(dat), ## 增加细胞名称 las = 2, tick = FALSE, mgp = c(0, -0.5, 0), cex.axis = 0.75 ) title(main = "PC1")
标签:数据分析,seurat,seq,0.5,dat,0.75,DimHeatmap,FALSE,axis 来源: https://www.cnblogs.com/liujiaxin2018/p/16639053.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。