plot_mx_density {mxnorm}R Documentation

Visualize marker density before/after normalization by marker and slide

Description

Visualize marker density before/after normalization by marker and slide

Usage

plot_mx_density(mx_data)

Arguments

mx_data

mx_dataset object that been used with run_otsu_discordance() to compute Otsu discordance scores (necessary for the density rug plot). Note that the table attribute must be set when running run_otsu_discordance().

Value

ggplot2 object with density plot

Examples

mx_data = mx_dataset(mxnorm::mx_sample, "slide_id", "image_id",
  c("marker1_vals","marker2_vals","marker3_vals"),
  c("metadata1_vals"))
mx_data = mx_normalize(mx_data, transform="log10",method="None")
## using `threshold_override` here in case users haven't installed `scikit-image`
mx_data = run_otsu_discordance(mx_data, table="normalized",
threshold_override = function(thold_data){quantile(thold_data, 0.5)})
plot_mx_density(mx_data)

[Package mxnorm version 1.0.3 Index]