qc_ids | R Documentation |
Returns a plot or table of the number of IDs for each sample. The default settings remove grouping variables without quantitative information (intensity is NA). These will not be counted as IDs.
qc_ids(
data,
sample,
grouping,
intensity,
remove_na_intensities = TRUE,
condition = NULL,
title = "ID count per sample",
plot = TRUE,
interactive = FALSE
)
data |
a data frame containing at least sample names and precursor/peptide/protein IDs. |
sample |
a character or factor column in the |
grouping |
a character column in the |
intensity |
a character column in the |
remove_na_intensities |
a logical value that specifies if sample/grouping combinations with intensities that are NA (not quantified IDs) should be dropped from the data frame. Default is TRUE since we are usually interested in the number of quantifiable IDs. |
condition |
optional, a column in the |
title |
optional, a character value that specifies the plot title (default is "ID count per sample"). |
plot |
a logical value that indicates whether the result should be plotted. |
interactive |
a logical value that specifies whether the plot should be interactive (default is FALSE). |
A bar plot with the height corresponding to the number of IDs, each bar represents one
sample (if plot = TRUE
). If plot = FALSE
a table with ID counts is returned.
set.seed(123) # Makes example reproducible
# Create example data
data <- create_synthetic_data(
n_proteins = 100,
frac_change = 0.05,
n_replicates = 3,
n_conditions = 2,
method = "effect_random"
)
# Calculate number of identifications
qc_ids(
data = data,
sample = sample,
grouping = peptide,
intensity = peptide_intensity_missing,
condition = condition,
plot = FALSE
)
# Plot number of identifications
qc_ids(
data = data,
sample = sample,
grouping = peptide,
intensity = peptide_intensity_missing,
condition = condition,
plot = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.