DESeq2: before differential analysis
1
0
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
RNA-Seq R • 1.3k views
ADD COMMENT
0
Entering edit mode
6.2 years ago

There is absolutely no reason to add a pseudocount to your actual counts. A log2 fold change of 0 occurs when there's no change and has nothing to do with there being 0s in the data. If you're worried about extreme fold-changes due to having zeros, then that's what the lfcShrink() command is for.

ADD COMMENT
0
Entering edit mode

sorry, it is to avoid zero counts.

ADD REPLY

Login before adding your answer.

Traffic: 1349 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6