mle.blowoutSim: Module that best explains the patient similarity assigned...

View source: R/mle.blowoutPtSim.r

mle.blowoutSimR Documentation

Module that best explains the patient similarity assigned between a set of patients.

Description

Module that best explains the patient similarity assigned between a set of patients.

Usage

mle.blowoutSim(patientSim, data_mx, ptIDs, ig_pruned, kmx)

Arguments

patientSim

- A similarity matrix, where row and columns are patient identifiers.

data_mx

- The matrix that gives the perturbation strength (z-scores) for all variables (columns) for each patient (rows).

ptIDs

- The identifier associated with patient 1's sample.

ig_pruned

- The list of igraph objects associated with the integrated, pruned disease+reference differential interaction networks.

kmx

- The maximum metabolite set size probed when assessing patient similarity.

Value

ptsim_blowout - An igraph object showing the module blowout describing the similarity between patients in ptIDs.

Examples

require(CTD)
data(Thistlethwaite2019)
data_mx = as.matrix(data_mx)
data_mx = suppressWarnings(apply(data_mx, c(1,2), as.numeric))
data_mx = data_mx[,-c(1,2,3,4,5,6,7,8)]
# Load your background network, ig_pruned and your computed patientSim matrix
kmns.clust = kmeans(patientSim, centers=4)
table(kmns.clust$cluster)
ptIDs = names(kmns.clust$cluster[which(kmns.clust$cluster==1)])
ptsim_blowout = mle.blowoutSim(patientSim, data_mx, ptIDs, ig_pruned, kmx=15)
plot.igraph(ptsim_blowout, layout=layout.circle, edge.width=50*abs(E(ptsim_blowout)$weight))

BRL-BCM/CTDext documentation built on May 7, 2022, 5:31 a.m.