filter_and_summarize: Filter and summarize the results

View source: R/filtering.R

filter_and_summarizeR Documentation

Filter and summarize the results

Description

The communities are clustered based on their jaccard distances and the dendrogram is cut to obtain the same number of communities as are obtained by the effective-count formula. For each of the cut subtree an appropriate bimodule is chosen to represent it.

Usage

filter_and_summarize(
  extract_res,
  plot.dendrogram = FALSE,
  hclust.method = "average",
  logpval.thresh = 0
)

Arguments

extract_res

result$extract_res where result is the returned by the cbce procedure

plot.dendrogram

logical Plot the dendrogram along with the line it is cut at.

hclust.method

The clustering method to use (passed to hclust)

Value

A data frame, each row of which represents the summary of a filtered bimodule. The columns of the frame are:

  • index This is the index of the bimodule in extract_res.

  • x.size, y.size These are the sizes of the X, Y set of the bimodules

  • score The score assigned to the bimodule based on how strong the correlation is (vs. expected).

  • group.size This bimodule is a representative for a group of bimodules of this size.

Examples

## Not run: 
n <- 100
dx <- 50
dy <- 70

X <- matrix(rnorm(n*dx), ncol=dx)
Y <- matrix(rnorm(n*dy), ncol=dy)
res <- cbce2(X, Y)

df <- filter_and_summarize(res$extract_res)
# or just df <- res$filtered_result.df

# The filtered bimodules:
bms <- rlist::list.map(res$extract_res[df$index], bimod) 

## End(Not run)


miheerdew/cbce documentation built on Aug. 28, 2023, 2:18 p.m.