Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

volcano_protti

Volcano plot


Description

Plots a volcano plot for the given input.

Usage

volcano_protti(
  data,
  grouping,
  log2FC,
  significance,
  method,
  target_column = NULL,
  target = NULL,
  facet_by = NULL,
  title = "Volcano plot",
  x_axis_label = "log2(fold change)",
  y_axis_label = "-log10(q-value)",
  legend_label = "Target",
  log2FC_cutoff = 1,
  significance_cutoff = 0.01,
  interactive = FALSE
)

Arguments

data

a data frame containing at least the input variables.

grouping

the column in the data data frame containing either precursor or peptide identifiers.

log2FC

the column in the data frame containing the log2 transfromed fold changes between two conditions.

significance

the column containing the p-value or adjusted p-value for the corresponding fold changes. P-value is ideally adjusted using e.g. Benjamini-Hochberg correction.

method

character verctor with the method used for the plot. method = "target" highlights your protein, proteins or any other entities of interest (specified in the 'target' argument) in the volcano plot. method = "significant" highlights all significantly changing entities.

target_column

optional column required for method = "target", can contain for example protein identifiers or a logical that marks certain proteins such as proteins that are known to interact with the treatment. Can also be provided if method = "significant" to label data points in an interactive plot.

target

optional character vector argument required for method = "target". It can contain one or more specific entities of the column provided in target_column. This can be for example a protein ID if target_column contains protein IDs or TRUE or FALSE for a logical column.

facet_by

optional argument specifying a column that contains information by which the data should be faceted into multiple plots.

title

optional argument specifying the title of the volcano plot. Default is "Volcano plot".

x_axis_label

optional argument specifying the x-axis label. Default is "log2(fold change)".

y_axis_label

optional argument specifying the y-axis label. Default is "-log10(q-value)".

legend_label

optional argument specifying the legend label. Default is "Target".

log2FC_cutoff

optional argument specifying the log2 transformed fold change cutoff used for assessing whether changes are significant. Default value is 1.

significance_cutoff

optional argument specifying the p-value cutoff used for assessing significance of changes. Default is 0.01.

interactive

logical, indicating whether the plot should be interactive or not. Default is interactive = FALSE.

Value

Depending on the method used a volcano plot with either highlighted targets (method = "target") or highlighted significant proteins (method = "significant") is returned.

Examples

## Not run: 
volcano_protti(
  data,
  grouping = pep_stripped_sequence,
  log2FC = log2FC,
  significance = p_value,
  method = "target",
  target_column = uniprot_id,
  target = "Q9Y6K9",
  facet_by = comparison,
  title = "Finding Nemo",
  x_axis_label = "log2(fold change) treated vs untreated",
  y_axis_label = "-log10(p-value)",
  legend_label = "Target Protein",
  log2FC_cutoff = 2,
  significance_cutoff = 0.05,
  interactive = TRUE
)

## End(Not run)

protti

Bottom-Up Proteomics and LiP-MS Quality Control and Data Analysis Tools

v0.1.1
MIT + file LICENSE
Authors
Jan-Philipp Quast [aut, cre], Dina Schuster [aut], ETH Zurich [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.