similarity_matrix: Compute similarities between biclusters

similarity_matrixR Documentation

Compute similarities between biclusters

Description

This function computes a similarity matrix between biclusters using different similarity metrics.

Usage

similarity_matrix(
  bics,
  MARGIN = "both",
  metric = 1L,
  prob_scale = FALSE,
  mat_row = 0L,
  mat_col = 0L,
  prl = FALSE
)

Arguments

bics

A list of bicluster objects.

MARGIN

Choose if the distance is computed over "row" , "column" or "both".

metric

Integer indicating which metric is used. 1: Bray-Curtis similarity (default), 2: Jaccard index, 3: overlap coefficient, 4: Fowlkes–Mallows index.

prob_scale

Scale similarity by the probability of an overlap equal of higher to the observed one. The scaling is done by multiplying the similarity with (1 - (1 / (1 - log(overlap_probability, base=100)))). The probability is comupted using the function p_overlap_2d_higher for MARGIN =="both" and p_overlap_higher otherwise. Can be helpful for big imbalances of bicluster sizes.

mat_row

If prob_scale == TRUE, the number of rows of the input matrix for biclustering must be given.

mat_col

If prob_scale == TRUE, the number of columns of the input matrix for biclustering must be given.

prl

Compute the similarity matrix using multiple cores (works only for MARGIN="both"). The number of core can be defined by executing: RcppParallel::setThreadOptions(numThreads = 4) before running this function.

Value

A numeric matrix of the similarities between all given biclusters.

Examples

b <- list(bicluster(row=c(1,2,3,4), column=c(1,2,3,4)),
        bicluster(row=c(3,4,5,6), column=c(3,4,5,6)))
similarity_matrix(b)


tdrose/mosbi documentation built on May 4, 2022, 3:22 p.m.