我想做一个分析,在R与Seurat,但为此,我需要一个计数矩阵与读计数。但是,我想要使用的数据是在TPM中提供的,这对于用作输入并不理想,因为我希望与使用读取计数的其他分析进行比较。
有人知道如何将TPM数据转换为读取计数吗?
提前感谢!
发布于 2020-03-10 16:05:22
你需要总计数和基因(或转录)长度来接近这个转换。有关反向操作,请参见https://support.bioconductor.org/p/91218/。
从这一环节:
You can create a TPM matrix by dividing each column of the counts matrix by some estimate of the gene length (again this is not ideal for the reasons stated above).
x <- counts.mat / gene.length
Then with this matrix x, you do the following:
tpm.mat <- t( t(x) * 1e6 / colSums(x) )
Such that the columns sum to 1 million.colSums(x)将是与TPM矩阵中的基因对齐的每一个样本的计数,而gene.length将取决于用于读取摘要的基因模型。
所以你可能运气不好,最好还是使用像三文鱼或卡利斯托这样的工具从fastq文件中获取计数矩阵,如果这些文件是可用的,根据你想要与之比较的数据中使用的基因或转录本模型。
如果除了使用TPM数据(并不是真正推荐的)之外,没有其他选择,Seurat也可以使用它--参见https://github.com/satijalab/seurat/issues/171。
https://stackoverflow.com/questions/60614972
复制相似问题