Created
January 8, 2010 04:52
-
-
Save neilfws/271861 to your computer and use it in GitHub Desktop.
GEOmetadb demo; see http://nsaunders.wordpress.com/2010/01/08/samples-per-seriesdataset-in-the-ncbi-geo-database/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install GEOmetadb | |
source("http://bioconductor.org/biocLite.R") | |
biocLite("GEOmetadb") | |
library(GEOmetadb) | |
# connect to database | |
getSQLiteFile() | |
con <- dbConnect(SQLite(), "GEOmetadb.sqlite") | |
# count samples per GDS | |
gds.count <- dbGetQuery(con, "select gds,sample_count from gds") | |
gds.count[1:5,] | |
# first 5 results | |
gds sample_count | |
1 GDS5 5 | |
2 GDS6 29 | |
3 GDS10 28 | |
4 GDS12 8 | |
5 GDS15 6 | |
# count samples per GSE | |
gse <- dbGetQuery(con, "select series_id from gsm") | |
gse.count <- as.data.frame(table(gse$series_id)) | |
gse.count[1:10,] | |
# first 10 results | |
Var1 Freq | |
1 GSE1 38 | |
2 GSE10 4 | |
3 GSE100 4 | |
4 GSE10000 29 | |
5 GSE10001 12 | |
6 GSE10002 8 | |
7 GSE10003 4 | |
8 GSE10004,GSE10114 3 | |
9 GSE10005 48 | |
10 GSE10006 75 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment