violin_generator: AGED Violin Plot Generator

View source: R/violin_generator.R

violin_generatorR Documentation

AGED Violin Plot Generator

Description

violin_generator will pull metagene information from AGED results to plot expression from each sample for each metagene

Usage

violin_generator(
  aged_results,
  data,
  batch,
  batch_order = names(table(batch)),
  var_axis = "treatment",
  clv = 0,
  transformation = 0,
  blind = TRUE,
  nrow = 2,
  scales_free = "fixed",
  beeswarm_size = 1,
  beeswarm_color = "black"
)

Arguments

aged_results

The results of a successful call to AGED

data

The original data that was plugged into the initial call of AGED

batch

A string vector representation of size n where n equals the number of samples. This vector should detail how each sample should be categorized within each violin plot. Using a column from a data's sample information dataframe is common. For example, one might want to separate violin plots by treatment or batch.

batch_order

A string vector representation that details the order in which the samples should be displayed on the violin plot and legend. This vector should be of size p where p equals the number of different categories, treatments, batches, etc. that were included in the batch parameter, and the strings must match exactly to the ones given in batch.

var_axis

A string representing the desired value to be printed on the axis representing the categorization/batch set by batch. Defaults to "treatment".

clv

A numerical value x that reduces the dataset by removing genes with variance < x across all samples. Our recommended value is to set this parameter to 1 if genes expression low variance across samples is desired. These genes will not be considered at all for the deconvolution. This is done before any type of transformation or other reduction is performed.

transformation

A numerical value that determines whether or not a log or VST transformation should be done on the original dataset. A value of 0 indicates no transformation, a value of 1 indicates a log transformation using log1p, a value of 2 indicates a VST transformation using varianceStabilizingTransformation If this argument is used, it should be "0", "1" or "2" only. Any other value will assume no transformation. For FaStaNMF, untransformed data should be log-transformed or VST-transformed.

blind

If a VST is to be done, this boolean value determines whether it is blind or not.

nrow

The number of violin plots that should be in each row

scales_free

A character string indicating the preference for scales for the violin plots. This argument should take one of the following four values: "fixed", "free", "free_x", "free_y".

beeswarm_size

A numerical value indicating the desired size for the beeswarm points

beeswarm_color

A character string inidcating the desired color for the beeswarm points

Value

Returns a object of type 'list' produced by the ggplot2 package that is ready to be plotted


rmoffitt/aged documentation built on Aug. 11, 2022, 7:07 p.m.