diffuse_mc: Compute the heatrank using permutations

Description Usage Arguments Value Examples

View source: R/diffuse_mc.R

Description

Function diffuse_mc has an implemented parallelisation of the Monte Carlo trials for diffusion in a network. The input scores are assumed to be sparse and are internally sparsified, so very dense scores migth take time with current implementation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
diffuse_mc(
    graph,
    scores,
    n.perm = 10000,
    sample.prob = NULL,
    seed = 1,
    oneminusHeatRank = TRUE,
    K = NULL,
    ...
)

Arguments

graph

igraph object

scores

Recursive list, can have either binary or quantitative scores

n.perm

Numeric, number of permutations

sample.prob

Numeric, probabilities (needn't be scaled) to permute the input. This is passed to sample's prob argument. If NULL, sampling is uniform. It has to be in a list format, with the same names as scores, and each element of the list must be the sampling probability of each background.

seed

Numeric, seed for random number generator

oneminusHeatRank

Logical, should 1 - heatrank be returned instead of heatrank?

K

Kernel matrix (if precomputed). If K is not supplied, the regularised Laplacian will be computed on the fly and used.

...

currently ignored arguments

Value

A list containing matrices of heatrank scores

Examples

1
2
3
4
5
6
# Using a list as input (needed)
data(graph_toy)
list_input <- list(myInput1 = graph_toy$input_mat)
diff_mc <- diffuse_mc(
    graph = graph_toy,
    scores = list_input)

b2slab/diffuStats documentation built on Feb. 26, 2021, 2 p.m.