@@ -19,7 +19,6 @@ write_csv(pkg_versions, file.path(results_dir, 'r-packages.csv'))
1919# parse CLI arguments
2020parser <- ArgumentParser()
2121
22- parser $ add_argument(" --regex_moo" , type = " character" , default = " .*\\ .rds$" )
2322parser $ add_argument(" --count_type" , type = " character" , default = " filt" )
2423parser $ add_argument(" --sub_count_type" , type = " character" , default = NULL , help = " Sub count type if count_type is a list" )
2524parser $ add_argument(" --feature_id_colname" , type = " character" , default = NULL , help = " Column name for feature IDs" )
@@ -51,11 +50,12 @@ parse_vector_with_default <- function(x, default) {
5150}
5251
5352# validate inputs
53+ regex_moo <- " .*\\ .rds$"
5454data_files <- list.files(file.path(' ../data' ), recursive = TRUE , full.names = TRUE )
55- moo_files <- Filter(\(x ) str_detect(x , regex(args $ regex_moo , ignore_case = TRUE )), data_files )
55+ moo_files <- Filter(\(x ) str_detect(x , regex(regex_moo , ignore_case = TRUE )), data_files )
5656
5757if (length(moo_files ) == 0 ) {
58- stop(glue(" No files matching regex: {args$ regex_moo}" ))
58+ stop(glue(" No files matching regex: {regex_moo}" ))
5959}
6060moo_filename <- moo_files [1 ]
6161moo <- read_rds(moo_filename )
0 commit comments