View source: R/render-texture.R
| texture.render | R Documentation |
From a matrix of continuous gene or protein values, calculate selected
Haralick texture features for a collection of pathways. Haralick et al.
(1973) developed the method for regular image grids; this implementation
evaluates co-occurrence between adjacent nodes in irregular pathway-scale
subnetworks extracted from the global network. Subset fgs before calling
when only some sets are required.
texture.render(
fgs,
mtr,
net,
t_level = 3,
min_ngenes = 5,
norm_dir = c("row", "col", "non"),
features = c("asm", "con", "cor", "den", "dva", "ent", "f12", "f13", "idm", "pro",
"sav", "sen", "sha", "sva", "var"),
scope = c("within-pathway", "boundary-expanded"),
case_sensitive = FALSE,
n_cores = 1L,
verbose = TRUE
)
fgs |
Named list of functional gene sets whose subnetworks are extracted from the global network. Subset it before calling when needed. |
mtr |
Numeric gene-by-sample matrix. |
net |
Network with a named adjacency list in |
t_level |
Number of binary grey-level bits. |
min_ngenes |
Minimum mapped genes per set. |
norm_dir |
Rank-normalization direction. |
features |
Unique requested Haralick feature identifiers. The default explicitly lists all 15 implemented features. |
scope |
Graph scope: |
case_sensitive |
Use case-sensitive identifier matching. |
n_cores |
Positive integer number of worker processes. Independent functional gene sets are distributed across workers when greater than one. |
verbose |
Report progress with |
Each sample is discretized to 2^t_level grey levels before a
pathway GLCM is constructed. norm_dir controls whether ranking is
performed by gene, by sample, or over the full selected matrix. The
renderer calculates descriptive texture features; it does not calculate
p- or q-values.
A nearender_result. scores contains one
pathway-by-sample matrix for every requested Haralick feature, in request
order; statistics contains the same master score matrices under the same
names. Pathways below min_ngenes retain a row filled with NA.
diagnostics$fgs_network_sizes reports the number of mapped network
genes for every pathway, while parameters records scope,
discretization, normalization direction, case policy, and workers.
features accepts the following identifiers:
asmangular second moment (energy)
concontrast
corcorrelation
dendifference entropy
dvadifference variance
ententropy
f12first information measure of correlation
f13second information measure of correlation
idminverse difference moment (homogeneity)
procluster prominence
savsum average
sensum entropy
shacluster shade
svasum variance
varvariance
Haralick RM, Shanmugam K, Dinstein I (1973). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1109/TSMC.1973.4309314")}.
Kobayashi K et al. (2015). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s10086-015-1507-6")}.
Alexeyenko A (2026). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.64898/2026.07.12.737672")}.
glcm.net(), haralick.net(), haralick.matrix(),
spectral.render(), gsva.render()
profiles <- matrix(c(1, 5, 2, 4, 3, 3, 4, 2), nrow = 4,
dimnames = list(letters[1:4], c("sample_1", "sample_2")))
fgs <- list(pathway = c("a", "b", "c"))
net <- list(links = list(a = "b", b = c("a", "c"),
c = c("b", "d"), d = "c"), Ntotal = 3)
texture <- texture.render(fgs, profiles, net, min_ngenes = 3,
features = c("asm", "con"), scope = "within-pathway",
verbose = FALSE)
texture$scores$asm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.