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'))


SmCCNet documentation built on May 29, 2024, 10:49 a.m.