Skip to content

Commit b3f6eb4

Browse files
committed
update
1 parent f9a0868 commit b3f6eb4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

inst/prototype/GEO.r

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ get_gse <- function(gseID) {
77
GEOquery::getGEO(filename = gsesoft)
88
}
99

10-
get_gsm <- function(gse) {
11-
lapply(GEOquery::GSMList(gse), function(x) x@header$supplementary_file)
10+
get_gsm <- function(gse, item = "supplementary_file_1") {
11+
lapply(GEOquery::GSMList(gse), function(x) x@header[item])
1212
}
1313

1414

1515

16+
1617
download_gsm <- function(gsm) {
1718
for (x in gsm) {
1819
destfile <- sub(".*/([^/]+)$", "\\1", x)
@@ -23,7 +24,10 @@ download_gsm <- function(gsm) {
2324
gseID <- "GSE123904"
2425

2526
gse <- get_gse(gseID)
27+
2628
gsm <- get_gsm(gse)
2729

30+
get_gsm(gse, 'extract_protocol_ch1') |> head(2)
31+
2832
download_gsm(gsm)
2933

0 commit comments

Comments
 (0)