ale2violin: Prepare ALE data for violin plots

ale2violinR Documentation

Prepare ALE data for violin plots

Description

Prepare ALE data for violin plots

Usage

ale2violin(
  iMatrixAle = NULL,
  iMatrixAleGrp = NULL,
  groups,
  facet_groups = groups,
  facet_name = "Group",
  maxGroupMeanALE = 2,
  removeAboveAleNum = "ale3",
  maxGroupMeanFloor = 0,
  returnAll = FALSE,
  geneLists,
  lineAlpha = 0.1,
  subsetFunc = NULL,
  make_ggplots = TRUE,
  verbose = FALSE,
  ...
)

Arguments

groups

vector of group labels, named by colnames(iMatrixALE).

facet_groups

vector of group labels, named by colnames(iMatrixALE), as a possible alternative to using the groups, for example for higher level grouping.

facet_name

character string used to label the facet_groups.

maxGroupMeanALE

numeric value indicating the threshold for including an ALE in the output data, where the max group mean (the highest group mean) is at least this value.

removeAboveAleNum

character string of the ALE colname to remove, restricting data to include only ALE values below this number. For example "ale3" would remove "ale3" and all higher ALE numbers, thereby restricting data to "ale1" and "ale2".

maxGroupMeanFloor

numeric threshold used as a noise floor.

returnAll

logical indicating whether to return intermediate data formats in the output results list.

geneLists

list containing vectors of genes, or a data.frame with two columns "gene_name" and "geneList", used to assign genes to one or more lists in the resulting violin plot.

lineAlpha

numeric value of alpha transparency, scaled between 0 and 1, used to draw lines from "_ale1" to "_ale2" on the violin plot.

subsetFunc

optional function that takes the tall format data used in the primary violin plot, and returns data in the same format after applying logic specific for filtering this data. Intended to restrict display of genes to groups or facet_groups that are relevant to each geneLists entry.

make_ggplots

logical indicating whether to create plot objects using ggplot2.

verbose

logical indicating whether to print verbose output

...

additional arguments are ignored.

iMatrixALE

numeric matrix of expression data containing ALE rows, as output from tx2ale(). Each rowname is expected to have a suffix "_ale1" where the number represents the stranded order of ALE elements in a given gene. Therefore "_ale1" is the shortest form, closest to the 5-prime end of the transcript, and "_ale2" is the next ALE element downstream, and so on.

Details

This function takes output from tx2ale(), applies some filtering to the output data, then returns a tall data.frame sufficient for viewing as a violin plot using ggplot2::geom_violin().

See Also

Other jam ALE-specific RNA-seq functions: getFirstStrandedFromGRL(), tx2ale()


jmw86069/jambio documentation built on April 21, 2024, 2:48 p.m.