plotmulti: Generate all tepr plots for all experiment comparisons

View source: R/plotmulti.R

plotmultiR Documentation

Generate all tepr plots for all experiment comparisons

Description

This function generates for all experiment comparisons contained in the object resteprmulti all plots of tepr: ECDF, auc, metagene, and histtoknee.

Usage

plotmulti(resteprmulti, expdf, ecdfgenevec, outfold = tempdir(), digits = 2,
middlewind = 100, pval = 0.01, colvec = c("#90AFBB", "#10AFBB",
"#FF9A04", "#FC4E07"), genaucvec = NA, aucaxisminx = -10,
aucaxismaxx = 100, aucaxisminy = -10, aucaxismaxy = 100, aucmaintitle = "",
aucsubtitle = "", auclegendpos = "bottom", formatname = "pdf",
uniname = "Universe", groupname = "Group", histkneexlim = NA,
binwidthvalhistknee = NA, verbose = TRUE)

Arguments

resteprmulti

Result returned by the function teprmulti.

expdf

A data frame containing experiment data that should have columns named 'condition', 'replicate', 'strand', and 'path'.

ecdfgenevec

A vector specifying the names of the genes of interest to plot the ecdf of.

outfold

Path to the output folder where the plots will be written. Subfolders with the names of the comparisons are automatically created. Default is tempdir().

digits

For the ecdf plot, the number of decimal places to round the AUC and KS values. Default is 2.

middlewind

For the ecdf plot, the index of the middle window representing the region centered around the TSS. Default is 100.

pval

For the ecdf plot, a numeric value for the p-value threshold to determine the significance of the KS test. Default is 0.01.

colvec

For the ecdf plot, a vector of 4 colors used to distinguish the different conditions. Default is c("#90AFBB", "#10AFBB", "#FF9A04", "#FC4E07").

genaucvec

For the auc plot, vector of gene names to highlight, Used for the plot of type "pval". Default is NA. If left to NA, the plot taking into account the p-values is not generated.

aucaxisminx

For the auc plot, minimum value for the x-axis. Default is -10.

aucaxismaxx

For the auc plot, maximum value for the x-axis. Default is 100.

aucaxisminy

For the auc plot, minimum value for the y-axis. Default is -10.

aucaxismaxy

For the auc plot, maximum value for the y-axis. Default is 100.

aucmaintitle

For the auc plot, main title of the plot. Default is an empty string.

aucsubtitle

For the auc plot, subtitle of the plot. Default is an empty string.

auclegendpos

For the auc plot, position of the legend. Default is "bottom".

formatname

Format of the saved plot (e.g., "pdf", "png"). Default is "pdf".

uniname

Column name in the second element of resteprmulti representing the universe selection. Default is "Universe".

groupname

Column name in the second element of resteprmulti representing the type of group a transcript belong to. Default is "Group".

histkneexlim

For the plot histoknee, a numeric vector of length 2 specifying the limits of the x-axis. Default is NA, which automatically sets the limits based on plottype.

binwidthvalhistknee

For the plot histoknee, a numeric value for the width of the bins in the histogram. Default is NA, which automatically selects a bin width based on plottype.

verbose

A logical flag indicating whether to display detailed messages about the function's progress. Default is TRUE.

Details

The function goes through each element of resteprmulti which corresponds to a comparison of two conditions. For each element it calls the following functions: #'

  • "plotecdf": The function generates a figure for each gene given in ecdfgenevec.

  • "plotauc": Generates figures by groups and pval. The lattest figure is not generated if genaucvec = NA.

  • "plotmetagenes": Generates the figures by attenuation, outgroup, universe, and all.

  • "plothistoknee": Generate the figures by percent and kb.

Value

Nothing is returned. Figures are written to outfold in the subfolder of the corresponding comparison.

See Also

[teprmulti], [plotecdf], [plotauc], [plotmetagenes], [plothistoknee]

Examples

# Assuming resteprmulti is the object returned by the function teprmulti
# and expdf contains the necessary data:
## Not run: 
plotmulti(resteprmulti, expdf, ecdfgenevec = c("EGFR", "DAP", "FLI1"))
## End(Not run)


tepr documentation built on June 8, 2025, 10:46 a.m.