inmoose.deseq2.results.filtered_p
- inmoose.deseq2.results.filtered_p(filter_, test, theta, method, data=None)
compute and adjust p-values, with filtering
Given filter and test statistics in the form of unadjusted p-values, or functions able to compute these statistics from the data, filter and then correct the p-values across a range of filtering stringencies.
NB: this function is copied and ported from the R package genefilter. This copy was already done in the original DESeq2 R code.
- Parameters:
filter – a list of stage-one filter statistics, or a function which is able to compute such a list from
data, ifdatais suppliedtest – a list of unadjusted p-values, or a function which is able to compute such a list from the filtered portions of
data, ifdatais supplied. The option to supply a function is useful when the value of the test statistic depends on which hypotheses are filtered out at stage one.theta – a list with one or more filtering fractions to consider. Actual cutoffs are then computed internally by applying
quantileto the filter statistics contained in (or produced by) thefilter_argument.method – the unadjusted p-values contained in (or produced by)
testwill be adjusted for multiple testing after filtering, usingp_adjust(). See themethodargument of this function for more options.data – if
filter_and/ortestare functions rather than lists of statistics, they will be applied todata. The functions will be passed the wholedataobject, and must work over rows etc. themselves as appropriate.
- Returns:
a matrix of p-values, possibly adjusted for multiple testing, with one row per null hypothesis and one column per filtering fraction given in
theta. For a given column, entries which have been filtered out arenan.- Return type:
ndarray