p1 <- system.file("extdata/portaldb_workflow_top4.rds", package = "rportal") |>
- readRDS() |>
- dplyr::filter(type_name == "umccrise") |>
- dplyr::slice(1)
-#> Warning: cannot open compressed file '', probable reason 'No such file or directory'
-#> Error in gzfile(file, "rb"): cannot open the connection
-w <- Wf$new(
- prid = p1$portal_run_id, type = p1$type_name, start = p1$start, end = p1$end,
- status = p1$end_status, input = p1$input, output = p1$output
+ if (FALSE) { # \dontrun{
+regexes <- tibble::tribble(
+ ~regex, ~fun,
+ "-chord\\.tsv\\.gz$", "UmChordTsvFile",
+ "-hrdetect\\.tsv\\.gz$", "UmHrdetectTsvFile",
+ "-snv_2015\\.tsv\\.gz$", "UmSigsSnvFile",
+ "-snv_2020\\.tsv\\.gz$", "UmSigsSnvFile",
+ "-dbs\\.tsv\\.gz$", "UmSigsDbsFile",
+ "-indel\\.tsv\\.gz$", "UmSigsIndelFile",
+ "-qc_summary\\.tsv\\.gz$", "UmQcSumFile",
+)
+
+#---- LOCAL ----#
+p1_local <- "~/icav1/g/production/analysis_data"
+p <- file.path(p1_local, "SBJ01155/umccrise/202408300c218043/L2101566__L2101565")
+um1 <- Wf$new(path = p, wname = "umccrise", regexes = regexes)
+um1$list_files(max_files = 10)
+um1$list_files_filter_relevant(max_files = 10)
+
+#---- GDS ----#
+p1_gds <- "gds://production/analysis_data"
+p <- file.path(p1_gds, "SBJ03043/umccrise/20240830ec648f40/L2300064__L2300063")
+outdir <- file.path(sub("gds:/", "~/icav1/g", p))
+token <- Sys.getenv("ICA_ACCESS_TOKEN")
+um2 <- Wf$new(path = p, wname = "umccrise", regexes = regexes)
+um2$list_files(max_files = 10)
+um2$list_files_filter_relevant(ica_token = token, max_files = 500)
+d <- um2$download_files(
+ outdir = outdir, ica_token = token,
+ max_files = 1000, dryrun = T
)
-#> Error in eval(expr, envir, enclos): object 'p1' not found
-w
-#> Error in eval(expr, envir, enclos): object 'w' not found
+d_tidy <- um2$tidy_files(d)
+
+#---- S3 ----#
+p1_s3 <- "s3://org.umccr.data.oncoanalyser/analysis_data/SBJ05570/sash/202408275fce06c3"
+p2_s3 <- "L2401304_L2401303/SBJ05570_MDX240299/cancer_report/cancer_report_tables"
+p <- file.path(p1_s3, p2_s3)
+outdir <- sub("s3:/", "~/s3", p)
+um3 <- Wf$new(path = p, wname = "sash", regexes = regexes)
+um3$list_files(max_files = 10)
+um3$list_files_filter_relevant(max_files = 50)
+d <- um3$download_files(outdir = outdir, regexes = regexes, max_files = 50, dryrun = F)
+} # }
+