Skip to content

Commit

Permalink
compress output
Browse files Browse the repository at this point in the history
  • Loading branch information
allyhawkins committed Jan 9, 2025
1 parent 939103f commit bcb16a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion analyses/cell-type-consensus/assign-consensus-celltypes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd $(dirname "$0")

data_dir="../../data/current"
# path to save consensus results
scpca_consensus_assignments_file="results/scpca-consensus-celltype-assignments.tsv"
scpca_consensus_assignments_file="results/scpca-consensus-celltype-assignments.tsv.gz"
# directory to store all individual tsv files
celltype_tsv_dir="results/original-celltype-assignments"
mkdir -p ${celltype_tsv_dir}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ option_list <- list(
make_option(
opt_str = c("--output_file"),
type = "character",
help = "Path to file where combined TSV file will be saved, must end in `.tsv`"
help = "Path to file where combined TSV file will be saved.
File name must end in either `.tsv` or `.tsv.gz` to save a compressed TSV file"
)
)

Expand All @@ -46,7 +47,8 @@ opt <- parse_args(OptionParser(option_list = option_list))
# make sure reference files exist
stopifnot(
"panglao reference file does not exist" = file.exists(opt$panglao_ref_file),
"cell type consensus reference file does not exist" = file.exists(opt$consensus_ref_file)
"cell type consensus reference file does not exist" = file.exists(opt$consensus_ref_file),
"output file must end in `.tsv` or `.tsv.gz`" = stringr::str_detect(opt$output_file, ".tsv|.tsv.gz")
)

# read in ref files
Expand Down

0 comments on commit bcb16a5

Please sign in to comment.