annotInGene {MineICA} | R Documentation

## Features annotation of an object of class IcaSet.

### Description

This function annotates the features of an `IcaSet` object and fills its attributes `SByGene` and `datByGene`.

### Usage

      annotInGene(icaSet, params, annot = TRUE)

### Arguments

`icaSet` | An object of class `IcaSet` to be annotated, must contain a valid `annotation` attribute.
`params` | An object of class `MineICAParams` containing the parameters of the analysis.
`annot` | TRUE (default) if the IcaSet object must indeed be annotated

### Details

When attribute `annotation` of `icaSet` is not specified (of length `0`), `biomaRt` is used to annotate the features through function `annotFeaturesWithBiomaRt`.

When specified, attribute `annotation` of argument `icaSet` must be an annotation package and will be used to annotate the `featureNames` of `icaSet`. In addition, the attribute `typeID` (a vector) of argument `icaSet` must contain a valid element `geneID_annotation` that determines the object of the package to be used for the annotation, see `IcaSet`.

When argument `annot` is TRUE, this function fills the attributes `SByGene` and `datByGene` of `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 the projection values is used for attribute `SByGene`, and the median of the 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.

### Value

The modified argument `icaSet`, with filled attributes `SByGene` and `datByGene`.

### Author(s)

Anne Biton

### See Also

`annotFeaturesComp`

### Examples

    #load data
    data(icaSetCarbayo)
    require(hgu133a.db)

    # run annotation of the features into gene Symbols as specified in 'typeID(icaSetCarbayo)["geneID_annotation"]',
    # using package hgu133a.db as defined in 'annotation(icaSetMainz)'
    icaSetCarbayo <- annotInGene(icaSet=icaSetCarbayo, params=buildMineICAParams())

    ## Not run:
    #load data
    library(breastCancerMAINZ)
    data(mainz)
    #run ICA
    resJade <- runICA(X=exprs(mainz), nbComp=5, method = "JADE", maxit=10000)

    #build params
    params <- buildMineICAParams(resPath="mainz/")

    #build a new IcaSet object, omitting annotation of the features (runAnnot=FALSE)
    #but specifying the element "geneID_annotation" of argument 'typeID'
    icaSetMainz <- buildIcaSet(params=params, A=data.frame(resJade$A), S=data.frame(resJade$S),
                                 dat=exprs(mainz), pData=pData(mainz),
                                 annotation="hgu133a.db", typeID= c(geneID_annotation = "SYMBOL",
                                 geneID_biomart = "hgnc_symbol", featureID_biomart = "affy_hg_u133a"),
                                 chipManu = "affymetrix", runAnnot=FALSE,
                                 mart=useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl"))

    #Attributes SByGene is empty and attribute datByGene refers to assayData
    SByGene(icaSetMainz)
    head(datByGene(icaSetMainz))

    # run annotation of the features into gene Symbols as specified in 'typeID(icaSetMainz)["geneID_annotation"]',
    # using package hgu133a.db as defined in 'annotation(icaSetMainz)'
    icaSetMainz <- annotInGene(icaSet=icaSetMainz, params=params)

    ## End(Not run)

[Package MineICA version 1.32.0 Index]