knitr::opts_chunk$set(echo = FALSE) library(amlresistancenetworks) require(dplyr)
gilt.data<-readRDS(system.file('gilteritinibData.Rds',package='amlresistancenetworks')) #rcalculate differences and p-values early.data<-gilt.data%>% subset(treatment%in%(c('None','Early Gilteritinib')))%>% dplyr::select(Gene,Sample,CellLine,ligand,value)%>% rename(ligand='treatment') total.mean.diffs<-amlresistancenetworks::computeFoldChangePvals(early.data,control='None',conditions=c("FL","FGF2"))%>% subset(p_adj<0.05) late.data<-gilt.data%>% subset(treatment%in%(c('None','Late Gilteritinib')))%>% subset(ligand=='None')%>% dplyr::select(Gene,Sample,CellLine,treatment,value) late.diffs<-amlresistancenetworks::computeFoldChangePvals(late.data,control='None',conditions=c("Late Gilteritinib"))%>%subset(p_adj<0.05)
This part runs the network
## Not run: library("PCSF") data("STRING") ppi <- construct_interactome(STRING) vals<-total.mean.diffs%>% subset(Condition=='FL')%>% dplyr::select(condition_to_control,Gene) terms<-vals$condition_to_control names(terms)<-vals$Gene fl.subnet <- PCSF_rand(ppi, terms, n=1000, r=0.3,w = 4, b = 50, mu = 0.0005) vals<-total.mean.diffs%>% subset(Condition=='FGF2')%>% dplyr::select(condition_to_control,Gene) terms<-vals$condition_to_control names(terms)<-vals$Gene fgf2.subnet <- PCSF_rand(ppi, terms, n=1000,r=0.3,w = 4, b = 50, mu = 0.0005) vals<-late.diffs%>% # subset(Condition=='FGF2')%>% dplyr::select(condition_to_control,Gene) terms<-vals$condition_to_control names(terms)<-vals$Gene late.subnet <- PCSF_rand(ppi, terms, n=1000,r=0.3,w = 4, b = 50, mu = 0.0005) # ## End(Not run)
Note that the echo = FALSE
parameter was added to the code chunk to prevent printing of the R code that generated the plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.