stat_hist: Stat histogram

Description Usage Arguments Value Examples

View source: R/stat_hist.R

Description

Given a summarized experiment, gives a histogram of the acc assay or choice of metadata.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
stat_hist(
  your_SE,
  data_choice = "assay stats",
  assay_choice = "counts",
  metadata_stat = NULL,
  group_meta_by = NULL,
  scale_all_y = FALSE,
  y_log_axis = FALSE,
  text_size = 12,
  n_bins = 30,
  n_cols = NULL,
  your_title = NULL
)

Arguments

your_SE

Your SummarizedExperiment of barcode data and associated metadata.

data_choice

Either "assay stats" which allows you to view the distribution of values in the 'assay_choice' assay, or "metadata stats" which allows you to view the distribution of metadata values in your SummarizedExperiment object.

assay_choice

When data_choice is set to "assay stats", designates which assay will be used.

metadata_stat

When data_choice is set to "metadata stats", The metadata values that will be used.

group_meta_by

When data_choice is set to "metadata stats", facet the histogram using this column of metadata. If NULL, no grouping or faceting applied

scale_all_y

Logical. Whether or not to plot all plots on the same y axis limits.

y_log_axis

Logical. Whether or not to put y axis on log scale

text_size

Size of text.

n_bins

Number of bins for histograms. Default is 30.

n_cols

Number of columns for faceted histograms. If NULL (default) will automatically choose n_cols for facetting.

your_title

Character. The title for the plot.

Value

Histogram of chosen statistics

Examples

1
2
3
4
5
data(wu_subset)
stat_hist(
    your_SE = wu_subset[, 1], data_choice = "assay stats",
    assay_choice = "counts"
)

dunbarlabNIH/barcodetrackR documentation built on April 26, 2021, 6:20 p.m.