parAttractorScanning: Parallelized attractor scanning function

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

View source: R/parAttractorScanning.R

Description

Run attractor scanning on a list of seed genes.

Usage

1
parAttractorScanning(data, taskList=list(1:nrow(data)), wid=1,  a=5, maxIter=100, epsilon=1E-14, bin=6, so=3, rankBased=FALSE, negateMI=TRUE)

Arguments

data

An expression matrix with genes in the rows, samples in the columns.

taskList

List of vectors contains indices of seed genes to be run by each worker.

wid

Worker ID to be assinged the tasks.

a

Exponent of the mutual information, used to create weight vector for metagenes.

maxIter

Max number of iterations.

epsilon

Threshold of convergence.

bin

Number of bins used when estimate mutual information (default=6).

so

Spline order used when estimate mutual information (default=3).

rankBased

When TRUE, convert the expression values into ranks.

negateMI

When TRUE, negate the mutual information if the two vectors have negative momentum.

Details

parAttractorScanning performs CAFrun on a subset of seeds in the dataset. The function takes the tasks as assigned to its worker ID. When applied on a parallel framework such as Sun Grid Engine, it becomes a parallelized version of attractorScanning. The function also reduces the size of seed list in the same way as attractorScanning does, so it is recommended that each worker should be given at least 100 seed genes for efficiency.

The scripts for running parallelized attractor scanning are given in "cafr/parallel" see "README.txt" for more information.

Value

Returns a matrix of size k by m, where m is the number of genes (rows) in the dataset, and k the number of converged attractors. Each row of the matrix is the MI of all the genes with the converged attractor.

Note

Missing values are not allowed as the input to the function in the current version.

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

findAttractor,parAttractorScanning, attractorScanningGL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load the toy dataset extracted from TCGA OV data
data(ov)

# Using the createFolds in the caret package to allocate tasks, assuming
# there are 100 workers
require(caret)
taskList <- createFolds(1:nrow(ov), k=100)

# Take the tasks given to worker 1
as <- parAttractorScanning(ov, taskList=taskList, wid=1)

# display the top 20 genes in first attractor
sort(as[1,], decreasing=TRUE)[1:20]

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