View source: R/plotting_functions.R
plot_covariates | R Documentation |
plot_covariates()
creates a histogram of the covariates response_n_nonzero
, response_n_umis
, and (if applicable) response_p_mito
. Cellwise QC removes cells that lie in the extreme right tail of the response_p_mito
distribution or that lie in the extreme left or right tail of the response_n_nonzero
or response_n_umis
distribution. To help guide the selection of QC thresholds, plot_covariates()
plots candidate QC thresholds as vertical lines on the histograms. The optional arguments response_n_nonzero_range
, response_n_umis_range
, and p_mito_threshold
control the location of these candidate QC thresholds. response_n_nonzero_range
(resp., response_n_umis_range
) is a length-two vector of quantiles (default: c(0.01, 0.99)
) indicating the location at which to draw candidate QC thresholds on the response_n_nonzero
(resp., response_n_umis
) histogram. Next, p_mito_threshold
is a single numeric value in the interval [0,1] specifying the location at which to draw a candidate QC threshold on the response_p_mito
plot.
plot_covariates(
sceptre_object,
response_n_umis_range = c(0.01, 0.99),
response_n_nonzero_range = c(0.01, 0.99),
p_mito_threshold = 0.2,
return_indiv_plots = FALSE
)
sceptre_object |
a |
response_n_umis_range |
(optional; default |
response_n_nonzero_range |
(optional; default |
p_mito_threshold |
(optional; default |
return_indiv_plots |
(optional; default |
a single cowplot
object containing the combined panels (if return_indiv_plots
is set to TRUE
) or a list of the individual panels (if return_indiv_plots
is set to FALSE
)
If run_qc()
has already been called on the sceptre_object
, then the parameters response_n_umis_range
, response_n_nonzero_range
, and p_mito_threshold
are set to the corresponding parameters within the sceptre_object
.
library(sceptredata)
data(highmoi_example_data)
data(grna_target_data_frame_highmoi)
import_data(
response_matrix = highmoi_example_data$response_matrix,
grna_matrix = highmoi_example_data$grna_matrix,
grna_target_data_frame = grna_target_data_frame_highmoi,
moi = "high",
extra_covariates = highmoi_example_data$extra_covariates,
response_names = highmoi_example_data$gene_names
) |> plot_covariates(p_mito_threshold = 0.07)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.