% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PTM-utils.R
\name{getModificationsCounts}
\alias{getModificationsCounts}
\title{Extract modification counts from one or more peptide sequences}
\usage{
getModificationsCounts(sequences)
}
\arguments{
\item{sequences}{A `character()` vector of peptide sequences in ProForma
format.}
}
\value{
A named integer vector where names are UniMod modification names
and values are their occurrence counts across all input sequences.
Returns an empty integer vector if no modifications are found.
}
\description{
Given a character vector of peptide sequences containing modifications in
any annotation style (deltaMass, UniMod ID, or name), returns a named
integer vector with the count of each unique modification. Regardless of
the input annotation style, all modifications are converted to their
UniMod name in the output (e.g. `[+79.966]` and `[UNIMOD:21]` both
appear as `Phospho`).
}
\examples{
seqs <- c(
    "[+304]-AT[Phospho]K",
    "AC[Carbamidomethyl]T[+79.966]S[Phospho]K",
    "PEPTIDE"
)
getModificationsCounts(seqs)

}
\author{
Guillaume Deflandre <guillaume.deflandre@uclouvain.be>
}
