% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clean_Spectronaut.R
\name{.cleanRawSpectronaut}
\alias{.cleanRawSpectronaut}
\title{Clean raw Spectronaut output.}
\usage{
.cleanRawSpectronaut(
  msstats_object,
  intensity,
  calculateAnomalyScores,
  anomalyModelFeatures,
  peptideSequenceColumn = "EG.ModifiedSequence",
  heavyLabels = NULL
)
}
\arguments{
\item{msstats_object}{an object of class \code{MSstatsSpectronautFiles}.}

\item{intensity}{Intensity column to use. Accepts legacy enum values
\code{'PeakArea'} (default, uses F.PeakArea), \code{'NormalizedPeakArea'}
(uses F.NormalizedPeakArea).  Can also be any raw
Spectronaut column name passed as a string (e.g.
\code{"FG.MS1Quantity"}); the column name is standardized internally.
For protein turnover workflows the recommended default is
\code{"FG.MS1Quantity"}.}

\item{calculateAnomalyScores}{Default is FALSE. If TRUE, will run anomaly detection model and calculate anomaly scores for each feature. Used downstream to weigh measurements in differential analysis.}

\item{anomalyModelFeatures}{character vector of quality metric column names to be used as features in the anomaly detection model. List must not be empty if calculateAnomalyScores=TRUE.}

\item{peptideSequenceColumn}{Name of the Spectronaut column that contains the
peptide sequence.  Defaults to \code{"EG.ModifiedSequence"}. The value is
standardized internally (dots and spaces removed) before column lookup.}

\item{heavyLabels}{Character list identifying the heavy isotope labels as it
appears inside square brackets in the peptide sequence column, e.g.
\code{c("Lys6")} matches peptides containing \code{[Lys6]}.
\code{c("Lys6", "Arg10")} matches peptides containing either \code{[Lys6]} or \code{[Arg10]}.
Supports any novel label name reported by Spectronaut (e.g. \code{"Leu6"},
\code{"Phe10"}).  When provided, peptides are
classified as heavy (\code{IsotopeLabelType = "H"}), light
(\code{IsotopeLabelType = "L"}), or unlabeled
(\code{IsotopeLabelType = NA}) based on its labeled sequence.  When
\code{NULL} (default) all peptides receive \code{IsotopeLabelType = "L"}.
Useful for protein turnover experiments.}
}
\value{
\code{data.table}
}
\description{
Clean raw Spectronaut output.
}
\keyword{internal}
