M3DropGetExtremes {M3Drop} | R Documentation |
Identifies outliers left and right of a fitted Michaelis-Menten curve.
M3DropGetExtremes(expr_mat, fdr_threshold=0.1, percent=NA, v_threshold=c(0.05,0.95), suppress.plot=FALSE)
expr_mat |
a numeric matrix of normalized (not log-transformed) expression values, columns = samples, rows = genes. |
fdr_threshold |
the threshold for identifying significant outliers after multiple testing correction. |
percent |
identify this percentage of data that is most extreme in each direction. |
v_threshold |
restrict to this range of dropout rates to avoid poorly fit regions of the data. |
suppress.plot |
logical, whether to plot the fitted Michaelis-Menten curve and highlight to identified most extreme outliers. |
Fits a Michaelis-Menten function to the dropout-rate of the provided data, then identifies the most extreme left and/or right outliers from the curve. Horizontal residuals are calculated as :
log_10(S) - log_10( (K * (1 - P)) / P )
. Extreme left[right] outliers are identified either as the percent
smallest[largest] horizontal residuals. If percent
is undefined (default) a normal distribution is fitted to the horizontal residuals and a Z-test is used to identify significant outliers after FDR multiple testing correction.
Only genes with dropout rates within v_threshold will be considered to avoid the skewing of residuals due to the exponential parts of the MM curve near P = 0 & P = 1.
M3DropGetExtremes
identifies both left and right residuals using the provided thresholds in each direction. Eg. will return the percent
smallest and percent
largest residuals. It also plots the fitted MM curve and highlights the left and right extreme outliers unless suppress.plot=TRUE .
M3DropGetExtremes
List containing elements left and right, vectors of the names of the extreme genes to the left and right of the curve respectively.
library(M3DExampleData) extreme_gene_lists <- M3DropGetExtremes(Mmus_example_list$data, fdr_threshold=0.1) extreme_gene_lists <- M3DropGetExtremes(Mmus_example_list$data, percent=0.01)