From dca1e1de4cba41f22a5606a3b35a5e671412c247 Mon Sep 17 00:00:00 2001 From: herwig Date: Wed, 21 Jun 2017 10:28:57 +0200 Subject: [PATCH] Add files via upload --- HerwigAppendix-1.txt | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 HerwigAppendix-1.txt diff --git a/HerwigAppendix-1.txt b/HerwigAppendix-1.txt new file mode 100644 index 0000000..be79681 --- /dev/null +++ b/HerwigAppendix-1.txt @@ -0,0 +1,66 @@ +Appendix 1 – R-code + + + + +#Normalization + + +library(gcrma) + +#in the following line, replace CEL directory and CDF name with respective folder and name of your custom CDF + +set <- ReadAffy(celfile.path=, cdfname = ) + +nset <- gcrma(set) + + + + +#Differential expression + + +library(limma) + +design <- model.matrix(~ 0+factor(c(1,1,2,2))) + +# exemplary design matrix for the case that samples 1 and 2 are control, 3 and 4 are treatment; adjust accordingly + +fit <- lmFit(nset, design) + +fit <- eBayes(fit) + +topTable(fit) + + + + +#Induced network modules + + +library(BioNet) + +#in the following line, replace PPI file with the file name of the PPI in standard interaction format (.sif) + +ppi <- read.csv(, sep="\t", header=T) + +ppiG <- ftM2graphNEL(ppi, edgemode="undirected") + +#in the following line, replace diffEx file with the table acuired in Method 3.1.2 step 5 + +deData <- read.csv(, sep="\t", header=T) + +subnet <- subNetwork(deData$Gene.ID, ppiG) + +fb <- fitBumModel(pval, plot = FALSE) + +#pval = 0.05, for example + +scores <- scoreNodes(subnet, fb, fdr = 0.01) + +#play around with the fdr value to acquire modules of interpretable size + +module <- runFastHeinz(subnet, scores) + +plotModule(module, scores = scores, diff.expr = logFC) +