39、count_rpkm_fpkm_TPM
参考:https://f1000research.com/articles/4-1521/v1
https://www.biostars.org/p/171766/
http://www.rna-seqblog.com/rpkm-fpkm-and-tpm-clearly-explained/
It used to be when you did RNA-seq, you reported your results in RPKM (Reads Per Kilobase Million) or FPKM (Fragments Per Kilobase Million). However, TPM (Transcripts Per Kilobase Million) is now becoming quite popular.
============================fpkm====================================
rate = geneA_count / geneA_length
fpkm = rate / (sum(gene*_count) /10^6)
即: fpkm = 10^6 * (geneA_count / geneA_length) / sum(gene*_length) ##sum(gene*_length) 没有标准化处理的所有基因的count总和。
============================TPM====================================
rate = geneA_count / geneA_length
tpm = rate / (sum(rate) /10^6)
即: tpm = 10^6 * (geneA_count / geneA_length) / sum(rate) ##sum(gene*_length)
====================================================================
These three metrics attempt to normalize for sequencing depth and gene length. Here’s how you do it for RPKM:
- Count up the total reads in a sample and divide that number by 1,000,000 – this is our “per million” scaling factor.
- Divide the read counts by the “per million” scaling factor. This normalizes for sequencing depth, giving you reads per million (RPM)
- Divide the RPM values by the length of the gene, in kilobases. This gives you RPKM.
FPKM is very similar to RPKM. RPKM was made for single-end RNA-seq, where every read corresponded to a single fragment that was sequenced. FPKM was made for paired-end RNA-seq. With paired-end RNA-seq, two reads can correspond to a single fragment, or, if one read in the pair did not map, one read can correspond to a single fragment. The only difference between RPKM and FPKM is that FPKM takes into account that two reads can map to one fragment (and so it doesn’t count this fragment twice).
TPM is very similar to RPKM and FPKM. The only difference is the order of operations. Here’s how you calculate TPM:
- Divide the read counts by the length of each gene in kilobases. This gives you reads per kilobase (RPK).
- Count up all the RPK values in a sample and divide this number by 1,000,000. This is your “per million” scaling factor.
- Divide the RPK values by the “per million” scaling factor. This gives you TPM.
So you see, when calculating TPM, the only difference is that you normalize for gene length first, and then normalize for sequencing depth second. However, the effects of this difference are quite profound.
When you use TPM, the sum of all TPMs in each sample are the same. This makes it easier to compare the proportion of reads that mapped to a gene in each sample. In contrast, with RPKM and FPKM, the sum of the normalized reads in each sample may be different, and this makes it harder to compare samples directly.
Here’s an example. If the TPM for gene A in Sample 1 is 3.33 and the TPM in sample B is 3.33, then I know that the exact same proportion of total reads mapped to gene A in both samples. This is because the sum of the TPMs in both samples always add up to the same number (so the denominator required to calculate the proportions is the same, regardless of what sample you are looking at.)
With RPKM or FPKM, the sum of normalized reads in each sample can be different. Thus, if the RPKM for gene A in Sample 1 is 3.33 and the RPKM in Sample 2 is 3.33, I would not know if the same proportion of reads in Sample 1 mapped to gene A as in Sample 2. This is because the denominator required to calculate the proportion could be different for the two samples.
39、count_rpkm_fpkm_TPM的更多相关文章
- iTOP-4418开发板支持Android4.4/5.1.1系统、Linux3.4.39、QT2.2/4.7/5.7、Ubuntu12.04
核心板参数 尺寸:50mm*60mm 高度:核心板连接器组合高度1.5mm PCB层数:6层PCB沉金设计 4418 CPU:ARM Cortex-A9 四核 S5P4418处理器 1.4GHz 68 ...
- 39、扩展原理-BeanFactoryPostProcessor
39.扩展原理-BeanFactoryPostProcessor BeanPostProcessor:bean后置处理器,bean创建对象初始化前后进行拦截工作的 BeanFactoryPostPro ...
- EC读书笔记系列之16:条款35、36、37、38、39、40
条款35 考虑virtual函数以外的其他选择 记住: ★virtual函数的替代方案包括NVI手法及Strategy模式的多种形式.NVI手法自身是一个特殊形式的Template Method模式 ...
- 常见条码类型介绍(Code 39、Code 128、EAN-8、EAN-13、EAN-128、ISSN、TIF、TIF-14、UPC(A)、UPC(E))
常见条码类型,如下: 1.Code 39 Code 39,又称为"Code 3 of 9",是非零售市场中最常用的格式,用于盘存和跟踪.Code 39码编码规则简单,误码率低.所能 ...
- 39、wget、curl
39.1.wget介绍: wget命令用来从指定的URL下载文件.wget非常稳定,它在带宽很窄的情况下和不稳定网络中有很强的适应性,如果是由于网络的原因下载失败, wget会不断的尝试,直到整个文件 ...
- 39、升级linux的内核
39.1.什么是linux系统内核: 操作系统是一个用来和硬件打交道并为用户程序提供一个有限服务集的低级支撑软件.一个计算机 系统是一个硬件和软件的共生体,它们互相依赖,不可分割.计算机的硬件,含有外 ...
- 39、mysql数据库(视图)
39.1.视图: 0.创建表及插入数据: 1.创建teacher表及插入数据: (1)创建表: CREATE TABLE teacher( tid int PRIMARY KEY auto_incre ...
- 『现学现忘』Docker基础 — 39、实战:自定义Tomcat9镜像
目录 1.目标 2.准备 3.编写Dockerfile文件 4.构建镜像 5.启动镜像 6.验证容器是否能够访问 7.向容器中部署WEB项目,同时验证数据卷挂载 (1)准备一个简单的WEB项目 (2) ...
- 39、重新复习js之三
1.盒子模型典型标签 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// ...
随机推荐
- Eclipse插件开发_学习_00_资源帖
一.官方资料 1.eclipse api 2.GEF Developer's Guide 二. 精选资料 1.开发 Eclipse 插件 2.Eclipse, RCP, Plugin and OSGi ...
- @angular/cli项目构建--Dynamic.Form
导入所需模块: ReactiveFormsModule DynamicFormComponent.html <div [formGroup]="form"> <l ...
- 20165210 预习作业3 Linux安装及学习
Linux安装及学习 一.Linux安装 通过参考教程:基于VirtualBox虚拟机安装Ubuntu图文教程成功的安装上了Linux但在过程中还是有一些小问题的. 首先按着步骤走,一开始没什么毛病, ...
- 如何使用SOCKET 发送HTTP1.1 GET POST请求包
http://blog.csdn.net/yc0188/article/details/4741871 http://docs.linuxtone.org/ebooks/C&CPP/c/ch3 ...
- 运动目标跟踪中kalman滤波器的使用
目标跟踪的kalman滤波器介绍 Kalman滤波器是通过前一状态预测当前状态,并使用当前观测状态进行校正,从而保证输出状态平稳变化,可有效抵抗观测误差.因此在运动目标跟踪中也被广泛使用.在视频处理的 ...
- Agc001_D Arrays and Palindrome
传送门 题目大意 给定一个元素和为$N$的有$M$个数的序列$A$,请你可以$A$元素排列的顺序,并需要构造一个有$K$个($K$可以自己定)数的数列,使得任意一个长度为$N$的字符串,若满足:前$A ...
- 非maven项目下载maven的jar
很多时候我们需要jar,可惜项目不是maven的,但是我们只有一个maven的坐标,那怎么办? 比如: <dependencies> <dependency> <grou ...
- angular的$watch,$digest和$apply
第一部分:$watch $watch是一个scope函数,用于监听模型变化,当你的模型部分发生变化时它会通知你. $watch(watchExpression, listener, objectEqu ...
- HDU1423:Greatest Common Increasing Subsequence
浅谈\(DP\):https://www.cnblogs.com/AKMer/p/10437525.html 题目传送门:http://acm.hdu.edu.cn/showproblem.php?p ...
- 机器学习:PCA(使用梯度上升法求解数据主成分 Ⅰ )
一.目标函数的梯度求解公式 PCA 降维的具体实现,转变为: 方案:梯度上升法优化效用函数,找到其最大值时对应的主成分 w : 效用函数中,向量 w 是变量: 在最终要求取降维后的数据集时,w 是参数 ...