Description Usage Arguments Value Examples
View source: R/HierBipartite.R
Constructs edge weight matrix B representing association between set of variables in mat1 and set of variables in mat2 (see paper).
1 2 3 4 5 6 7 8 | constructBipartiteGraph(
mat1,
mat2,
n_subsample = 1,
subsampling_ratio = 1,
parallel = FALSE,
maxCores = 7
)
|
mat1 |
an n x p matrix of variable set 1 (e.g. gene expression) |
mat2 |
an n x q matrix of variable set 2 (e.g. drug sensitivity) |
n_subsample |
number of times to perform subsampling to generate B |
subsampling_ratio |
fraction of samples to subsample each time |
parallel |
boolean for whether to parallelize subsampling |
maxCores |
maximum number of cores to use (only applicable when parallel = TRUE) |
a p x q matrix of bipartite graph edge weights
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Extract bipartite edge weight matrix B for cell lines from the
# squamous cell carcinoma, esophagus group
data(ctrp2)
groups = ctrp2$groups
X = ctrp2$X
Y = ctrp2$Y
x = X[groups[["squamous_cell_carcinoma_esophagus"]], ]
y = Y[groups[["squamous_cell_carcinoma_esophagus"]], ]
# Extract bipartite edge weight matrix B with subsampling
## Not run:
B = constructBipartiteGraph(x, y, n_subsample = 100,
subsampling_ratio = 0.90,
parallel = TRUE, maxCores = 2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.