Filter by multiple columns above count threshold in R
1
0
Entering edit mode
7.0 years ago

So I'm having a brain cramp and I think I'm over thinking it. I'm doing an RNA-seq experiment and want to filter my counts table by if at least four columns have above 20 counts. Any clue how to do this? The function I wrote takes way too long and there has got to be an easier way.

RNA-seq workflow • 2.5k views
ADD COMMENT
0
Entering edit mode

So, what have you tried? It would be more useful for learning process if you show your efforts and thinking process.

ADD REPLY
3
Entering edit mode
7.0 years ago
Michael 54k
mycounts[rowSums(mycounts >= 20) >= 4, ]
ADD COMMENT

Login before adding your answer.

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