
Create sample-level subgraph topology from a global network
Source:R/get_sample_subgraph_topology.R
get_sample_subgraph_topology.RdFor each sample (each column in mat), OTUs with non-zero abundance
are treated as present (OTU != 0). The function extracts a subgraph
from graph_obj using igraph::subgraph(), then computes topology
for each sample-specific subgraph via get_network_topology().
Usage
get_sample_subgraph_topology(
graph_obj,
mat = NULL,
transfrom.method = c("none", "scale", "center", "log2", "log10", "ln", "rrarefy",
"rrarefy_relative"),
r.threshold = 0.7,
p.threshold = 0.05,
method = c("WGCNA", "SpiecEasi", "SPARCC", "cor"),
cor.method = c("pearson", "kendall", "spearman"),
proc = c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"),
SpiecEasi.method = c("mb", "glasso"),
sparcc_R = 20,
bootstrap = 100
)Arguments
- graph_obj
An graph object from
build_graph_from_matorbuild_graph_from_df.- mat
Numeric matrix used to build
graph_obj. Rows are OTUs and columns are samples.- transfrom.method
Character. Passed to
get_network_topology().- r.threshold
Numeric. Passed to
get_network_topology().- p.threshold
Numeric. Passed to
get_network_topology().- method
Character. Passed to
get_network_topology().- cor.method
Character. Passed to
get_network_topology().- proc
Character. Passed to
get_network_topology().- sparcc_R
Integer. Passed to
get_network_topology()for SparCC p-values. Default 20.- bootstrap
Numeric (default = 100). Passed to
get_network_topology().