Affymetrix CEL files
This analysis was performed using R (ver. 3.1.0).
Download raw data
The raw data files for this lab are in the rawdata
repository, available here: https://github.com/genomicsclass/rawdata Click Download ZIP in order to download all the files, unzip this file which should result in a rawdata-master
folder. Rename this folder to rawdata.
Read Affymeterix CEL files
We start by reading in the sample information table. This is usually created by the person who performed the experiment.
#Set working directory to the the celfiles
basedir <- "~/hubiC/Documents/R/doc/english/genomics/rawdata/celfiles"
setwd(basedir)
library(affy)
#Sample information table : it has file names and data from spiking experiment (spiking concentration)
tab <- read.delim("sampleinfo.txt",check.names=FALSE,as.is=TRUE)
rownames(tab) <- tab$filenames
tab[1:6, 1:3]
## filenames 37777_at 684_at
## 1521a99hpp_av06.CEL.gz 1521a99hpp_av06.CEL.gz 0.00 0.25
## 1532a99hpp_av04.CEL.gz 1532a99hpp_av04.CEL.gz 0.00 0.25
## 2353a99hpp_av08.CEL.gz 2353a99hpp_av08.CEL.gz 0.00 0.25
## 1521b99hpp_av06.CEL.gz 1521b99hpp_av06.CEL.gz 0.25 0.50
## 1532b99hpp_av04.CEL.gz 1532b99hpp_av04.CEL.gz 0.25 0.50
## 2353b99hpp_av08r.CEL.gz 2353b99hpp_av08r.CEL.gz 0.25 0.50
#list all the .cel files that are in the current directory.
fns <- list.celfiles()
fns
## [1] "1521a99hpp_av06.CEL.gz" "1521b99hpp_av06.CEL.gz"
## [3] "1532a99hpp_av04.CEL.gz" "1532b99hpp_av04.CEL.gz"
## [5] "2353a99hpp_av08.CEL.gz" "2353b99hpp_av08r.CEL.gz"
#Check whether the filenames are the same in the directory and in the sample info tab
fns %in% tab[,1] ##check
## [1] TRUE TRUE TRUE TRUE TRUE TRUE
#Read cel files in the current directory
ab <- ReadAffy(phenoData=tab)
ReadAffy function creates an AffyBatch object which object contains the information you need.
#Extract the perfect match probe-level intensities
dim(pm(ab))
## [1] 201807 6
#Phenotypic data : sample information 6X17
dim(pData(ab))
## [1] 6 17
#Plateform used for gene information
annotation(ab)
## [1] "hgu95a"
Normalization
The last thing to do here is to turn probe-level information into gene-level information. You can preprocess this probe-level information in many ways. One way you can do it is using this algorithm called rma. It’s going to turn probe-level data into gene-level data, quantile normalization and also background correction.
e <- rma(ab)
## Background correcting
## Normalizing
## Calculating Expression
dim(e)
## Features Samples
## 12626 6
You notice that this information is smaller, it's only 12,000 by 6. It's been summarized now.
If you are not interested in probe level data you could use this function :
setwd(basedir)
ejust <- justRMA(filenames=tab[,1],phenoData=tab)
dim(ejust)
Licence
References
Show me some love with the like buttons below... Thank you and please don't forget to share and comment below!!
Montrez-moi un peu d'amour avec les like ci-dessous ... Merci et n'oubliez pas, s'il vous plaît, de partager et de commenter ci-dessous!
Recommended for You!
Recommended for you
This section contains best data science and self-development resources to help you on your path.
Coursera - Online Courses and Specialization
Data science
- Course: Machine Learning: Master the Fundamentals by Standford
- Specialization: Data Science by Johns Hopkins University
- Specialization: Python for Everybody by University of Michigan
- Courses: Build Skills for a Top Job in any Industry by Coursera
- Specialization: Master Machine Learning Fundamentals by University of Washington
- Specialization: Statistics with R by Duke University
- Specialization: Software Development in R by Johns Hopkins University
- Specialization: Genomic Data Science by Johns Hopkins University
Popular Courses Launched in 2020
- Google IT Automation with Python by Google
- AI for Medicine by deeplearning.ai
- Epidemiology in Public Health Practice by Johns Hopkins University
- AWS Fundamentals by Amazon Web Services
Trending Courses
- The Science of Well-Being by Yale University
- Google IT Support Professional by Google
- Python for Everybody by University of Michigan
- IBM Data Science Professional Certificate by IBM
- Business Foundations by University of Pennsylvania
- Introduction to Psychology by Yale University
- Excel Skills for Business by Macquarie University
- Psychological First Aid by Johns Hopkins University
- Graphic Design by Cal Arts
Books - Data Science
Our Books
- Practical Guide to Cluster Analysis in R by A. Kassambara (Datanovia)
- Practical Guide To Principal Component Methods in R by A. Kassambara (Datanovia)
- Machine Learning Essentials: Practical Guide in R by A. Kassambara (Datanovia)
- R Graphics Essentials for Great Data Visualization by A. Kassambara (Datanovia)
- GGPlot2 Essentials for Great Data Visualization in R by A. Kassambara (Datanovia)
- Network Analysis and Visualization in R by A. Kassambara (Datanovia)
- Practical Statistics in R for Comparing Groups: Numerical Variables by A. Kassambara (Datanovia)
- Inter-Rater Reliability Essentials: Practical Guide in R by A. Kassambara (Datanovia)
Others
- R for Data Science: Import, Tidy, Transform, Visualize, and Model Data by Hadley Wickham & Garrett Grolemund
- Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems by Aurelien Géron
- Practical Statistics for Data Scientists: 50 Essential Concepts by Peter Bruce & Andrew Bruce
- Hands-On Programming with R: Write Your Own Functions And Simulations by Garrett Grolemund & Hadley Wickham
- An Introduction to Statistical Learning: with Applications in R by Gareth James et al.
- Deep Learning with R by François Chollet & J.J. Allaire
- Deep Learning with Python by François Chollet