buildIcaSet: This function builds an object of class 'IcaSet'.

View source: R/functions.R

buildIcaSetR Documentation

This function builds an object of class IcaSet.

Description

This function builds an object of class IcaSet.

Usage

  buildIcaSet(params, A, S, dat, pData = new("data.frame"),
    fData = new("data.frame"), witGenes = new("character"),
    compNames = new("character"),
    refSamples = new("character"),
    annotation = new("character"),
    chipManu = new("character"),
    chipVersion = new("character"), alreadyAnnot = FALSE,
    typeID = c(geneID_annotation = "SYMBOL", geneID_biomart = "hgnc_symbol", featureID_biomart = ""),
    runAnnot = TRUE, organism = "Human",
    mart = new("Mart"))

Arguments

params

An object of class MineICAParams containing the parameters of the analysis

A

The mixing matrix of the ICA decomposition (of dimension samples x components).

S

The source matrix of the ICA decomposition (of dimension features x components).

dat

The data matrix the ICA was applied to (of dimension features x samples).

pData

Phenotype data, a data.frame which contains the sample informations of dimension samples x annotations.

fData

Feature data, a data.frame which contrains the feature descriptions of dimensions features x annotations.

witGenes

A vector of witness genes. They are representative of the expression behavior of the contributing genes of each component. If missing or NULL, they will be automatically attributed using function selectWitnessGenes.

compNames

A vector of component labels.

refSamples

A vector of reference sample IDs (e.g the "normal" samples).

annotation

An annotation package (e.g a ".db" package specific to the microarray used to generate dat)

chipManu

If microarray data, the manufacturer: either 'affymetrix' or 'illumina'.

chipVersion

For illumina microarrays: the version of the microarray.

alreadyAnnot

TRUE if the feature IDs contained in the row names of dat and S already correspond to the final level of annotation (e.g if they are already gene IDs). In that case, no annotation is performed.

typeID

A character vector specifying the annotation IDs, it includes three elements :

geneID_annotation

the IDs from the package to be used to annotate the features into genes. It will be used to fill the attributes datByGene and SByGene of the icaSet. It must match one of the objects the corresponding package supports (you can access the list of objects by typing ls("package:packagename")). If no annotation package is provided, this element is not useful.

geneID_biomart

the type of gene IDs, as available in listFilters(mart); where mart is specified as described in useMart. If you have directly built the IcaSet at the gene level (i.e if no annotation package is used), featureID_biomart and geneID_biomart will be identical.

featureID_biomart

the type of feature IDs, as available in listFilters(mart); where mart is specified as described in function useMart. Not useful if you work at the gene level.

runAnnot

If TRUE, icaSet is annotated with function annotInGene.

organism

The organism the data correspond to.

mart

The mart object (database and dataset) used for annotation, see function useMart of package biomaRt

Value

An object of class IcaSet

Author(s)

Anne Biton

See Also

selectWitnessGenes, annotInGene

Examples

dat <- data.frame(matrix(rnorm(10000),ncol=10,nrow=1000))
rownames(dat) <- paste("g", 1:1000, sep="")
colnames(dat) <- paste("s", 1:10, sep="")

## build a data.frame containing sample annotations
annot <- data.frame(type=c(rep("a",5),rep("b",5)))
rownames(annot) <- colnames(dat)

## run ICA
resJade <- runICA(X=dat, nbComp=3, method = "JADE")

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

## build IcaSet object
icaSettoy <- buildIcaSet(params=params, A=data.frame(resJade$A), S=data.frame(resJade$S),
                         dat=dat, pData=annot, alreadyAnnot=TRUE)
params <- icaSettoy$params
icaSettoy <- icaSettoy$icaSet

## Not run: 
## load data
library(breastCancerMAINZ)
data(mainz)

## run ICA
resJade <- runICA(X=dataMainz, nbComp=10, method = "JADE", maxit=10000)

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

## build IcaSet object

# fill typeID, Mainz data originate from affymetrix HG-U133a  microarray and are indexed by probe sets
# we want to annotate the probe sets into Gene Symbols
typeIDmainz <-  c(geneID_annotation="SYMBOL", geneID_biomart="hgnc_symbol", featureID_biomart="affy_hg_u133a")

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=TRUE,
                             mart=useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl"))

## End(Not run)

bitona/MineICA documentation built on April 23, 2023, 1:41 p.m.