plot_bar: Create interactive bar plot

View source: R/plotting_qc.R

plot_barR Documentation

Create interactive bar plot

Description

Create an interactive bar plot for specific summary information for each sample in the dataset.

Usage

plot_bar(
  count.summary,
  x = "Label",
  y = "GiniIndex",
  title = "sgRNA Read Distribution",
  xlab = NULL,
  ylab = "Gini Index",
  fill = "#E69F00",
  yaxis.addition = 0.05
)

Arguments

count.summary

data.frame containing the count summary information for each sample.

x

Character scalar for column of count.summary to plot along the x-axis.

y

Character scalar for column of count.summary to plot along the y-axis.

title

Character scalar for title of the plot.

xlab

Character scalar for label of the x-axis.

ylab

Character scalar for label of the y-axis.

fill

Character scalar for bar fill color in hex.

yaxis.addition

Numeric scalar for additional space to add to the y-axis.

Value

An interactive bar chart showing the specified summary information for each sample. The axis and plot title are editable.

Author(s)

Jared Andrews

See Also

BarView, for a static bar plot from the same count summary data.

Examples

library(CRISPRball)
count.summ <- read.delim(system.file("extdata", "escneg.countsummary.txt",
    package = "CRISPRball"
), check.names = FALSE)
# Gini Index plot
plot_bar(count.summ)

# Zero count sgRNAs plot
plot_bar(count.summ,
    x = "Label", y = "Zerocounts", title = "Fully Depleted sgRNAs",
    fill = "#394E80", ylab = "Zero Count sgRNAs", yaxis.addition = 10
)

j-andrews7/CRISPRball documentation built on Nov. 30, 2023, 7:34 p.m.