Entering edit mode
Hi,
I am using svd to obtain the first principle components to use a covariates in differential expression testing in RNAseq data. Should I obtain the principle components on the raw counts or following log adjustment? thanks.
myData <- myCountTable
logMyData = log(myData + 1)
ruv1 = svd(logMyData - rowMeans(logMyData))$v[,1]
ruv2 = svd(logMyData - rowMeans(logMyData))$v[,2]
df = data.frame(condition,ruv1,ruv2)
ddsFullCountTable <- DESeqDataSetFromMatrix(
countData = myCountTable,
colData = df,
design = formula(~ ruv1 + ruv2 + condition))
dds <- ddsFullCountTable
dds <- DESeq(dds)
