knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

This vignette describes basic usage of the version 1 dynamicNetworkID package. The package is currently available on github.com.

Installation and data

# install the package
library(devtools)
install_github("WarrenDavidAnderson/dynamicNetworkID")
library(dynamicNetworkID)

# load sample data
data(multiorgan)

Implement network identification

# scale the data to the 0-1 range
datHMF <- scale_zeroOne(multiorgan, center="mean")

# implement the analysis
result = HMF_fit(datHMF,N_mRanges=2,dt=0.1,alpha=c(0.2,0.6))

Plot effects of regularization parameters

library(ggplot2)
ggplot(result$errors, aes(x=log(lambda_value), y=log(error), color=alpha_value)) + 
  geom_point(size=5) + xlim(-16, 6) + ylim(0, 35)

Plot parameter heatmap

library(NMF)
aheatmap(result$best_params,Rowv=NA,Colv=NA,breaks=c(0))

Save simulation plots

pdf("fits.pdf")
par(mfrow=c(2,3))
sim_plots(multiorgan, result$best_sim)
dev.off()


WarrenDavidAnderson/dynamicNetworkID documentation built on May 23, 2019, 4:23 p.m.