From af16a53236610d54261a3875d95f5d6303c150b4 Mon Sep 17 00:00:00 2001 From: Guangchuang Yu Date: Tue, 5 Nov 2024 17:59:48 +0800 Subject: [PATCH] sra --- inst/prototype/sra.r | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 inst/prototype/sra.r diff --git a/inst/prototype/sra.r b/inst/prototype/sra.r new file mode 100644 index 0000000..13fca76 --- /dev/null +++ b/inst/prototype/sra.r @@ -0,0 +1,12 @@ +get_runinfo <- function(sra_id) { + x <- rentrez::entrez_fetch(db='sra', rettype='runinfo', id = sra_id) + read.csv(textConnection(x)) +} + + + +id <- "SRX5137765" +d <- get_runinfo(id) +head(d,2) + +sprintf("fastq-dump %s", d$Run[1:3])