plot_mdCompare: scClustViz plot: Plot to compare cell metadata

View source: R/shinyModules.R

plot_mdCompareR Documentation

scClustViz plot: Plot to compare cell metadata

Description

This function makes scatter/boxplots comparing cellular metadata.

Usage

plot_mdCompare(MD, mdX, mdY, sel_cells, sel_clust, md_log)

Arguments

MD

A dataframe of cellular metadata. See getMD.

mdX

A character vector of one refering to the variable name from MD to plot on the x-axis.

mdY

A character vector of one refering to the variable name from MD to plot on the y-axis.

sel_cells

Optional. A character vector of cell names (rownames of MD) to highlight in the plot.

sel_clust

Optional. The name of the selected cluster (sel_cells) to include in the legend. If labelCellTypes has been run, pass the appropriate element of attr(Clusters(sCV),"ClusterNames") to this argument to show both cluster number and cell type label in the legend.

md_log

Optional. A character vector indicating which axes should be log scaled. c("x","y") to log-scale both axes.

Examples

## Not run: 
plot_mdCompare(MD=getMD(input_data_obj),
               mdX="total_counts",
               mdY="total_features",
               sel_cells=names(Clusters(sCVdata))[Clusters(sCVdata) == "1"],
               sel_clust="1",
               md_log="x")

## End(Not run)


BaderLab/scClustViz documentation built on Sept. 10, 2023, 11:51 p.m.