MCUFD_enrich-list-method: MCUFD enrichment testing

MCUFD_enrich,list-methodR Documentation

MCUFD enrichment testing

Description

Compare taxon proportions in the top n hits with those in the full set of taxa.

Usage

## S4 method for signature 'list'
MCUFD_enrich(
  cFres,
  n = NA_real_,
  rank = "Phylum",
  save = FALSE,
  pthresh = NA_real_,
  fname = NA_character_,
  units = "in",
  width = 10,
  height = 7,
  dpi = 600,
  ptype = "heatmap",
  outtab = NULL
)

Arguments

cFres

List of data frames containing MCUFD results.

n

Numeric, the number of top-ranked reference taxa to be plotted per input sequence. Default = 100.

rank

Character, taxonomic rank to be used for categorisation of the CUFD hit sequences. Options are "Domain", "Kingdom", and "Phylum". Default = "Phylum".

save

Logical, should the enrichment plot be saved to file? Default = FALSE.

pthresh

Numeric, adjusted p-value threshold to be used for subsetting the data if plot == TRUE. Default = NA.

fname

Character, name of the output file (used if plot == TRUE).

units

Numeric, units to be used for defining the plot size. Options are "in" (default), "cm", and "mm".

width

Numeric, width of the figure (in units).

height

Numeric, height of the figure (in units).

dpi

Numeric, resolution of the figure (default = 600).

ptype

Character, type of plot to make (if plot == TRUE). Options are "heatmap" (default) and "dotplot".

outtab

Character (optional); name of file to which enrichment test results will be saved. Format is tab-delimited.

Value

A ggplot object.

Examples

   virusSet <- readSeq(example = TRUE)
   virusCF <- codonFreq(virusSet)
   exclCod <- c("ATT", "TGT")
   MCUFD_tmp <- MCUFD(virusCF, exclude = exclCod, norm = TRUE)
   enrich_tmp <- MCUFD_enrich(
       MCUFD_tmp, n = 100, rank = "Phylum", save = FALSE, pthresh = 0.01
   )


adamd3/codondiffR documentation built on Sept. 3, 2022, 2:26 a.m.