View source: R/mle.blowoutPtSim.r
| mle.blowoutSim | R Documentation | 
Module that best explains the patient similarity assigned between a set of patients.
mle.blowoutSim(patientSim, data_mx, ptIDs, ig_pruned, kmx)
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.  | 
ptsim_blowout - An igraph object showing the module blowout describing the similarity between patients in ptIDs.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.