plotVolcano: Volcano plots

View source: R/volcanos.R

plotVolcanoR Documentation

Volcano plots

Description

Volcano plots

Usage

plotVolcano(
  df = NULL,
  df2 = NULL,
  id = "gene",
  adjP = FALSE,
  topn_labels = 20,
  anal_type = "Volcano",
  gspval_cutoff = 0.05,
  gslogFC_cutoff = log2(1.2),
  topn_gsets = Inf,
  show_sig = "none",
  fml_nms = NULL,
  gset_nms = "go_sets",
  scale_log2r = TRUE,
  complete_cases = FALSE,
  impute_na = FALSE,
  filepath = NULL,
  filename = NULL,
  theme = NULL,
  highlights = NULL,
  grids = NULL,
  ...
)

Arguments

df

The name of a primary data file. By default, it will be determined automatically after matching the types of data and analysis with an id among c("pep_seq", "pep_seq_mod", "prot_acc", "gene"). A primary file contains normalized peptide or protein data and is among c("Peptide.txt", "Peptide_pVal.txt", "Peptide_impNA_pVal.txt", "Protein.txt", "Protein_pVal.txt", "protein_impNA_pVal.txt"). For analyses require the fields of significance p-values, the df will be one of c("Peptide_pVal.txt", "Peptide_impNA_pVal.txt", "Protein_pVal.txt", "protein_impNA_pVal.txt").

df2

Character vector or string; the name(s) of secondary data file(s). An informatic task, i.e. anal_prnTrend(...) against a primary df generates secondary files such as Protein_Trend_Z_nclust6.txt etc. See also prnHist for the description of a primary df; normPSM for the lists of df and df2.

id

Character string; one of pep_seq, pep_seq_mod, prot_acc and gene.

adjP

Logical; if TRUE, use Benjamini-Hochberg pVals in volcano plots. The default is FALSE.

topn_labels

A non-negative integer; the top-n species for labeling in a plot. At topn_labels = 0, no labels of proteins/peptides will be shown. The default is to label the top-20 species with the lowest p-values.

anal_type

Character string; the type of analysis that are preset for method dispatch in function factories. The value will be determined automatically. Exemplary values include anal_type = c("PCA", "Corrplot", "EucDist", "GSPA", "Heatmap", "Histogram", "MDS", "Model", "NMF", "Purge", "Trend", "LDA", ...).

gspval_cutoff

Numeric value or vector for uses with gspaMap. Gene sets with enrichment pVals less significant than the threshold will be excluded from volcano plot visualization. The default significance is 0.05 for all formulas matched to or specified in argument fml_nms. Formula-specific threshold is allowed by supplying a vector of cut-off values.

gslogFC_cutoff

Numeric value or vector for uses with gspaMap. Gene sets with absolute enrichment log2FC less than the threshold will be excluded from volcano plot visualization. The default magnitude is log2(1.2) for all formulas matched to or specified in argument fml_nms. Formula-specific threshold is allowed by supplying a vector of absolute values in log2FC.

topn_gsets

Numeric value or vector; top entries in gene sets ordered by increasing pVal for visualization. The default is to use all available entries.

Note that it is users' responsibility to ensure that the custom gene sets contain terms that can be found from the one or multiple preceding analyses of prnGSPA. For simplicity, it is generally applicable to include all of the data bases that have been applied to prnGSPA and in that way no terms will be missed for visualization. See also prnGSPA for examples of custom data bases.

show_sig

Character string indicating the type of significance values to be shown with gspaMap. The default is "none". Additional choices are from c("pVal", "qVal") where pVal or qVal will be shown, respectively, in the facet grid of the plots.

fml_nms

Character string or vector; the formula name(s). By default, the formula(s) will match those used in pepSig or prnSig.

gset_nms

Character string or vector containing the shorthanded name(s), full file path(s), or both, to gene sets for enrichment analysis. For species among "human", "mouse", "rat", the default of c("go_sets", "c2_msig", "kinsub") will utilize terms from gene ontology (GO), molecular signatures (MSig) and kinase-substrate network (PSP Kinase-Substrate). Custom GO, MSig and other data bases at given species are also supported. See also: prepGO for the preparation of custom GO; prepMSig for the preparation of custom MSig. For other custom data bases, follow the same format of list as GO or MSig.

scale_log2r

Logical; if TRUE, adjusts log2FC to the same scale of standard deviation across all samples. The default is TRUE. At scale_log2r = NA, the raw log2FC without normalization will be used.

complete_cases

Logical; if TRUE, only cases that are complete with no missing values will be used. The default is FALSE.

impute_na

Logical; if TRUE, data with the imputation of missing values will be used. The default is FALSE.

filepath

A file path to output results. By default, it will be determined automatically by the name of the calling function and the value of id in the call.

filename

A representative file name to outputs. By default, the name(s) will be determined automatically. For text files, a typical file extension is .txt. For image files, they are typically saved via ggsave or pheatmap where the image type will be determined by the extension of the file name.

theme

A ggplot2 theme, i.e., theme_bw(), or a custom theme. At the NULL default, a system theme will be applied.

highlights

A list of entries for highlighting. See also filter_ varargs for the format.

grids

An integer or integer vector for subset visualization of contrasts within a group. For example with a group of three contrasts, grids = 2:3 will hide the first grid from displaying. At the NULL default, all available grids will be shown.

...

filter_: Variable argument statements for the row filtration against data in a primary file linked to df. See also normPSM for the format of filter_ statements.

Additional parameters for plotting:
xco, the cut-off lines of fold changes at position x; the default is at -1.2 and +1.2.
yco, the cut-off line of pVal at position y; the default is 0.05.
width, the width of plot;
height, the height of plot.
nrow, the number of rows in a plot.
xmin, the minimum x.
xmax, the maximum x.
ymin, the minimum y.
ymax, the maximum y.
x_label, the label on x.
y_label, the label on y.


qzhang503/proteoQ documentation built on Dec. 14, 2024, 12:27 p.m.