scatterplot_generator: AGED Scatterplot Generator

View source: R/scatterplot_generator.R

scatterplot_generatorR Documentation

AGED Scatterplot Generator

Description

scatterplot_generator will pull information from AGED results to plot gene expression for each sample for a selected gene. The value in the original dataset will be plotted on the y-axis, and the user's choice of data taken from either the W matrix, H matrix, or W * H will be plotted on the y-axis. The column or row taken from the H or W matrix is chosen by which metagene the selected gene is the most prevalent in.

Usage

scatterplot_generator(
  aged_results,
  data,
  gene,
  clv = 0,
  transformation = 0,
  blind = TRUE,
  x_axis = "wh",
  color = NULL,
  shape = NULL,
  reg = TRUE,
  reg_color = "black",
  xy = TRUE,
  xy_color = "gray",
  ellipse = TRUE
)

Arguments

aged_results

The results of a successful call to AGED

data

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

gene

A string value perfectly corresponding to a row value of the original dataset, representing a gene name.

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.

x_axis

A string value representing what data should be plotted. The value should be one of: "h" or "wh" only.

color

A string vector representation of size n where n equals the number of samples. This vector should detail how each sample should be categorized and colored within each scatterplot. Using a column from a dataset's sample information dataframe is common. For example, one might want to separate points in the scatterplots by treatment or batch. Each treatment, batch, or category will be represented by a different color.

shape

A string vector representation of size n where n equals the number of samples. This vector should detail how each sample should be categorized and represented within each scatterplot. Using a column from a dataset's sample information dataframe is common. For example, one might want to separate points in the scatterplots by treatment or batch. Each treatment, batch, or category will be represented by a different shape.

reg

A boolean value representing whether a solid, linear regression line should be added to the plot.

reg_color

If a linear regression line is added to the scatterplot, this string value should represent the color of that line.

xy

A boolean value representing whether or not a dotted x = y should be added to the plot. This is typically not applicable to "h".

xy_color

If an x = y line is added to the scatterplot, this string value should represent the color of that line.

ellipse

A boolean value representing whether or not ellipses should be added to the scatterplot. These ellipses will create normal confidence ellipses based on the "color" vector parameter.

Value

Returns a scatterplot containing the desired gene expression values. This function also plots it for you.


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