1 / 18

Introduction to R / sma / Bioconductor

Introduction to R / sma / Bioconductor. Statistics for Microarray Data Analysis The Fields Institute for Research in Mathematical Sciences May 25, 2002. Web sites + References. http://www.R-project.org/ An introduction to R W.N.Venables, D.M.Smith and the R Development Core Team

jena-juarez
Download Presentation

Introduction to R / sma / Bioconductor

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to R / sma / Bioconductor Statistics for Microarray Data Analysis The Fields Institute for Research in Mathematical Sciences May 25, 2002

  2. Web sites + References • http://www.R-project.org/ An introduction to R W.N.Venables, D.M.Smith and the R Development Core Team • http://lib.stat.cmu.edu/R/CRAN/ • http://www.bioconductor.org/

  3. Need to read files such as “swirl1.spot” or “samples.swirl” into the R programs. Functions: read.table scan Save your workspace in R Using the function save.image You will only see name.RData or .RData In your directory

  4. Download ? Download SetupR.exe from http://cran.r-project.org/,

  5. A few basics • Working Directory • getwd() • setwd() or click on File and then click on Change Dir, use Browse to determine your working directory. • Workspace • save(a, b, file=“my.RData”) : save objects a and b into the workpace “my.RData” • save.image(“my.RData”) : click on File and then click on Save Workspace • load(“my.RData”) : click on File and then click on Load Workspace • Help • help.start() • help(): e.g. help(plot)

  6. Search paths + packages search() > search() [1] ".GlobalEnv" "package:ctest" "Autoloads" "package:base" library(cluster) search() > library(cluster) Loading required package: mva > search() [1] ".GlobalEnv" "package:mva" "package:cluster" "package:ctest" [5] "Autoloads" "package:base" ls() : list objects in the GlovalEnv ls(3) : list objects in search position number 3, in the above example, it is package:cluster

  7. Contributed packages: ellipse cluster sma GeneSOM hdarray affy GeneClust bioconductor etc … R Base packages: base ctest mva tcltk etc… Submit to CRAN mypackage

  8. An introduction to R based on the documents produced by W.N.Venables, D.M.Smith and the R Development Core Team

  9. Vectors and assignment R operates on named data structures. The simplest such structure is the numeric vector, which is a single entity consisting of an ordered collection of numbers. To set up a vector named x, say, consisting of five numbers, namely 10.4, 5.6, 3.1, 6.4 and 21.7, use the R command x <- c(10.4, 5.6, 3.1, 6.4, 21.7) or assign(“x”, c(10.4, 5.6, 3.1, 6.4, 21.7)) This is an assignment statement using the function c() This is a numeric vector > is.numeric(x) [1] TRUE

  10. numeric X <- c(1:5, 6, 9,3, 10) vector Character X <- c(“a”, “b”, “c3”, “4”) logical X <- c(1, 1, 0, TRUE, FALSE)

  11. Other types of objects matrices or more generally arrays are multi-dimensional generalizations of vectors. lists provide a convenient way to return the results of a statistical computation. data frames are matrix-like structures, in which the columns can be of different types. Think of data frames as `data matrices' with one row per observational unit but with (possibly) both numerical and categorical variables. functions are themselves objects in R which can be stored in the project's workspace. This provides a simple and convenient way to extend R.

  12. Introduction to Bioconductor(taken from http://www.bioconductor.org) The packages in the initial release include tools which facilitate: - annotation (AnnBuilder, annotate) - data management and organization through the use of the S4 class structure (Biobase, marrayClasses) - identification of differentially expressed genes and clustering (edd, genefilter, geneplotter, multtest, ROC) - analysis of Affymetrix expression array data (affy) - diagnostic plots and normalization for cDNA array data (marrayInput, marrayNorm, marrayPlots) - storage and retrieval of large datasets (rhdf5).

  13. Most packages rely on the class/method mechanism provided by John Chambers’ R methods package, which allows object-oriented programming in R Class Slots numeric logical Character

  14. marrayInfo maInfo data.frame maLabels character maNotes character This class can be used to store either the gene names Information or samples information

  15. marrayLayout maNgr numeric maNsr numeric maNsc numeric maNgc numeric maNspots numeric maSub logical maPlate factor maControls factor Methods for quantities that are not slots of marrayLayout maSpotRow numeric maSpotCol numeric maGridRow numeric maGridCol numeric maPrintTip numeric

  16. marrayRaw maRf matrix maRb matrix maGf matrix maGb matrix maW matrix maLayout marrayLayout maGnames marrayInfo maTargets marrayInfo maNotes character Methods for quantities that are not slots of marrayRaw maLR matrix maLG matrix maM matrix maA matrix

  17. marrayNorm maA matrix maM matrix maMloc matrix maMscale matrix maW matrix maLayout marrayLayout maGnames marrayInfo maTargets marrayInfo maNormCall call maNotes character

  18. Swirl data Data (Spot Files) • swirl.1.spot • swirl.2.spot • swirl.3.spot • swirl.4.spot Target information files • SwirlSample.txt Gene List • fish.gal Layout: Grid size: 4 by 4 Spot matrix: 22 by 24

More Related