glcm.net: Construct network grey-level co-occurrence matrices (GLCMs)

View source: R/render-texture.R

glcm.netR Documentation

Construct network grey-level co-occurrence matrices (GLCMs)

Description

Construct network grey-level co-occurrence matrices (GLCMs)

Usage

glcm.net(
  mtr,
  net,
  rnm,
  t_level = 3,
  min_n = 5,
  by = c("non", "row", "col"),
  scope = c("within-pathway", "boundary-expanded")
)

Arguments

mtr

Numeric gene-by-sample matrix.

net

Network with a named adjacency list in links.

rnm

Genes defining one functional gene set or pathway.

t_level

Number of binary grey-level bits.

min_n

Minimum number of mapped genes required for the pathway. The function returns NULL below this threshold; texture.render() retains the pathway row and fills it with NA scores.

by

Rank-normalization direction.

scope

Graph scope: "within-pathway" uses within-set edges; "boundary-expanded" also uses boundary edges to one-hop neighbors.

Value

A named list with one normalized square GLCM per sample. Matrix cells contain symmetrized co-occurrence probabilities and sum to one. Returns NULL when fewer than min_n pathway genes map; an empty list indicates insufficient scoped edges.

See Also

haralick.net(), texture.render()

Examples

profiles <- matrix(c(1, 5, 2, 4, 3, 3, 4, 2), nrow = 4,
  dimnames = list(letters[1:4], c("sample_1", "sample_2")))
net <- list(links = list(a = "b", b = c("a", "c"),
  c = c("b", "d"), d = "c"), Ntotal = 3)
glcm <- glcm.net(profiles, net, c("a", "b", "c"),
  min_n = 3, scope = "within-pathway")
names(glcm)

NEArender documentation built on Nov. 28, 2026, 5:10 p.m.