Hello,
I have 4 samples and I have tried to convert the count in to log2 but I have some concerns.
I have tried the below code and it works ok
log_count <- log2(countdata + 1)
but I want to normalise the data and consider the difference in library size so I decided to use cpm()
function in edgeR package
library(edgeR)
# Create a DGEList object
dge <- DGEList(counts = data)
# Normalize for library size
dge <- calcNormFactors(dge)
# Calculate CPM
cpm_data <- cpm(dge)
# Calculate CPM
cpm_data <- cpm(dge,log=TRUE,prior.count=1)
I have got a negative value in the first 2 groups(highlighted in yellow)
I am not sure how zero converts to -5?is this log2 transformed CPM value correct?
Any clue what the problem is?
Thanks in advance
Please use
Job
only when you're advertising a position. Otherwise, for things that have a specific solution and are not a discussion, useQuestion
.I've changed your post to a
Question
now, but please be mindful in the future.