How to keep the genes whose counts are equal or greater than 10
1
0
Entering edit mode
n_h_78 • 0
@n_h_78-18380
Last seen 6.0 years ago

Hi,

 I wanna keep the genes equal or lower than 10 counts in at least one sample within Deseq2. is the following correct? Doesn't "sum" in "rowSums" indicate adding function?

keep <- rowSums(counts(ddsHTSeq) >= 10) >= 1

 

Thanks in advance,

N. hosseinzadeh

 

deseq2 filtering • 1.0k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States

Yes. You read that from the inside out.

counts(ddsHTSeq) >= 10

returns a boolean matrix with TRUE for any gene with counts >= 10

rowSums() >= 1

computes the number of TRUE values you have, per gene (TRUE/FALSE are coerced to 1/0) and tests that you have >= 1.

ADD COMMENT

Login before adding your answer.

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