Thank you, your assistance was very helpful. If I have more samples, each with 3 replicates, and I want to analyze the expression of a few specific genes, how should I proceed? None of the samples are controls, and I believe differential expression analysis isn't necessary. I just need to see if some genes are highly expressed and others are low across all samples. If I'm correct, absolute gene counts should suffice for this task. Should I create a DGElist with the group factor, normalize, and then use RPKM by group?
group <- factor(c("sample_1", "sample_1", "sample_1", "sample_2", "sample_2", "sample_2")) # each sample has three replicates
y <- DGEList(counts = count_matrix, group = group) #count_matrix will specify that I have 3 rep for each sample
y <- normLibSizes(y)
RPKM <- rpkmByGroup(y, gene.length=GeneLength)
Additionally, if I want to calculate log2 TPM, does it make sense to proceed as follows?:
tpm_from_rpkm <- function(x) {
rpkm.sum <- colSums(x)
return(t(t(x) / (1e-06 * rpkm.sum)))}
TPM_counts <- tpm_from_rpkm(RPKM)
TPM_counts_df = as.data.frame(TPM_counts)
TPM_counts_log = log(TPM_counts_df + 1)
Thank you for your help!