複数のSeriesMatrixファイルをGeoQueryで読む方法が分からない
弊社の社内からftp-proxyを経由してBioConductorのGEOQueryでデータをダウンロードする方法が分からない。そういうワケで、GEOの画面からhttp経由でSeriesMatrixファイルをダウンロードして、そのファイルをgetGEO(file="...")のようにすることが、多々ある。
> library(GEOquery) 要求されたパッケージ Biobase をロード中です 要求されたパッケージ BiocGenerics をロード中です 次のパッケージを付け加えます: '‘BiocGenerics’' The following object(s) are masked from ‘package:stats’: xtabs The following object(s) are masked from ‘package:base’: anyDuplicated, cbind, colnames, duplicated, eval, Filter, Find, get, intersect, lapply, Map, mapply, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rbind, Reduce, rep.int, rownames, sapply, setdiff, table, tapply, union, unique Welcome to Bioconductor Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")', and for packages 'citation("pkgname")'. Setting options('download.file.method.GEOquery'='auto') > gse2430 <- getGEO(file="GSE2430_series_matrix.txt.gz", GSEMatrix=T) File stored at: C:\Users\fukuit\AppData\Local\Temp\Rtmpc7lhOV/GPL84.soft 警告メッセージ: In download.file(myurl, destfile, mode = mode, quiet = TRUE, method = getOption("download.file.method.GEOquery")) : ダウンロードされた長さ 1581519 != 報告された長さ 200 です > head(gse2430) ExpressionSet (storageMode: lockedEnvironment) assayData: 1 features, 4 samples element names: exprs protocolData: none phenoData sampleNames: GSM45588 GSM45589 GSM45590 GSM45591 varLabels: title geo_accession ... data_row_count (45 total) varMetadata: labelDescription featureData featureNames: AFFX-Athal_actin_at fvarLabels: ID ORF ... Gene Ontology Molecular Function (15 total) fvarMetadata: Column Description labelDescription experimentData: use 'experimentData(object)' Annotation: GPL84 >
まあ、このGSE2430を選んだことに他意はない。Pseudomonas aeruginosaか、、、ソレはソレでおもしろそうだけど。
では、このSeriesMatrixファイルが複数あるような場合はどうしたら良いのか。例えば、GSE2109の場合、データ量が多いこともあって、SeriesMatrixファイルが9分割されている。
> gse2109 <- getGEO(file=c("GSE2109_series_matrix-1.txt.gz","GSE2109_series_matrix-2.txt.gz","GSE2109_series_matrix-3.txt.gz","GSE2109_series_matrix-4.txt.gz","GSE2109_series_matrix-5.txt.gz","GSE2109_series_matrix-6.txt.gz","GSE2109_series_matrix-7.txt.gz","GSE2109_series_matrix-8.txt.gz","GSE2109_series_matrix-9.txt.gz"), GSEMatrix=T) 以下にエラー gzfile(fname, open = "rt") : 'description' 引数が不正です >
違うらしい。
これは、1つずつgse2109-1 <- getGEO(... 、gse2109-2 <- getGEO(...、って読み込んだ後、cbindするのが正解なのかなぁ。