Skip to content

The first argument can be a multiOmicDataset object (moo) or a data.frame containing counts. For a moo, choose which counts slot to use with count_type & (optionally) sub_count_type. For a data.frame, you must also set sample_metadata. All other arguments are optional.

Usage

plot_histogram(moo_counts, ...)

Arguments

moo_counts

counts dataframe or multiOmicDataSet containing count_type & sub_count_type in the counts slot

...

arguments forwarded to method

Value

ggplot object

Methods

link to docsclass
plot_histogram_moomultiOmicDataSet
plot_histogram_datdata.frame

Examples

# plot histogram for a counts slot in a multiOmicDataset Object
moo <- multiOmicDataSet(
  sample_metadata = nidap_sample_metadata,
  anno_dat = data.frame(),
  counts_lst = list("raw" = nidap_raw_counts)
)
p <- plot_histogram(moo, count_type = "raw")

# customize the plot
plot_histogram(moo,
  count_type = "raw",
  group_colname = "Group", color_by_group = TRUE
)


# plot histogram for a counts dataframe directly
counts_dat <- moo@counts$raw
plot_histogram(
  counts_dat,
  sample_metadata = nidap_sample_metadata,
  sample_id_colname = "Sample",
  feature_id_colname = "GeneName",
  label_colname = "Label"
)