User:Vincent Rouilly/Computational Biology With R

=Computational Biology with R=

Books

 * R Programming for Bioinformatics, Robert Gentleman, Fred Hutchinson, 2008
 * Introduction to Scientific Programming and Simulation Using R, Owen Jones et al, 2009
 * More R Books (from R-Project.org)

Software resources

 * StatET with Eclipse, develop in R within a great IDE.
 * Sweave (literate programming / reproducible science))

RSBML lib

 * Install library
 * > source("http://bioconductor.org/biocLite.R")
 * > biocLite("rsbml")
 * Load library
 * > library("rsbml")


 * Load SBML model
 * Simulate a SBML model
 * > dom <- rsbml_read("/my_sbml_file.xml") ## e.g. dom <- rsbml_read(system.file("sbml", "GlycolysisLayout.xml", package = "rsbml"))
 * > mod <- model(dom)
 * > sub <- new("SOSSubject", mod)
 * > exp <- new("SOSExperiment", subject=sub)
 * > simulate(exp) (Warning: it does seem to work for me at the moment)

Running SBML models in R

 * 1) Install SBMLR package
 * 2) Start R, and enter:
 * 3) > source("http://bioconductor.org/biocLite.R")
 * 4) > biocLite("SBMLR")
 * 5) Load library 'SBMLR' in R by typing:
 * 6) > library("SBMLR")
 * 7) Download sample SBML file describing a A-->B reaction: [[media:here]]
 * 8) Read SBML file into R
 * 9) > myModel <- readSBML("AtoB.xml")
 * 10) Simulate model between [0,100] with 100 points
 * 11) > results=simulate(myModel,seq(0,100,1))
 * 12) Plot results
 * 13) > attach(results)
 * 14) > par(mfrow=c(2,1))
 * 15) > plot(time,s1,type="l")
 * 16) > plot(time,s2,type="l")
 * 17) > detach(results)

Perturbation analysis on compound concentration

 * 1) Simulate first section between [0,50], where s1=100 at t=0 (following SBML description)
 * 2) > myModel=readSBML("AtoB.xml")
 * 3) > result_1 = simulate(myModel,seq(0,50,1))
 * 4) Simulate second section between [50,100], where s1=100 at t=50
 * 5) > myModel$species$s1$ic=50
 * 6) > results_2 = simulate(myModel,seq(50,100,1))
 * 7) > results=data.frame(rbind(results_1, results_2))
 * 8) > attach(results)
 * 9) > par(mfrow=c(2,1))
 * 10) > plot(time,IMP,type="l")
 * 11) > plot(time,HX,type="l")
 * 12) > par(mfrow=c(1,1))
 * 13) > detach(results)