Can we use normCounts(RUVr) output to calculate TPM?

62 Views Asked by At

I have used RUVr() from RUVSeq R packages, to correct batch in my data, now I would like to use the corrected table to calculate TPM.

Can I use normCounts() to extract batch corrected data for TPM?

1

There are 1 best solutions below

1
Talha Asif On

Instead of extracting batch-corrected data, the normCounts function from the RUVSeq package is designed to normalize read counts.

The normalization factors for each sample can be obtained with the help of the calcNormFactors function, which you can then use to calculate the TPM (transcripts per million) values for your data. Here's an illustration:

library(RUVSeq)

# Your batch-corrected data
bc_data <- # ...

# Obtain normalization factors
factors <- calcNormFactors(bc_data)

# Calculate TPM values
tpm_values <- tpm(bc_data, factors)