clusterAttractors: Cluster attractors from difference datasets

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/clusterAttractors.R

Description

Cluster attractors from difference datasets based on their overlapping in the top genes.

Usage

1
clusterAttractors(filePath="./", fileNames, numGenes=100, datasetTags=NULL)

Arguments

filePath

A path to the directory where the RData files were saved. Default is the working directory.

fileNames

Names of the RData files to be loaded.

numGenes

Number of genes load into the Attractor object.

datasetTags

A vector of strings of dataset tags. Used to annotate the Attractor objects.

Details

clusterAttractors loads in the attractor matrices from different datasets produced by attractorScanning and clusters attractors from different datasets based on the number of overlapping genes.

Value

A list of AttractorSets and Attractors. Each AttractorSet contains the most similar Attractors from different datasets. Attractors that cannot be clustered are left as they are. The contents in the list are ranked first by how many Attractors are clustered in the set, then by the minimum strength among the Attractors in the set.

Author(s)

Wei-Yi Cheng

References

Wei-Yi Cheng, Tai-Hsien Ou Yang and Dimitris Anastassiou, Biomolecular events in cancer revealed by attractor metagenes, PLoS Computational Biology, Vol. 9, Issue 2, February 2013.

See Also

AttractorSet, Attractor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Not run: 
# Load the toy dataset extracted from TCGA OV data
data(ov)

# find all attractors in the dataset
as.ov <- attractorScanning(ov)
# Save the result as an RData file
save(as.ov, file="./as.ov.rda")

# load Toy version of Wang et al. breast cancer dataset (GSE2034)
data(brca.pbs)

# download the HGU133A 2.0 annotations
source("http://bioconductor.org/biocLite.R")
biocLite("hgu133a2.db")
library(hgu133a2.db)

# Create map object to fit the format
x <- hgu133a2SYMBOL
map <- cbind(unlist(as.list(x[mappedkeys(x)])))
colnames(map) <- "Gene.Symbol"

# summarize into gene-level expression after eliminating uncorrelated probes
brca <- probeSummarization(brca.pbs, map)

as.brca <- attractorScanning(brca)
save(as.brca, file="./as.brca.rda")

# Cluster attractors from these two datasets, because it's a toy dataset
# with much less genes, only load in top 20 genes
alist <- clusterAttractors(fileNames=c("as.ov.rda", "as.brca.rda"), numGenes=20, datasetTags=c("OV", "BRCA"))

# Show the consensus attractor of the strongest attractor cluster
alist[[1]]$getConsensus(sz=10)

# remove the saved files
unlink("./as.ov.rda")
unlink("./as.brca.rda")


## End(Not run)

weiyi-bitw/cafr documentation built on May 4, 2019, 4:18 a.m.