单细胞数据高级分析之消除细胞周期因素 | Removal of cell cycle effect
The normalization method described above aims to reduce the effect of technical factors in scRNA-seq data (primarily, depth) from downstream analyses. However, heterogeneity in cell cycle stage, particularly among mitotic cells transitioning between S and G2/M phases, also can drive substantial transcriptomic variation that can mask biological signal. To mitigate this effect, we use a two-step approach:
1) quantify cell cycle stage for each cell using supervised analyses with known stage-specific markers,
2) regress the effect of cell cycle stage using the same negative binomial regression as outlined above.
For the first step we use a previously published list of cell cycle dependent genes (43S phase genes, 54 G2/M phase genes) for an enrichment analysis similar to that proposed in ref. 11.
For each cell, we compare the sum of phase-specific gene expression (log10 transformed UMIs) to the distribution of 100 random background genes sets, where the number of background genes is identical to the phase gene set, and the background genes are drawn from the same expression bins. Expression bins are defined by 50 non-overlapping windows of the same range based on log10(mean UMI). The phase-specific enrichment score is the expression z-score relative to the mean and standard deviation of the background gene sets. Our final ‘cell cycle score’ (Extended Data Fig. 1) is the difference between S-phase score and G2/M-phase score.
For a final normalized dataset with cell cycle effect removed, we perform negative binomial regression with technical factors and cell cycle score as predictors. Although the cell cycle activity was regressed out of the data for downstream analysis, we stored the computed cell cycle score before regression, enabling us to remember the mitotic phase of each individual cell. Notably, our regression strategy is tailored to mitigate the effect of transcriptional heterogeneity within mitotic cells in different phases, and should not affect global differences between mitotic and non-mitotic cells that may be biologically relevant.
get.cc.score <- function(cm, N=100, seed=42) {
set.seed(seed)
cat('get.cc.score, ')
cat('number of random background gene sets set to', N, '\n')
min.cells <- 5
cells.mols <- apply(cm, 2, sum)
gene.cells <- apply(cm>0, 1, sum)
cm <- cm[gene.cells >= min.cells, ]
gene.mean <- apply(cm, 1, mean)
breaks <- unique(quantile(log10(gene.mean), probs = seq(0,1, length.out = 50)))
gene.bin <- cut(log10(gene.mean), breaks = breaks, labels = FALSE)
names(gene.bin) <- rownames(cm)
gene.bin[is.na(gene.bin)] <- 0
regev.s.genes <- read.table(file='./annotation/s_genes.txt', header=FALSE, stringsAsFactors=FALSE)$V1
regev.g2m.genes <- read.table(file='./annotation/g2m_genes.txt', header=FALSE, stringsAsFactors=FALSE)$V1
goi.lst <- list('S'=rownames(cm)[!is.na(match(toupper(rownames(cm)), regev.s.genes))],
'G2M'=rownames(cm)[!is.na(match(toupper(rownames(cm)), regev.g2m.genes))])
n <- min(40, min(sapply(goi.lst, length)))
goi.lst <- lapply(goi.lst, function(x) x[order(gene.mean[x], decreasing = TRUE)[1:n]])
bg.lst <- list('S'=get.bg.lists(goi.lst[['S']], N, gene.bin),
'G2M'=get.bg.lists(goi.lst[['G2M']], N, gene.bin))
all.genes <- sort(unique(c(unlist(goi.lst, use.names=FALSE), unlist(bg.lst, use.names=FALSE))))
expr <- log10(cm[all.genes, ]+1)
s.score <- enr.score(expr, goi.lst[['S']], bg.lst[['S']])
g2m.score <- enr.score(expr, goi.lst[['G2M']], bg.lst[['G2M']])
phase <- as.numeric(g2m.score > 2 & s.score <= 2)
phase[g2m.score <= 2 & s.score > 2] <- -1
return(data.frame(score=s.score-g2m.score, s.score, g2m.score, phase))
}
单细胞数据高级分析之消除细胞周期因素 | Removal of cell cycle effect的更多相关文章
- 单细胞数据高级分析之初步降维和聚类 | Dimensionality reduction | Clustering
个人的一些碎碎念: 聚类,直觉就能想到kmeans聚类,另外还有一个hierarchical clustering,但是单细胞里面都用得不多,为什么?印象中只有一个scoring model是用kme ...
- 单细胞数据高级分析之构建成熟路径 | Identifying a maturation trajectory
其实就是另一种形式的打分. 个人点评这种方法: 这篇文章发表在nature上,有点奇怪,个人感觉创新性和重要性还不够格,工具很多,但是本文基本都是自己开发的算法(毕竟satji就是搞统计出身的). 但 ...
- 第二篇:智能电网(Smart Grid)中的数据工程与大数据案例分析
前言 上篇文章中讲到,在智能电网的控制与管理侧中,数据的分析和挖掘.可视化等工作属于核心环节.除此之外,二次侧中需要对数据进行采集,数据共享平台的搭建显然也涉及到数据的管理.那么在智能电网领域中,数据 ...
- Lakehouse: 统一数据仓库和高级分析的新一代开放平台
1. 摘要 数仓架构在未来一段时间内会逐渐消亡,会被一种新的Lakehouse架构取代,该架构主要有如下特性 基于开放的数据格式,如Parquet: 机器学习和数据科学将被作为头等公民支持: 提供卓越 ...
- 《Wireshark数据包分析实战》 - http背后,tcp/ip抓包分析
作为网络开发人员,使用fiddler无疑是最好的选择,方便易用功能强. 但是什么作为爱学习的同学,是不应该止步于http协议的,学习wireshark则可以满足这方面的需求.wireshark作为抓取 ...
- 单细胞数据初步处理 | drop-seq | QC | 质控 | 正则化 normalization
比对 The raw Drop-seq data was processed with the standard pipeline (Drop-seq tools version 1.12 from ...
- 【Social listening实操】作为一个合格的“增长黑客”,你还得重视外部数据的分析!
本文转自知乎 作者:苏格兰折耳喵 ----------------------------------------------------- 在本文中,作者引出了"外部数据"这一概 ...
- Wireshark数据包分析(一)——使用入门
Wireshark简介: Wireshark是一款最流行和强大的开源数据包抓包与分析工具,没有之一.在SecTools安全社区里颇受欢迎,曾一度超越Metasploit.Nessus.Aircrack ...
- 关于RECOVERY清除数据的分析
[前言] 讨论:双清和清空所有数据的问题 说明:以前写的帖子都写三清,那个是为了保险起见才叫大家三项清除,毕竟人都有刚开始的时候,但看了郭贤普的帖子<系统与数据兼容性测试>之后,我觉得有必 ...
随机推荐
- IIC学习
1 概述: IIC是用两条双向的线,一条SDA(serial data line),一条SCL(serial clock). SCL:上升沿将数据输入到每个EEPROM器件中,下降沿驱动EEPROM器 ...
- noip模拟【tea】
tea [题目描述]有n个容量为V的瓶子,第i个瓶子中装着a[i]个单位的tea,使所有瓶子内的tea在不 超过其容量的前提下,非空的瓶子最少.在一个单位时间内,可以同时将多个瓶子中的tea倒入另外多 ...
- (转)Jenkins持续集成
(二期)14.持续集成工具jenkins [课程14]持续集...概念.xmind0.6MB [课程14]持续集成...kins.xmind43.3KB [课程14预习]持续...kins.xmind ...
- 【Spring Security】二、数据库管理用户权限
一 引入相关的jar包 这个例子用的是mysql数据库和c3p0开源的jdbc连接池,在项目的pom.xml中引入jar包 <!-- Mysql --> <dependency> ...
- 论文笔记:Variational Capsules for Image Analysis and Synthesis
Variational Capsules for Image Analysis and Synthesis 2018-07-16 16:54:36 Paper: https://arxiv.org/ ...
- 分布式强化学习基础概念(Distributional RL )
分布式强化学习基础概念(Distributional RL) from: https://mtomassoli.github.io/2017/12/08/distributional_rl/ 1. Q ...
- HDU 2426 Interesting Housing Problem(二分图最佳匹配)
http://acm.hdu.edu.cn/showproblem.php?pid=2426 题意:每n个学生和m个房间,现在要为每个学生安排一个房间居住,每个学生对于一些房间有一些满意度,如果满意度 ...
- 一.移动app测试与质量保证
1.典型的互联网产品的研发流程,及其核心做法.这里并不是简单的套用敏捷等流程方法,而是经过时间摸索和不断调整,找到最适合自己产品的流程做法,这是质量实践质量保证的基础. 2.系统功能测试实践.包涵需求 ...
- JavaScript中 call和apply
call()方法和apply()方法的作用相同,他们的区别在于接收参数的方式不同. 对于call(),第一个参数是this值没有变化,变化的是其余参数都直接传递给函数.(在使用call()方法时,传递 ...
- linux du
命令参数: -a或-all 显示目录中个别文件的大小. -b或-bytes 显示目录或文件大小时,以byte为单位. -c或--total 除了显示个别目录或文件的大小外,同时也显示所有目录或文 ...