Adds GO annotations to the feature data
Arguments
- object
An instance of class
MSnSet
.- params
An instance of class
AnnotationParams
. If missing,getAnnotationParams
will be used.- evidence
GO evidence filtering.
- useID
Logical. Should GO term names or identifiers be used? If
TRUE
, identifiers will be used. IfFALSE
GO term names will be used.- fcol
Character. Name of the matrix of annotations to be added to the
fData
default isGOAnnotations
- ...
Other arguments passed to
makeGoSet
Value
An updated MSnSet
with new feature data column
called GOAnnotations
containing a matrix of GO
annotations
Examples
library(pRolocdata)
data(dunkley2006)
par <- setAnnotationParams(inputs =
c("Arabidopsis thaliana genes",
"Gene stable ID"))
#> Using species Arabidopsis thaliana genes (TAIR10)
#> Warning: Ensembl will soon enforce the use of https.
#> Ensure the 'host' argument includes "https://"
#> Using feature type Gene stable ID(s) [e.g. AT1G01010]
#> Connecting to Biomart...
#> Warning: Ensembl will soon enforce the use of https.
#> Ensure the 'host' argument includes "https://"
## add protein sets/annotation information
xx <- addGoAnnotations(dunkley2006, par)
dim(fData(xx)$GOAnnotations)
#> [1] 689 79
## filter sets
xx <- filterMinMarkers(xx, n = 50)
#> Retaining 3 out of 79 in GOAnnotations
dim(fData(xx)$GOAnnotations)
#> [1] 689 3
xx <- filterMaxMarkers(xx, p = .25)
#> Retaining 2 out of 3 in GOAnnotations
dim(fData(xx)$GOAnnotations)
#> [1] 689 2
## Subset for specific protein sets
sub <- subsetMarkers(xx, keep = c("vacuole"))
#> Warning: GO markers vacuole not found
## Order protein sets
res <- orderGoAnnotations(xx, k = 1:3, p = 1/3, verbose = FALSE)
#> Calculating GO cluster densities
if (interactive()) {
pRolocVis(res, fcol = "GOAnnotations")
}