extract_coefficient_scatter: Perform a coefficient scatter plot of a...

View source: R/de_plots.R

extract_coefficient_scatterR Documentation

Perform a coefficient scatter plot of a limma/deseq/edger/basic table.

Description

Plot the gene abundances for two coefficients in a differential expression comparison. By default, genes past 1.5 z scores from the mean are colored red/green.

Usage

extract_coefficient_scatter(
  output,
  toptable = NULL,
  type = "limma",
  x = 1,
  y = 2,
  z = 1.5,
  logfc = NULL,
  n = NULL,
  z_lines = FALSE,
  loess = FALSE,
  alpha = 0.4,
  color_low = "#DD0000",
  color_high = "#7B9F35"
)

Arguments

output

Result from the de_ family of functions, all_pairwise, or combine_de_tables().

toptable

Chosen table to query for abundances.

type

Query limma, deseq, edger, or basic outputs.

x

The x-axis column to use, either a number of name.

y

The y-axis column to use.

z

Define the range of genes to color (FIXME: extend this to p-value and fold-change).

logfc

Set a fold-change cutoff for coloring points in the scatter plot (currently not supported.)

n

Set a top-n fold-change for coloring the points in the scatter plot (this should work, actually).

z_lines

Add lines to show the z-score demarcations.

loess

Add a loess estimation (This is slow.)

alpha

How see-through to make the dots.

color_low

Color for the genes less than the mean.

color_high

Color for the genes greater than the mean.

See Also

[plot_linear_scatter()]

Examples

## Not run: 
 expt <- create_expt(metadata = "some_metadata.xlsx", gene_info = annotations)
 pairwise_output <- all_pairwise(expt)
 scatter_plot <- extract_coefficient_scatter(pairwise_output,
                                             type = "deseq", x = "uninfected", y = "infected")

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.