What benchmark should I use for setting the EdgeR filterByExpr min.count parameter?
1
0
Entering edit mode
Jack S. ▴ 50
@9aa6de71
Last seen 23 days ago
United States

This question is related to a previous query regarding pseudobulking in a single-cell dataset.

Question 1

When performing differential expression testing, how can I determine if my selections for filterByExpr min.count and min.total.count are appropriate?

From what I understand based on discussions about filterByExpr, the default min.count and min.total.count values are generally recommended for most scenarios. However, there is an example in Section 4.10.3 of the EdgeR user's guide where these values are explicitly set in the function call:

keep.genes <- filterByExpr(y, group = y$samples$cluster, 
                           min.count = 10, min.total.count = 20)

Assuming I'm using glmQLFit and glmQLTest as demonstrated in the example in Section 4.10.3, how can I determine if these values are too high or too low? Additionally, when would you suggest modifying the default values?

Question 2

The EdgeR manual mentions that "glmQLFit gives special attention to handling of small counts and zero counts."

Does this imply that glmQLFit and glmQLTest can be used without filtering out low counts? Would you recommend this approach?

Thanks in advance!

edgeR DifferentialExpression • 695 views
ADD COMMENT
2
Entering edit mode
@gordon-smyth
Last seen 8 minutes ago
WEHI, Melbourne, Australia

The limma and edgeR User's Guides, case studies, documentation and online posts all consistently advise you to use filterByExpr with default settings. See for example

filterByExpr appears many times in the edgeR User's Guide, all but once with default settings. In the one example that you quote, min.total.count was increased to 20 because there were clusters with only 1 sample, so the author wanted to make sure there were at least 20 reads for each gene. To be honest, I don't think that was necessary and the argument could have been left at the default.

You are worrying about this unnecessarily. Sure, you can reduce the amount of filtering without adversely affecting an analysis. But why bother? You will generally just end up with including more non-DE genes in the analysis and perhaps reduce power a little bit.

The filterByExpr settings were chosen with small experiments in mind. The only time I would think about changing the parameter would be for experiments with a large number of samples. In that case, I might consider reducing min.count and min.prop. To judge whether the settings are appropriate, you simply look at the standard edgeR variance plots from plotBCV and plotSA.

ADD COMMENT
1
Entering edit mode

Hi Gordon, never thought about changing the defaults of filterByExpr() with a large number of samples. You say that plotBCV() and plotSA() can be used to judge whether non-default values for min.count and min.prop are appropriate, but, and I hope I'm not asking something too trivial, how exactly. I've played a bit lowering min.count from 10 to 7 and min.prop from 0.7 to 0.5 in a dataset with more than 400 samples, and I see slightly larger BCV values and slightly smaller prior DFs, but how do I know when I'm setting better non-default values?

ADD REPLY
2
Entering edit mode

It is the minimum group size rather than the total number of samples that is relevant.

min.prop is more a biological parameter rather than statistical. If you find a gene up-regulated in group B vs A, would it still be a biologically meaningful result to you if the gene was only detected in 50% of the samples in group B?

You could reduce min.count if you have large group sample sizes and you want to detect DE genes at low expression levels. If the plotSA trend is still smooth and monotonic, then lower values are fine.

I assume you're using edgeR quasi. The new edgeR 4.0 quasi method with legacy=FALSE is designed to improve edgeR's performance for small counts and large sample sizes. With the new method, you can reduce min.count to very small values without harming edgeR's statistical performance. Of course, that's only useful to you if you are detecting DE genes at low expression levels.

ADD REPLY

Login before adding your answer.

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