Laptop Setup Instructions
Instructions for setting up your laptop can be found here: Laptop Setup Instructions_FACS
Difference Between R and R Studio
RStudio doesn’t know where libraries are installed, when they are not installed through the RStudio package manager. To tell RStudio the location, you can define the path in a startup file. Create a file called .Renviron
. Inside there:
R_LIBS=<R Library Path of other installed packages>
That was the problem when students installed things in R Studio at the command line using the R command install.package()
.
… or you could use the package manger to install libraries.
Retaining unaltered versions of your variables in R Studio
There may be some memory management issues with R Studio and flow cytometry data. If you encounter a scenario where you start with one variable (flowSet), then copy it into another and alter it (preprocess, transform) and find the original variable also altered, then consider saving and loading your flowSet variable at every stage of alteration that you wish to recall. For example:
fs <- read.flowSet(path = '/home/rguru/Documents/mydata/')
fs <- flowComp(fs) \# function 'flowComp' is provided by Radina in support\_functions.R
save(fs, '/home/rguru/Documents/my\_raw\_fs.RData')
fs.preprocessed <- fs
…
-
Do a bunch of preprocessing to fs.preprocessed
-
Try to plot fs and fs.preprocessed, find that your ‘fs’ appears to be altered also
-
Instead, re-load the saved version:
load('/home/rguru/Documents/my\_raw\_fs.RData')
(note that this will reload a variable called ‘fs’ and replace the current one in your workspace, thereby making the ‘fs’ you work with below the saved one you were hoping to get)
This issue should not occur if using R from a terminal. Also be careful that you did not accidentally re-execute some code a few times and unintentionally actually alter your flowSet.
Pre-Workshop Tutorials
1) R Preparation tutorials: You are expected to have completed the following tutorials in R beforehand. The tutorial should be very accessible even if you have never used R before.
- The R Tutorial up to and including 5. Basic Plots
- The R command cheat sheet
2) UNIX Preparation tutorials:
- Tutorials #1-3 on UNIX Tutorial for Beginners
- Unix Cheat sheet
Pre-Workshop Readings
FACS_2013_Torfs+Brauer-Short-R-Intro
Data Sets
Day 1
Welcome
*Faculty: Michelle Brazas*Module 1: Introduction to Flow Cytometry Analysis in R
*Faculty: Ryan Brinkman*Lecture:
Module 2: Exploring FCM data in R
*Faculty: Radina Droumeva*Lecture:
Lab Practical:
Module 2 Lab
PlottingReference.R - reference, summary and tutorial for plot functions in R.
Module 3: Preprocessing and Quality Assurance of FCM Data
*Faculty: Radina Droumeva*Lecture:
Lab Practical:
Integrated Assignment
*Faculty: Radina Droumeva*Day 2
Module 4: Automated Cell Population Identification
*Faculty: Ryan Brinkman*Lecture:
Module 5: 1D Automated Gating
*Faculty: Radina Droumeva*Lecture:
Lab Practical:
Module 6: Additional FCM Tools
*Faculty: Ryan Brinkman*Lecture:
Other (more advanced) resources:
Manuals:
More detailed introduction to R. Not a basic tutorial, this is for people who really want to know more about R.
http://cran.r-project.org/doc/manuals/R-intro.html
Books:
1) “Introductory Statistics with R” by Peter Dalgaard. It is not required for this workshop but if you are interested in buying a good book and/or want to know more, you might want to consider getting a copy.
Section 1-5 give a very good (perhaps very detailed) idea of what I plan to discuss during the workshop.
2) Statistics for Biology and Health by Robert Gentleman, Vincent Carey, Wolfgang Huber, Rafael Irizarry and Sandrine Dudoit
3) Building Bioinformatics Solutions with Perl, R and MySQL by Conrad Bessant, Ian Shadforth and Darren Oakley