Mercurial > repos > greg > ideas_preprocessor
changeset 25:f7563bb242fc draft
Uploaded
author | greg |
---|---|
date | Thu, 01 Feb 2018 11:22:27 -0500 |
parents | 71345e154c66 |
children | 06e63b5cb025 |
files | ideas_preprocessor.R |
diffstat | 1 files changed, 6 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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('<html><head></head><body>', sep="\n"); - s <- paste(s, '<h3>Files prepared for IDEAS</h3>\n', sep=""); - s <- paste(s, '<ul>\n', sep=""); - for (i in 1:length(files)) { - s <- paste(s, '<li><a href="', files[i], '">', files[i], '</a></li>\n', sep=""); - } - s <- paste(s, '</ul></body></html>', 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); +