posthoc.edge: Obtain the edgewise post-hoc interpretability metrics

View source: R/posthoc.edge.R

posthoc.edgeR Documentation

Obtain the edgewise post-hoc interpretability metrics

Description

The 'posthoc.edge' function calculates the edgewise interpretation metrics on a set of edges selected by a generic network classifier such as 'graphclass::graphclass'.

Usage

posthoc.edge(
  selected.edgeLabels,
  all.edgeLabels,
  geneSetList,
  geneExpr,
  get.jaccard = TRUE,
  jaccard.cutoff = 0.99,
  get.betweenness = TRUE,
  betweenness.cutoff = 0.75,
  iter = 200,
  adjust.p = TRUE,
  ...
)

Arguments

selected.edgeLabels

Lables of edges selected by a generic network classification algorithm.

all.edgeLabels

All edges (features) included in the classification to be evaluated.

geneSetList

Reference gene set collection. What type of gene sets do you wish to interpret selected functional edges by?

geneExpr

Gene expression data, which is represented as a ROI-by-gene data frame or matrix. ROI stands for region of interest, which corresponds to each node in the networks of classification.

get.jaccard

Logical. Whether to return the Jaccard index metrics.

jaccard.cutoff

Hard-thresholding cutoff to calculate the Jaccard index metric. See references for details.

get.betweenness

Logical. Whether to return the edge betweenness centrality metrics.

betweenness.cutoff

Hard-thresholding cutoff to calculate the edge betweenness centrality metric. See references for details.

iter

Number of random draws for constructing the null distribution of each metric.

adjust.p

Logical. Whether or not to return adjusted p-values.

...

Value

Evalutaion metrics stored in a data frame.

References

Li, M., Kessler, D., Arroyo, J., Freytag, S., Bahlo, M., Levina, E., & Yang, J. Y. H. (2020). Guiding and interpreting brain network classification with transcriptional data. bioRxiv.

Csardi, G., & Nepusz, T. (2006). The igraph software package for complex network research. InterJournal, complex systems, 1695(5), 1-9.

Examples

## NOT RUN
# ## For example, interpretability of glmnet selected edges by KEGG pathways
# data(ahba)
# data(gscv7.0)
# library(graphclass)
# data(COBRE.data)
# X_cobre <- COBRE.data$X.cobre; y_cobre <- COBRE.data$Y.cobre
# colnames(X_cobre) <- getEdgeLabel(node = c(1:74, 76:264))
#
# library(glmnet)
# cvfit <- cv.glmnet(X_cobre, y_cobre, family = "binomial", nfolds = 10)
# selectedEdges <- coef(cvfit, s = "lambda.min")
# selectedEdges <- names(selectedEdges[selectedEdges@i + 1, ])[-1]
# metrics <- posthoc.edge(selected.edgeLabels = selectedEdges,
# all.edgeLabels = colnames(X_cobre), geneSetList = gscv7.0$kegg,
# geneExpr = ahba,iter = 100)


Mengbo-Li/brainClass documentation built on March 16, 2023, 12:06 p.m.