getAdjMat: Get the adjacency matrix if the pairwise correlation data is...

View source: R/betaMix.R

getAdjMatR Documentation

Get the adjacency matrix if the pairwise correlation data is stored in a SQL database.

Description

SQL storage should be used if P is large and the calculating and storing the correlation matrix will require too much memory.

Usage

getAdjMat(res, dbname = NULL, ppthr = NULL, signed = FALSE, nodes = NULL)

Arguments

res

The returned value from the betaMix function if the correlation matrix is strored in memory.

dbname

The sqlite database with the pairwise correlations, if the data is not stored in memory (for very large P). Default=NULL.

ppthr

A threshold to select edges. Default=NULL, in which case the returned value from betaMix() is used (available in res).

signed

If TRUE, the returned matrix will contain -1 for negatively correlated pairs. Otherwise, all correlated pairs will have 1 in the returned matrix (Default).

nodes

An optional parameter which allows to create a sparse adjacency matrix containing only the neighbors of the selected nodes (default=NULL).

Examples

## Not run: 
   res <- betaMix(betaMix::SIM, maxalpha = 1e-5,ppr = 0.01,subsamplesize = 30000, ind=TRUE)
   adjMat <- getAdjMat(res)
   image(adjMat[1:80,1:80])
   # See online documentation for usage when SQLite is used.

## End(Not run)

haimbar/betaMix documentation built on Jan. 3, 2023, 12:54 p.m.