### 测试数据
> raw_counts
cell.1 cell.2 cell.3 cell.4 cell.5
Yz707 1 5530 10.096841 0.733589019 1
JtvvP 1 4025 9.441494 0.906189359 2
7INoh 0 3828 10.554613 1.471324220 3
### 处理统计数据
data.plot <- raw_counts %>% mutate(total_expr = rowSums(.),total_expr_log10 = log10(as.numeric(total_expr)) ) %>%
tibble::rownames_to_column(var = "featue") %>% data.frame() %>% select(featue,total_expr,total_expr_log10)
> data.plot
feature total_expr total_expr_log10
1 Yz707 5542.83043 3.743732
2 JtvvP 4038.34768 3.606204
3 7INoh 3843.02594 3.584673
出图 :
data.plot %>% ggplot(aes(x=total_expr_log10))+geom_histogram(bins = 30,color = "red",fill="skyblue") +theme_bw()
![]()
网友评论