Calculates the percentage of contaminating proteins as the share of total intensity.

qc_contaminants(
data,
sample,
protein,
is_contaminant,
intensity,
n_contaminants = 5,
plot = TRUE,
interactive = FALSE
)

## Arguments

data a data frame that contains at least the input variables. a character column in the data data frame that contains the sample names. a character column in the data data frame that contains protein IDs or protein names. a logical column that indicates if the protein is a contaminant. a numeric column in the data data frame that contains the corresponding raw or normalised intensity values (not log2). a numeric value that indicates how many contaminants should be displayed individually. The rest is combined to a group called "other". The default is 5. a logical value that indicates if a plot is returned. If FALSE a table is returned. a logical value that indicates if the plot is made interactive using the r package plotly.

## Value

A bar plot that displays the percentage of contaminating proteins over all samples. If plot = FALSE a data frame is returned.

## Examples

if (FALSE) {
qc_contaminants(
data,
sample = sample,