Filtering of RNA-seq data
1
0
Entering edit mode
3.2 years ago
BioQueen ▴ 30

Hi! I'm going to filter my RNA-seq count data, and I'm wondering how I remove rows where only one sample has a count and the rest of the sample has 0 counts. I'm using DESeq and have only found how to remove sums of counts.

Thanks!

RNA-seq Filtering • 838 views
ADD COMMENT
0
Entering edit mode
3.2 years ago
Papyrus ★ 3.0k

For example, this selects rows with all 0s, or all 0s except 1 sample. You can change the number to be more or less stringent:

filter <- apply(counts(deseq.object),1,function(x){
  sum(x==0) >= (ncol(deseq.object) - 1)
  })

# Now filter these rows
deseq.object2 <- deseq.object[!filter,]
ADD COMMENT

Login before adding your answer.

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