How to use filterbyExpr with DESeq2?
1
2
Entering edit mode
20 months ago
biotrekker ▴ 110

Hello I am trying to use edgeR's filterbyExpr with DESeq2. I am running into an issue where I cannot use filterByExpr with DESeq2, unless I do not specify keep.lib.sizes = FALSE (which is recommended by edgeR) how do I use filterByExpr on my DESeqDataSet object.

dds <- DESeqDataSetFromTximport(txi=txi.kallisto.tsv, colData=meta, design= ~1)
# Filter by expression (Get rid of low variance )
keep.exprs <- filterByExpr(dds)
dds_pre_filt<- dds[keep.exprs,]
dim(dds_pre_filt)
dds_deseq <- DESeq(dds_pre_filt) #
norm_dds<-vst(dds_deseq) # vst normalization

What I want is to be able to to is:

dds_pre_filt<- dds[keep.exprs,, keep.lib.sizes = FALSE]

and then precede with normalization

DESeq2 RNA-seq edgeR • 1.4k views
ADD COMMENT
5
Entering edit mode
20 months ago
ATpoint 85k

You cannot run it directly on a DESeqDataSet (dds) but must run it on counts(dds). The libsize option is irrelevant here, it only applies if you run it on a DGEList from edgeR.

dds <- DESeqDataSetFromTximport(txi=txi.kallisto.tsv, colData=meta, design= ~your_design)

keep <- filterByExpr(counts(dds))

dds <- DESeq(dds[keep,])
ADD COMMENT

Login before adding your answer.

Traffic: 1830 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