plotNhoodMA | R Documentation |
Make an MAplot to visualise the relationship between DA log fold changes and neighbourhood abundance. This is a useful way to diagnose issues with the DA testing, such as large compositional biases and/or issues relating to large imbalances in numbers of cells between condition labels/levels.
plotNhoodMA(da.res, alpha = 0.05, null.mean = 0)
da.res |
A data.frame of DA testing results |
alpha |
A numeric scalar that represents the Spatial FDR threshold for statistical significance. |
null.mean |
A numeric scalar determining the expected value of the log fold change under the null
hypothesis. |
MA plots provide a useful means to evaluate the distribution of log fold changes after differential abundance testing. In particular, they can be used to diagnose global shifts that occur in the presence of confounding between the number of cells acquired and the experimental variable of interest. The expected null value for the log FC distribution (grey dashed line), along with the mean observed log fold change for non-DA neighbourhoods (purple dashed line) are plotted for reference. The deviation between these two lines can give an indication of biases in the results, such as in the presence of a single strong region of DA leading to an increase in false positive DA neighbourhoods in the opposite direction.
a ggplot
object
Mike Morgan
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.