Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Hardt_et_al_MethodsMolBiol/HerwigAppendix-1.txt
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
66 lines (27 sloc)
1.31 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=<CEL directory>, cdfname = <custom CDF name>) | |
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(<PPI file in sif>, 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(<diffEx file>, 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) | |