count.violin: Count Distribution

Description Usage Arguments Value See Also Examples

View source: R/count.violin_function.R

Description

Violin plot visualizing read distribution

Usage

1
2
3
4
5
6
7
8
9
count.violin(
  countsTable,
  metadata,
  identifier1 = "sample",
  identifier2 = NULL,
  transform = FALSE,
  cpm = FALSE,
  save = F
)

Arguments

countsTable

input matrix containing normalized gRNA counts with gRNA ids as row names

metadata

input dataframe containing sample names and other identifiers or data

identifier1

string identifying column name of metadata with which to adjust color in violin plot

identifier2

string identifying column name of metadata with which to adjust alpha in violin plot

transform

logical - do you want to log10 transform the counts

cpm

logical - do you want to normalize the counts by sequencing depth

save

logical - do you want to save the violin plot to pdf

Value

ggplot object of the violin plot

See Also

ggplot which this function uses to plot

Examples

1
2
3
4
5
6
y <- matrix(rnorm(100*9, mean = 10, sd = 1),100,9)
colnames(y) <- paste0('sample.',1:9)
metadata <- data.frame(sample = paste0('sample.',1:9), batch = c("A","A","A","B","B","B","C","C","C"),
time = rep(c(1,2,3),times = 3))
count.violin(y, metadata, identifier1 = 'sample', identifier2='time', transform = T)
...

christensensm/COMPOSE documentation built on Dec. 22, 2020, 3:43 a.m.