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

qc_charge_states

Check charge state distribution


Description

Calculates the charge state distribution for each sample (by count or intensity).

Usage

qc_charge_states(
  data,
  sample,
  grouping,
  charge_states,
  intensity = NULL,
  remove_na_intensities = TRUE,
  method = "count",
  plot = FALSE,
  interactive = FALSE
)

Arguments

data

A data frame containing at least sample names, peptide or precursor identifiers and missed cleavage counts for each peptide or precursor.

sample

the column in the data data frame containing the sample name.

grouping

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

charge_states

the column in the data data frame containing the different charge states assigned to the precursor or peptide.

intensity

the name of the column containing the corresponding raw or normalised intensity values (not log2) for each peptide or precursor. Required when "intensity" is chosen as the method.

remove_na_intensities

logical specifying if sample/grouping combinations with intensities that are NA (not quantified IDs) should be dropped from the data frame for analysis of missed cleavages. Default is TRUE since we are usually interested in quantifiable peptides. This is only relevant for method = "count".

method

character vector indicating the method used for evaluation. "count" calculates the charge state distribution based on counts of the corresponding peptides or precursors in the charge state group, "intensity" calculates the percentage of precursors or peptides in each charge state group based on the corresponding intensity values.

plot

logical indicating whether the result should be plotted.

interactive

argument specifying whether the plot should be interactive (default is FALSE).

Value

A data frame that contains the calculated percentage made up by the sum of either all counts or intensities of peptides or precursors of the corresponding charge state (depending on which method is chosen).

Examples

## Not run: 
qc_charge_states(
  data,
  sample = r_file_name,
  grouping = pep_stripped_sequence,
  charge_states = fg_charge,
  method = "count",
  plot = 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.