git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/MineICA@73179 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,105 @@ |
1 |
+\name{annotInGene} |
|
2 |
+\alias{annotInGene} |
|
3 |
+\title{Features annotation of an object of class IcaSet.} |
|
4 |
+\usage{ |
|
5 |
+ annotInGene(icaSet, params, annot = TRUE) |
|
6 |
+} |
|
7 |
+\arguments{ |
|
8 |
+ \item{icaSet}{An object of class \code{\link{IcaSet}} to |
|
9 |
+ be annotated, must contain a valid \code{annotation} |
|
10 |
+ attribute.} |
|
11 |
+ |
|
12 |
+ \item{params}{An object of class |
|
13 |
+ \code{\link{MineICAParams}} containing the parameters of |
|
14 |
+ the analysis.} |
|
15 |
+ |
|
16 |
+ \item{annot}{TRUE (default) if the IcaSet object must |
|
17 |
+ indeed be annotated} |
|
18 |
+} |
|
19 |
+\value{ |
|
20 |
+ The modified argument \code{icaSet}, with filled |
|
21 |
+ attributes \code{SByGene} and \code{datByGene}. |
|
22 |
+} |
|
23 |
+\description{ |
|
24 |
+ This function annotates the features of an |
|
25 |
+ \code{\link{IcaSet}} object and fills its attributes |
|
26 |
+ \code{SByGene} and \code{datByGene}. |
|
27 |
+} |
|
28 |
+\details{ |
|
29 |
+ When attribute \code{annotation} of \code{icaSet} is not |
|
30 |
+ specified (of length \code{0}), \code{biomaRt} is used to |
|
31 |
+ annotate the features through function |
|
32 |
+ \code{\link{annotFeaturesWithBiomaRt}}. |
|
33 |
+ |
|
34 |
+ When specified, attribute \code{annotation} of argument |
|
35 |
+ \code{icaSet} must be an annotation package and will be |
|
36 |
+ used to annotate the \code{featureNames} of |
|
37 |
+ \code{icaSet}. In addition, the attribute \code{typeID} |
|
38 |
+ (a vector) of argument \code{icaSet} must contain a valid |
|
39 |
+ element \code{geneID_annotation} that determines the |
|
40 |
+ object of the package to be used for the annotation, see |
|
41 |
+ \code{\link{IcaSet}}. |
|
42 |
+ |
|
43 |
+ When argument \code{annot} is TRUE, this function fills |
|
44 |
+ the attributes \code{SByGene} and \code{datByGene} of |
|
45 |
+ \code{icaSet}. When several feature IDs are available for |
|
46 |
+ a same gene ID, the median value of the corresponding |
|
47 |
+ features IDs is attributed to the gene (the median of the |
|
48 |
+ projection values is used for attribute \code{SByGene}, |
|
49 |
+ and the median of the expression values is used for |
|
50 |
+ attribute \code{datByGene}). |
|
51 |
+ |
|
52 |
+ When attribute \code{chipManu} of the argument |
|
53 |
+ \code{icaSet} is "illumina", the features are first |
|
54 |
+ converted into nuID using the package 'lumi*Mapping' and |
|
55 |
+ then annotated into genes. In that case, features can |
|
56 |
+ only be annotated in ENTREZID or SYMBOL. It means that |
|
57 |
+ \code{typeID(icaSet)['geneID_annotation']} must be either |
|
58 |
+ 'ENTREZID' or 'SYMBOL'. You will need to annotate |
|
59 |
+ yourself the IcaSet object if you want to use different |
|
60 |
+ IDs. |
|
61 |
+} |
|
62 |
+\examples{ |
|
63 |
+#load data |
|
64 |
+data(icaSetCarbayo) |
|
65 |
+require(hgu133a.db) |
|
66 |
+ |
|
67 |
+# run annotation of the features into gene Symbols as specified in 'typeID(icaSetCarbayo)["geneID_annotation"]', |
|
68 |
+# using package hgu133a.db as defined in 'annotation(icaSetMainz)' |
|
69 |
+icaSetCarbayo <- annotInGene(icaSet=icaSetCarbayo, params=buildMineICAParams()) |
|
70 |
+ |
|
71 |
+\dontrun{ |
|
72 |
+#load data |
|
73 |
+library(breastCancerMAINZ) |
|
74 |
+data(mainz) |
|
75 |
+#run ICA |
|
76 |
+resJade <- runICA(X=exprs(mainz), nbComp=5, method = "JADE", maxit=10000) |
|
77 |
+ |
|
78 |
+#build params |
|
79 |
+params <- buildMineICAParams(resPath="mainz/") |
|
80 |
+ |
|
81 |
+#build a new IcaSet object, omitting annotation of the features (runAnnot=FALSE) |
|
82 |
+#but specifying the element "geneID_annotation" of argument 'typeID' |
|
83 |
+icaSetMainz <- buildIcaSet(params=params, A=data.frame(resJade$A), S=data.frame(resJade$S), |
|
84 |
+ dat=exprs(mainz), pData=pData(mainz), |
|
85 |
+ annotation="hgu133a.db", typeID= c(geneID_annotation = "SYMBOL", |
|
86 |
+ geneID_biomart = "hgnc_symbol", featureID_biomart = "affy_hg_u133a"), |
|
87 |
+ chipManu = "affymetrix", runAnnot=FALSE, |
|
88 |
+ mart=useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")) |
|
89 |
+ |
|
90 |
+#Attributes SByGene is empty and attribute datByGene refers to assayData |
|
91 |
+SByGene(icaSetMainz) |
|
92 |
+head(datByGene(icaSetMainz)) |
|
93 |
+ |
|
94 |
+# run annotation of the features into gene Symbols as specified in 'typeID(icaSetMainz)["geneID_annotation"]', |
|
95 |
+# using package hgu133a.db as defined in 'annotation(icaSetMainz)' |
|
96 |
+icaSetMainz <- annotInGene(icaSet=icaSetMainz, params=params) |
|
97 |
+} |
|
98 |
+} |
|
99 |
+\author{ |
|
100 |
+ Anne Biton |
|
101 |
+} |
|
102 |
+\seealso{ |
|
103 |
+ \code{\link{annotFeaturesComp}} |
|
104 |
+} |
|
105 |
+ |