Request for bulk count to CPM/TPM/FPKM function
Opened this issue · 1 comments
erwusht commented
Hi,
Is there any plan to add a function that converts count to CPM/TPM/FPKM?
Thank you very much!
Starlitnightly commented
@JuliaMYQ, Please add a function that converts count to CPM/TPM/FPKM in omicvese.bulk._Deseq2.py
file, and named this function normalize_bulk
, argument type='CPM'/'TPM'/'FPKM'/'RPKM'
. If you need any additional parameters, please add them yourself.
The TPM formula in R
like:
tpm <- function(counts, lengths) {
rate <- counts / lengths
rate / sum(rate) * 1e6
}