Skip to content

Instantly share code, notes, and snippets.

@slavailn
Created June 25, 2020 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slavailn/bdbc0c4d2c2153b45dead43312f16b8c to your computer and use it in GitHub Desktop.
Save slavailn/bdbc0c4d2c2153b45dead43312f16b8c to your computer and use it in GitHub Desktop.
Dowload data from GEO with GEOquery (short note)
library(GEOquery)
# Get GSE
gse <- getGEO("GSE147507",GSEMatrix=FALSE)
head(Meta(gse))
# names of all the GSM objects contained in the GSE
names(GSMList(gse))
# and get the first GSM object on the list
GSMList(gse)[[1]]
# and the names of the GPLs represented
names(GPLList(gse))
# Download GSE as an expressionSet
gse <- getGEO('GSE147507',GSEMatrix=TRUE)
show(gse)
class(gse[[1]])
class(gse[[2]])
# This GSE entry consists of 2 expression sets
head(pData(gse[[1]])) # Human dataset
head(pData(gse[[2]])) # Ferret dataset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment