annotFeaturesComp | R Documentation |
##' This function annotates the features of an object of
class IcaSet
, and fills its attributes
SByGene
and datByGene
.
annotFeaturesComp(icaSet, params,
type = toupper(typeID(icaSet)["geneID_annotation"]),
featureId = typeID(icaSet)["featureID_biomart"],
geneId = typeID(icaSet)["geneID_biomart"])
icaSet |
An object of class |
params |
An object of class
|
type |
The ID of the object of the annotation
package to be used for the annotation, must be available
in |
featureId |
The type of the feature IDs, in the
|
geneId |
The type of the gene IDs, in the
|
This function is called by function
annotInGene
which will check the validity
of the attributes annotation, typeID, chipManu
and
eventually chipVersion
of icaSet
. If
available, the attribute annotation
of argument
icaSet
must be an annotation package and will be
used to annotate the featureNames
of
icaSet
. If attribute annotation
of argument
icaSet
is not available (of length 0),
biomaRt
is used to annotate the features.
This function fills the attributes SByGene
and
datByGene
of the argument icaSet
. When
several feature IDs are available for a same gene ID, the
median value of the corresponding features IDs is
attributed to the gene (the median of projection values
is used for attribute SByGene
, and the median of
expression values is used for attribute
datByGene
).
When attribute chipManu
of the argument
icaSet
is "illumina", the features are first
converted into nuID using the package 'lumi*Mapping' and
then annotated into genes. In that case, features can
only be annotated in ENTREZID or SYMBOL. It means that
typeID(icaSet)['geneID_annotation']
must be either
'ENTREZID' or 'SYMBOL'. You will need to annotate
yourself the IcaSet
object if you want to
use different IDs.
This function returns the argument icaSet
with
attributes SByGene
and datByGene
filled.
Anne Biton
annotFeatures
,
annotFeaturesWithBiomaRt
,
annotInGene
## load an example of IcaSet
data(icaSetCarbayo)
params <- buildMineICAParams()
require(hgu133a.db)
####===================================================
## Use of annotation package contained in annotation(icaSet)
####====================================================
## annotation in SYMBOL
icaSetCarbayo_annot <- annotFeaturesComp(icaSet=icaSetCarbayo, params=params, type="SYMBOL")
# arg 'type' is optional since the function uses contents of typeID(icaSet) as the defaults,
# it is specified in these examples for pedagogy views
## annotation in Entrez Gene
icaSetCarbayo_annot <- annotFeaturesComp(icaSet=icaSetCarbayo, params=params, type="ENTREZID")
## Not run:
####===================================================
## Use of biomaRt, when annotation(icaSet) is of length 0
####====================================================
## empty attribute 'annotation' of the IcaSet object
# when this attribute is not specified, biomaRt is used for annotation
annotation(icaSetCarbayo) <- character()
# make sure the mart attribute is correctly defined
mart(icaSetCarbayo) <- useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")
## make sure elements "featureID_biomaRt" and "geneID_biomaRt" of typeID(icaSet) are correctly filled
# they will be used by function 'annotFeaturesComp' through biomaRt to query the database
typeID(icaSetCarbayo)
## run annotation of HG-U133A probe set IDs into Gene Symbols using biomaRt
icaSetCarbayo_annot <- annotFeaturesComp(icaSet=icaSetCarbayo, params=params)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.