Skip to content

Commit

Permalink
tsov2: ignore SmallVariants_Annotated.json.gz; better dl size info
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Oct 9, 2024
1 parent bf87f40 commit abfb559
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/fs_icav1.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ dr_gds_download <- function(gdsdir, outdir, token = Sys.getenv("ICA_ACCESS_TOKEN
gdspath = .data$path
) |>
dplyr::select("type", "bname", "size", "lastmodified", "file_id", "localpath", "gdspath")
# download recognisable dracarys files to outdir/<mirrored-cloud-path>/{bname}
tot_size <- d |>
dplyr::summarise(tot_size = sum(.data$size)) |>
dplyr::pull(tot_size)
# download recognisable dracarys files to outdir/<mirrored-cloud-path>/{bname}
if (!dryrun) {
txt <- paste0(
"{e('arrow_heading_down')} {nrow(d)} files ({tot_size}): {.file {gdsdir}}\n"
Expand Down
11 changes: 9 additions & 2 deletions R/fs_s3.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,16 @@ dr_s3_download <- function(s3dir, outdir, max_objects = 100, pattern = NULL,
s3path = .data$path
) |>
dplyr::select("type", "bname", "size", "lastmodified", "localpath", "s3path")
tot_size <- d |>
dplyr::summarise(tot_size = sum(.data$size)) |>
dplyr::pull(tot_size)
# download recognisable dracarys files to outdir/<mirrored-cloud-path>/{bname}
if (!dryrun) {
cli::cli_alert_info("{date_log()} {e('arrow_heading_down')} Downloading files from {.file {s3dir}}")
d |>
txt <- paste0(
"{e('arrow_heading_down')} {nrow(d)} files ({tot_size}): {.file {s3dir}}\n"
)
cli::cli_alert_info(txt)
res <- d |>
dplyr::rowwise() |>
dplyr::mutate(
s3bucket = sub("s3://(.*?)/.*", "\\1", .data$s3path),
Expand All @@ -158,6 +164,7 @@ dr_s3_download <- function(s3dir, outdir, max_objects = 100, pattern = NULL,
localpath = normalizePath(.data$localpath)
) |>
dplyr::select("type", "bname", "size", "lastmodified", "localpath", "s3path")
return(res)
} else {
cli::cli_alert_info("{date_log()} {e('camera')} Just list relevant files from {.file {s3dir}}")
d |>
Expand Down
2 changes: 1 addition & 1 deletion R/tsov2.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Wf_tso_ctdna_tumor_only_v2 <- R6::R6Class(
glue("{res}/{pref}_CombinedVariantOutput\\.tsv$"), "cvo",
glue("{res}/{pref}_Fusions\\.csv$"), "fus",
glue("{res}/{pref}_MetricsOutput\\.tsv$"), "DOWNLOAD_ONLY",
glue("{res}/{pref}_SmallVariants_Annotated\\.json\\.gz$"), "DOWNLOAD_ONLY",
# glue("{res}/{pref}_SmallVariants_Annotated\\.json\\.gz$"), "DOWNLOAD_ONLY",
glue("{li}/SampleAnalysisResults/{pref}_SampleAnalysisResults\\.json$"), "sar"
)
# DragenCaller
Expand Down

0 comments on commit abfb559

Please sign in to comment.