% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{bindMSI}
\alias{bindMSI}
\title{bind MSI data to a SummarizedExperiment}
\usage{
bindMSI(se, useDing = TRUE, onlyHL = TRUE)
}
\arguments{
\item{se}{SummarizedExperiment instance}

\item{useDing}{logical(1) if TRUE, use MSIsensor outputs from Ding et al. Cell 2018, otherwise use firehose labelings msi-h,msi-l}

\item{onlyHL}{logical(1) if TRUE, retain only msi-h, msi-l records;
ignored if useDing is TRUE}
}
\value{
SummarizedExperiment instance with expanded colData,
samples limited to those with microsatellite instability values.
The additional variable is called 'msiTest' and is numerical
if useDing is TRUE and is character (msi-{h,l,s}) otherwise.
}
\description{
bind MSI data to a SummarizedExperiment
}
\note{
This function adds the column \code{msiTest} to
\code{colData(se)}.  The contents of the column are given by
\code{\link{fireMSI}}.  Samples in \code{se}
that do not correspond to a row of \code{\link{fireMSI}}
are dropped.  If there is already a column named \code{msiTest}
in \code{colData(se)}, it is replaced and samples are filtered
as described, and a message is given.  If none of the
samples in \code{se} have rows in \code{\link{fireMSI}},
an error is thrown.  *OF NOTE:* The MSIsensor data from
Ding's cell paper (see help(dingMSI) for URL) provides the
participant barcode.  The participant barcode is a substring of
the sample barcode.  Be sure to filter the input SummarizedExperiment
to include only tumor samples, using the substr(colnames(se),14,15)
(values "10"..."14" correspond to normal, non-tumor samples.)
Additionally, bindMSI will only work if the colnames of the (filtered)
SummarizedExperiment have been truncated to the participant barcode,
that is, the first 12 characters of the sample barcode.
}
\examples{
bindMSI
}
