Class "AnnotationParams"
AnnotationParams-class.Rd
Class to store annotation parameters to automatically query a Biomart
server, retrieve relevant annotation for a set of features of
interest using, for example getGOFromFeatures
and
makeGoSet
.
Objects from the Class
Objects can be created and set with the setAnnotationParams
function. Object are created by calling without any arguments
setAnnotationParams()
, which will open an interactive
interface. Depending on the value of "many.graphics"
option, a
graphical of a text-based menu will open (the text interface can be
forced by setting the graphics
argument to FALSE
:
setAnnotationParams(graphics = FALSE)
). The menu will allow to
select the species of interest first and the type of features (ENSEMBL
gene identifier, Entrez id, ...) second.
The species that are available are those for which ENSEMBL data is available in Biomart and have a set of attributes of interest available. The compatible identifiers for downstream queries are then automatically filtered and displayed for user selection.
It is also possible to pass a parameter inputs
, a character
vector of length 2 containing a pattern uniquely matching the species
of interest (in position 1) and a patterns uniquely matching the
feature types (in position 2). If the matches are not unique, an error
will be thrown.
A new instance of the AnnotationParams
will be created
to enable easy and automatic query of the Mart
instance. The
instance is invisibly returned and stored in a global variable in the
pRoloc package's private environment for automatic retrieval. If
a variable containing an AnnotationParams
instance is already
available, it can be set globally by passing it as argument to the
setAnnotationParams
function. Globally set
AnnotationParams
instances can be accessed with the
getAnnotationParams
function.
See the pRoloc-theta
vignette for details.
Slots
mart
:Object of class
"Mart"
from the biomaRt package.martname
:Object of class
"character"
with the name of themart
instance.dataset
:Object of class
"character"
with the data set of themart
instance.filter
:Object of class
"character"
with the filter to be used when querying themart
instance.date
:Object of class
"character"
indicating when the current instance was created.biomaRtVersion
:Object of class
"character"
with the biomaRt version used to create theAnnotationParams
instance..__classVersion__
:Object of class
"Versions"
with the version of theAnnotationParams
class of the current instance.
See also
getGOFromFeatures
, makeGoSet
and the
pRoloc-theta
vignette.
Examples
data(andy2011params)
andy2011params
#> Object of class "AnnotationParams"
#> Using the 'ENSEMBL_MART_ENSEMBL' BioMart database
#> Using the 'hsapiens_gene_ensembl' dataset
#> Using 'uniprotswissprot' as filter
#> Created on Sat May 1 08:58:27 2021
data(dunkley2006params)
dunkley2006params
#> Object of class "AnnotationParams"
#> Using the 'plants_mart' BioMart database
#> Using the 'athaliana_eg_gene' dataset
#> Using 'tair_locus' as filter
#> Created on Tue Mar 12 07:25:12 2024
try(setAnnotationParams(inputs = c("nomatch1", "nomatch2")))
#> Error in setAnnotationParams(inputs = c("nomatch1", "nomatch2")) :
#> Couldn't find a unique species match for 'nomatch1'.
setAnnotationParams(inputs = c("Human genes",
"UniProtKB/Swiss-Prot ID"))
#> Using species Human genes (GRCh38.p13)
#> Warning: Ensembl will soon enforce the use of https.
#> Ensure the 'host' argument includes "https://"
#> Using feature type UniProtKB/Swiss-Prot ID(s) [e.g. A0A024R1R8]
#> Connecting to Biomart...
#> Warning: Ensembl will soon enforce the use of https.
#> Ensure the 'host' argument includes "https://"
getAnnotationParams()
#> Object of class "AnnotationParams"
#> Using the 'ENSEMBL_MART_ENSEMBL' BioMart database
#> Using the 'hsapiens_gene_ensembl' dataset
#> Using 'uniprotswissprot' as filter
#> Created on Sat Nov 23 16:03:28 2024