Entering edit mode
6.2 years ago
limin201709
▴
10
I was doing RNA seq data process, and I would like to normalize the raw count and +0.1 to avoid the zero log2 fold change. But if I +1 to normalize counts data, it becomes a matric and how can I continue the pipeline.
library(DESeq2)
L3Ddata = FG_20141202_TF_20160315_aspFumA1163_RNA_seq[,13:18]
L3Ddata<-as.data.frame(L3Ddata)
colnames(L3Ddata)=test$samplename# rows - genes, columns - samples
L3Dcolname=test[,2:4]
rownames(L3Dcolname)=test$samplename##adapt the name
L3D_dds = DESeqDataSetFromMatrix(L3Ddata,colData = L3Dcolname, design=~condition)
all(rownames(L3Dcolname)%in%colnames(L3Ddata))##test if the colname of count data equals to rowname of description
L3D_dds<-counts(L3D_dds,normalize=TRUE)
L3D_dds=L3D_dds+0.1 #here it becomes a matrix
#normalize counts +0.1 to avid zero counts
L3D_dds<- DESeq(L3D_dds)# takes quite some time
sorry, it is to avoid zero counts.