getAbar: Calculate similarity matrix based on canonical weights.

View source: R/SmCCNet-source.R

getAbarR Documentation

Calculate similarity matrix based on canonical weights.

Description

Compute the similarity matrix based on the outer products of absolute canonical correlation weights, can be used for both single and multi-omics setting.

Usage

getAbar(Ws, FeatureLabel = NULL)

Arguments

Ws

A canonical correlation weight vector or matrix. If Ws is a matrix, then each column corresponds to one weight vector.

FeatureLabel

A vector of feature labels for each feature in the adjacency matrix

Value

A p\times p symmetric non-negative matrix.

Examples


w <- matrix(rnorm(6), nrow = 3)
Ws <- apply(w, 2, function(x)return(x/sqrt(sum(x^2))))
abar <- getAbar(Ws,  FeatureLabel = c('omics1', 'omics2', 'omics3'))


KechrisLab/SmCCNet documentation built on April 18, 2024, 9:46 p.m.