diff --git a/NAMESPACE b/NAMESPACE index d648d79..e0816bd 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -32,6 +32,7 @@ export(bcftools_parse_vcf_regions) export(date_log) export(dr_func_eval) export(dr_gds_download) +export(dr_output_format_valid) export(empty_tbl) export(file_regex_getter) export(gds_file_download) diff --git a/R/tidy.R b/R/tidy.R index bf198d0..4b77cf7 100644 --- a/R/tidy.R +++ b/R/tidy.R @@ -19,13 +19,14 @@ #' \dontrun{ #' in_dir <- paste0( #' "gds://production/analysis_data/SBJ01639/tso_ctdna_tumor_only/", -#' "202204045ad5743c/L2200214/Results/PRJ220425_L2200214/" +#' "202204045ad5743c/L2200214/Results/PRJ220425_L2200214" #' ) -#' out_dir <- here::here("nogit/tso/2023-08-01") -#' in_dir <- file.path(out_dir, "dracarys_gds_sync") +#' o1 <- sub("^gds://", "", in_dir) +#' out_dir <- file.path(fs::path_home(), "icav1/g", o1) +#' # in_dir <- file.path(out_dir, "dracarys_gds_sync") #' prefix <- "SBJ01639" #' out_format <- "rds" -#' umccr_tidy(in_dir = in_dir, out_dir = out_dir, prefix = prefix, out_format = out_format, dryrun = F) +#' umccr_tidy(in_dir = in_dir, out_dir = out_dir, prefix = prefix, out_format = out_format, dryrun = T) #' #' in_dir <- here::here(glue("nogit/tso/2022-12-13/SBJ02858/dracarys_gds_sync")) #' out_dir <- file.path(in_dir, "../out") diff --git a/R/utils.R b/R/utils.R index 8c4367a..55e083b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -47,6 +47,10 @@ session_info_tbls <- function(pkgs = NULL) { ) } +#' Output Format is Valid +#' +#' Checks that the specified output format is valid. +#' @export dr_output_format_valid <- function(x) { format_choices <- c("tsv", "parquet", "delta", "rds") assertthat::assert_that( diff --git a/man/dr_output_format_valid.Rd b/man/dr_output_format_valid.Rd new file mode 100644 index 0000000..ff9afd4 --- /dev/null +++ b/man/dr_output_format_valid.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{dr_output_format_valid} +\alias{dr_output_format_valid} +\title{Output Format is Valid} +\usage{ +dr_output_format_valid(x) +} +\description{ +Checks that the specified output format is valid. +} diff --git a/man/umccr_tidy.Rd b/man/umccr_tidy.Rd index ec14bea..38d7e6c 100644 --- a/man/umccr_tidy.Rd +++ b/man/umccr_tidy.Rd @@ -45,13 +45,14 @@ tibbles to TSV, Parquet, SparkDF, or RDS format. \dontrun{ in_dir <- paste0( "gds://production/analysis_data/SBJ01639/tso_ctdna_tumor_only/", - "202204045ad5743c/L2200214/Results/PRJ220425_L2200214/" + "202204045ad5743c/L2200214/Results/PRJ220425_L2200214" ) -out_dir <- here::here("nogit/tso/2023-08-01") -in_dir <- file.path(out_dir, "dracarys_gds_sync") +o1 <- sub("^gds://", "", in_dir) +out_dir <- file.path(fs::path_home(), "icav1/g", o1) +# in_dir <- file.path(out_dir, "dracarys_gds_sync") prefix <- "SBJ01639" out_format <- "rds" -umccr_tidy(in_dir = in_dir, out_dir = out_dir, prefix = prefix, out_format = out_format, dryrun = F) +umccr_tidy(in_dir = in_dir, out_dir = out_dir, prefix = prefix, out_format = out_format, dryrun = T) in_dir <- here::here(glue("nogit/tso/2022-12-13/SBJ02858/dracarys_gds_sync")) out_dir <- file.path(in_dir, "../out")