Skip to content

Instantly share code, notes, and snippets.

@bobthecat
Created December 20, 2012 18:19
Show Gist options
  • Save bobthecat/4347441 to your computer and use it in GitHub Desktop.
Save bobthecat/4347441 to your computer and use it in GitHub Desktop.
library(GEOquery)
## Download the data from GEO
GDS3716 <- getGEO('GDS3716')
# transform the GDS to and expressionSet
eset <- GDS2eSet(GDS3716,do.log2=TRUE)
phenoData <- pData(eset)
# keep only the ER+ and ER-
samples <- phenoData$sample[grep("ER", phenoData$specimen)]
# subsetting the expressionSet
eset <- eset[,samples]
# transforming to matrix
e <- exprs(eset)
# For the sake of the example here we keep only the first 2000 probes.
e <- e[1:2000,samples]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment