# HG changeset patch # User greg # Date 1517502147 18000 # Node ID f7563bb242fc1f21edeb5686c4e7848c5ef67a9b # Parent 71345e154c667b495fd56335c44321599b7ac8f1 Uploaded diff -r 71345e154c66 -r f7563bb242fc ideas_preprocessor.R --- a/ideas_preprocessor.R Thu Feb 01 11:22:19 2018 -0500 +++ b/ideas_preprocessor.R Thu Feb 01 11:22:27 2018 -0500 @@ -33,18 +33,6 @@ args <- parse_args(parser, positional_arguments=TRUE) opt <- args$options -create_primary_html = function(output, output_files_path) { - files = list.files(path=output_files_path); - s <- paste('', sep="\n"); - s <- paste(s, '

Files prepared for IDEAS

\n', sep=""); - s <- paste(s, '', sep=""); - cat(s, file=output); -} - tmp_dir = "tmp"; # Read the ideaspre_input_config text file which has this format: @@ -99,9 +87,12 @@ # Archive the tmp directory. cmd = "tar -cvf tmp.tar tmp"; system(cmd); +# Compress the archive. +cmd = "gzip tmp.tar"; +system(cmd); # Move the tmp archive to the output directory. -to_path = paste(opt$output_files_path, "tmp.tar", sep="/"); -file.rename("tmp.tar", to_path); +to_path = paste(opt$output_files_path, "tmp.tar.gz", sep="/"); +file.rename("tmp.tar.gz", to_path); if (!is.null(opt$chrom_bed_input) && !is.null(opt$chromosome_windows)) { # Renane opt$chrom_bed_input to be chromosomes.bed @@ -112,5 +103,4 @@ to_path = paste(opt$output_files_path, opt$chromosome_windows, sep="/"); file.rename(opt$chromosome_windows, to_path); } -# Create the primary HTML dataset. -create_primary_html(opt$output, opt$output_files_path); +