plotViolin: This will create a violin plot

Description Usage Arguments Details Examples

View source: R/plotViolin.R

Description

This will plot a given gene via violin plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plotViolin(
  gene,
  input,
  sampleID,
  colourID,
  facetID = NULL,
  cols = NULL,
  subsetID = NA,
  subsetName = NA,
  facet_scale = "fixed",
  mean_text = F,
  fraction_text = F,
  type = "violin",
  legend = T,
  fudge = 0
)

Arguments

gene

Will only plot data for this gene, if the gene paramter is a list the violin plot will display the sum of the expression for all genes in the list

input

Input expression set

sampleID

pData variable to group by on the x axis

colourID

a pData variable to color by

facetID

an optional pData variable to plot by

cols

Personalized colour vector, length should equal number of groups in colourID

subsetID

a pData variable to subset the original data by

subsetName

a value from the subsetID variable specified, this will select only these cells to plot

facet_scale

ggplot2 parameter for plot scales defaults to fixed

mean_text

ggplot2 parameter for adding the mean expression per group defaults to False

fraction_text

ggplot2 parameter for adding the fraction of cells with expression greater than 0 for that gene defaults to False

type

plot type, default is violin, can also plot density and cdf distribution

fudge

a pseudocount value to avoid dropping cells with zero counts

Details

Utilize information stored in pData to control the plot display.

Examples

1
plotViolin("Actb", input, sampleID = "sample", facetID = "subtype", colourID = "genotype", cols = NULL, subsetID = "celltype", subsetName = "Neurons", facet_scale = "fixed")

kgellatl/SignallingSingleCell documentation built on Dec. 29, 2021, 4:12 p.m.