null_distri: Null distribution of dissimilarity measures

Description Usage Arguments Value Examples

View source: R/HierBipartite.R

Description

Generates null distribution of dissimilarity measures between group 1 (X1, Y1) and group 2 (X2, Y2).

Usage

1
null_distri(X1, Y1, X2, Y2, n.perm = 100, parallel = FALSE, maxCores = 7)

Arguments

X1

an n x p matrix of variable set 1 (e.g. gene expression) from group 1

Y1

an n x q matrix of variable set 2 (e.g. drug sensitivity) from group 1

X2

an n x p matrix of variable set 1 (e.g. gene expression) from group 2

Y2

an n x q matrix of varaible set 2 (e.g. drug sensitivity) from group 2

n.perm

number of null dissimilarity measures to generate

parallel

boolean for whether to parallelize permutation

maxCores

maximum number of cores to use (only applicable when parallel = TRUE)

Value

vector of length n.perm of null dissimilarity measures

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Get data for group squamous cell carcinoma, esophagus and for group
# squamous cell carcinoma, upper aerodigestive
data(ctrp2)

groups = ctrp2$groups
X = ctrp2$X
Y = ctrp2$Y

x1 = X[groups[["squamous_cell_carcinoma_esophagus"]], ]
y1 = Y[groups[["squamous_cell_carcinoma_esophagus"]], ]

x2 = X[groups[["squamous_cell_carcinoma_upper_aerodigestive"]], ]
y2 = Y[groups[["squamous_cell_carcinoma_upper_aerodigestive"]], ]

## Not run: 
dissimilarities = null_distri(x1, y1, x2, y2, n.perm = 100)

## End(Not run)

hierBipartite documentation built on Feb. 16, 2021, 5:07 p.m.