接下来我们需要将现有的表达情况按一定标准分类,需要用到R包reshape[2]
# 载入R包
library(reshape)
# 宽变长
longdata <- melt(data = express_cpm)
# 将数据划分成...- cut(as.numeric(longdata$value), breaks = c(0,1,5,10,30,50,Inf),right = F,include.lowest = TRUE)
# 将分组结果添加到...[3]
# 载入R包
library(ggplot2)
# 画图
ggplot(longdata, aes(x = X2, fill = group, y = value)) +
geom_bar...theme(axis.text.x = element_text(angle = 45, hjust = 1))+
# 添加横纵坐标和title
labs(title = "不同表达水平区间的基因数量统计图...: https://www.rdocumentation.org/packages/ggplot2/versions/3.3.5