From 89a39c4f370829ff0a3e73351338e1d6a2660ed9 Mon Sep 17 00:00:00 2001 From: Lennart Opitz Date: Thu, 13 Jun 2024 10:48:03 +0200 Subject: [PATCH] fix ena --- R/app-ENA.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/app-ENA.R b/R/app-ENA.R index 0a545fb1..91c658ce 100644 --- a/R/app-ENA.R +++ b/R/app-ENA.R @@ -93,6 +93,9 @@ ezMethodGetEnaData <- function(input=NA, output=NA, param=NA){ } else { tryCatch({ experimentID <- xmlToList(runInfo)[[1]]$EXPERIMENT_REF$.attrs + if(length(experimentID) > 1){ + experimentID <- experimentID['accession'] + } cmd = paste0("curl -o ", experimentID,".xml ", "-X GET \'https://www.ebi.ac.uk/ena/browser/api/xml/",experimentID,"?download=true\'") ezSystem(cmd) xml <- xmlParse(paste0(experimentID, '.xml'))