Question: DESeq2: before differential analysis
0
gravatar for limin201709
16 months ago by
limin20170910
limin20170910 wrote:

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 • 429 views
ADD COMMENTlink modified 16 months ago by Devon Ryan90k • written 16 months ago by limin20170910
0
gravatar for Devon Ryan
16 months ago by
Devon Ryan90k
Freiburg, Germany
Devon Ryan90k wrote:

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 COMMENTlink written 16 months ago by Devon Ryan90k

sorry, it is to avoid zero counts.

ADD REPLYlink written 16 months ago by limin20170910
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 817 users visited in the last hour