From b3f6eb49bade526792092f8b38d2866b9f3d81ca Mon Sep 17 00:00:00 2001 From: Guangchuang Yu Date: Tue, 5 Nov 2024 17:20:18 +0800 Subject: [PATCH] update --- inst/prototype/GEO.r | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inst/prototype/GEO.r b/inst/prototype/GEO.r index b09e603..0dce7f3 100644 --- a/inst/prototype/GEO.r +++ b/inst/prototype/GEO.r @@ -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) @@ -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)