Description Usage Arguments Details Value Author(s) Examples
View source: R/contractedProfile.R
Converts an object of class 'ExpandedGOProfile', or assimilable to it, in an object of class 'BasicGOProfile'
1 2 3 4 5 | contractedProfile(prof, nams = NULL)
## S3 method for class 'ExpandedGOProfile'
contractedProfile(prof, nams = NULL)
## Default S3 method:
contractedProfile(prof, nams = NULL)
|
prof |
an expanded GO profile, i.e. and object of class 'ExpandedGOProfile', or a numeric vector assimilable to an expanded profile, see the "details" section |
nams |
optionally, the names of the annotated combinations of GO nodes whose frequency is represented in the expanded profile, see the "details" section |
Given a list of n genes, and a set of s GO nodes X, Y, Z, ... in a given ontology (BP, MF or CC), its associated (contracted) "profile" is the frequencies vector (either absolute or relative frequencies) of annotations or hits of the n genes in each node. For a given node, say X, this frequency includes all annotations for X alone, for X and Y, for X and Z and so on. Thus, as relative frequencies, its sum is not necessarily one, or as absolute frequencies their sum is not necessarily n. Basic contracted profiles are represented by objects of S3 class 'BasicGOProfile'. On the other hand, an "expanded profile" corresponds to the frequencies in ALL OBSERVED NODE COMBINATIONS. That is, if n genes have been profiled, the expanded profile stands for the frequency of all hits EXCLUSIVELY in nodes X, Y, Z, ..., jointly with all hits simultaneously in nodes X and Y (and only in X and Y), simultaneously in X and Z, in Y and Z, ... , in X and Y and Z (and only in X,Y,Z), and so on. Thus, their sum is one. Expanded profiles are represented by objects of S3 class 'ExpandedGOProfile'. The generic function 'contractedProfile' "contracts" an expanded profile, either represented by a 'ExpandedGOProfile' object or a numeric vector interpretable as an expanded profile, in order to obtain its contracted profile representation.
The rownames
attribute of an 'ExpandedGOProfile' or, equivalently, the
names
attribute of a vector representing an expanded profile, or the
nams
argument, must represent the GO nodes combinations separating the
node names with dots, ".", for example: "X", "Y", "Z", "X.Y", "X.Z", "Y.Z",
"X.Y.Z" and so on.
An object of class 'BasicGOProfile' the contracted profile representation of the expanded profile
Jordi Ocana
1 2 3 4 5 6 7 8 | data(prostateIds)
expandedWelsh <- expandedProfile(welsh01EntrezIDs[1:100], onto="MF",
level=2, orgPackage="org.Hs.eg.db")
reContractedWelsh <- contractedProfile(expandedWelsh[["MF"]])
print(expandedWelsh)
print(reContractedWelsh)
class(reContractedWelsh)
ngenes(reContractedWelsh)
|
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colMeans, colSums, colnames, do.call,
duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
setdiff, sort, table, tapply, union, unique, unsplit, which,
which.max, which.min
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following object is masked from 'package:base':
expand.grid
Loading required package: GO.db
$MF
V1
4 0.01041667
7 0.01041667
9 0.42708333
20 0.01041667
3.9 0.03125000
4.9 0.10416667
7.9 0.12500000
8.9 0.01041667
8.20 0.01041667
9.20 0.03125000
2.3.9 0.01041667
4.5.9 0.01041667
4.7.9 0.02083333
4.8.9 0.02083333
4.9.20 0.01041667
5.8.9 0.01041667
5.9.19 0.02083333
5.9.20 0.01041667
7.9.20 0.01041667
8.9.19 0.01041667
2.3.4.9 0.01041667
4.5.9.19 0.03125000
4.8.9.20 0.01041667
4.9.13.20 0.01041667
5.8.9.20 0.01041667
4.5.9.19.20 0.01041667
4.8.9.19.20 0.01041667
Description GOID Frequency
4 4 25
7 7 16
9 9 92
20 20 13
3 3 5
8 8 9
2 2 2
5 5 10
19 19 8
13 13 1
[1] "BasicGOProfile" "data.frame"
[1] 96
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.