% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/goannotations.R
\name{addGoAnnotations}
\alias{addGoAnnotations}
\title{Add GO annotations}
\usage{
addGoAnnotations(object, params, evidence, useID = FALSE,
  fcol = "GOAnnotations", ...)
}
\arguments{
\item{object}{An instance of class \code{MSnSet}.}

\item{params}{An instance of class \code{AnnotationParams}. 
If missing, \code{\link{getAnnotationParams}} will be used.}

\item{evidence}{GO evidence filtering.}

\item{useID}{Logical. Should GO term names or identifiers be used?
If \code{TRUE}, identifiers will be used. If \code{FALSE} GO term 
names will be used.}

\item{fcol}{Character. Name of the matrix of annotations to be added to the 
\code{fData} default is \code{GOAnnotations}}

\item{...}{Other arguments passed to \code{makeGoSet}}
}
\value{
An updated \code{MSnSet} with new feature data column
called \code{GOAnnotations} containing a matrix of GO
annotations
}
\description{
Adds GO annotations to the feature data
}
\examples{
library(pRolocdata)
data(dunkley2006)
par <- setAnnotationParams(inputs =
                   c("Arabidopsis thaliana genes",
                   "Gene stable ID"))
## add protein sets/annotation information
xx <- addGoAnnotations(dunkley2006, par)
dim(fData(xx)$GOAnnotations)

## filter sets
xx <- filterMinMarkers(xx, n = 50)
dim(fData(xx)$GOAnnotations)
xx <- filterMaxMarkers(xx, p = .25)
dim(fData(xx)$GOAnnotations)

## Subset for specific protein sets
sub <- subsetMarkers(xx, keep = c("vacuole"))

## Order protein sets
res <- orderGoAnnotations(xx, k = 1:3, p = 1/3, verbose = FALSE)
if (interactive()) {
pRolocVis(res, fcol = "GOAnnotations")
}
}
\author{
Lisa M Breckels
}
