Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
GuangchuangYu committed Nov 5, 2024
1 parent f9a0868 commit b3f6eb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions inst/prototype/GEO.r
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ get_gse <- function(gseID) {
GEOquery::getGEO(filename = gsesoft)
}

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




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

gse <- get_gse(gseID)

gsm <- get_gsm(gse)

get_gsm(gse, 'extract_protocol_ch1') |> head(2)

download_gsm(gsm)

0 comments on commit b3f6eb4

Please sign in to comment.