Filter Out Low Read Counts
1
0
Entering edit mode
pthom010 • 0
@pthom010-23694
Last seen 2.3 years ago
United States

I ran a time course with a resistant and a susceptible genotype over 22 days (0 dpi, 1 dpi, 7 dpi, 14 dpi, 22 dpi). I have a dds object from DESeq2 made from RSEM for all thirty time points. I would like to filter out lowly expressed genes by rowMeans, but want to do so in two batches (filter out the low row means for all of the susceptible samples, then the resistant ones). I should note that the two groups of 15 are separated by a condition (Genotype) included in the DESeqDataSetFromTximport function. Would I be able to just run a subset function on the two genotypes?

deseq2 r • 2.3k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 3 days ago
United States

I wouldn't use a filter that takes into account the conditions at all. If you want to pre-filter, i would recommend just filtering such that each row has x or more samples with a count of 10 or more for example.

keep <- rowSums(counts(dds) >= 10) >= x
dds <- dds[keep,]
# then run DESeq()
ADD COMMENT
0
Entering edit mode

Thanks, Michael. After filtering, I ended up with this error:

>dds = DESeq(dds)
Error in estimateSizeFactorsForMatrix(counts/normMatrix, locfunc = locfunc,  :
  every gene contains at least one zero, cannot compute log geometric means

Would you have any insight on how I could resolve said error? Thank you.

ADD REPLY
0
Entering edit mode

This reflects probably some aspects that make DESeq2 model not appropriate. Why are there no genes that are expressed for all samples?

ADD REPLY
0
Entering edit mode

The RSEM values were assembled through Trinity. I created my DDS object using transcript values. Might that explain it?

ADD REPLY
0
Entering edit mode

Eyeball your gene counts. Usually that error means you have a few samples that have zero reads for nearly every gene.

ADD REPLY
0
Entering edit mode

Thanks. Not entirely sure how I should progress. Do you think I should filter those transcripts with gene counts lower than 1 in any column?

ADD REPLY
0
Entering edit mode

Swbarnes2 said "samples".

Take a look at the column sum of the counts. colSums(counts(dds))

ADD REPLY

Login before adding your answer.

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