Mercurial > repos > greg > ideas_preprocessor
comparison ideas_preprocessor.R @ 7:92bb33490bb4 draft
Uploaded
| author | greg |
|---|---|
| date | Wed, 24 Jan 2018 09:55:28 -0500 |
| parents | 2b4e1bd725f7 |
| children | 0cf23f33d13d |
comparison
equal
deleted
inserted
replaced
| 6:6fe65d1379a8 | 7:92bb33490bb4 |
|---|---|
| 1 (.venv) [galaxy@IDEAS ideas_preprocessor]$ cat ideas_preprocessor.R | |
| 2 #!/usr/bin/env Rscript | 1 #!/usr/bin/env Rscript |
| 3 | 2 |
| 4 suppressPackageStartupMessages(library("data.table")) | 3 suppressPackageStartupMessages(library("data.table")) |
| 5 suppressPackageStartupMessages(library("optparse")) | 4 suppressPackageStartupMessages(library("optparse")) |
| 6 | 5 |
| 86 for (i in 1:length(tmp_files)) { | 85 for (i in 1:length(tmp_files)) { |
| 87 from_path = paste(tmp_dir, tmp_files[i], sep="/"); | 86 from_path = paste(tmp_dir, tmp_files[i], sep="/"); |
| 88 to_path = paste(output_tmp_dir, tmp_files[i], sep="/"); | 87 to_path = paste(output_tmp_dir, tmp_files[i], sep="/"); |
| 89 file.rename(from_path, to_path); | 88 file.rename(from_path, to_path); |
| 90 } | 89 } |
| 91 if (!is.nulll(opt$chrom_bed_input) && !is.null(opt$chromosome_windows)) { | 90 if (!is.null(opt$chrom_bed_input) && !is.null(opt$chromosome_windows)) { |
| 92 # Rename chrom_bed_input to chromosomes.txt | 91 # Rename chrom_bed_input to chromosomes.txt |
| 93 # and move it to the output directory. | 92 # and move it to the output directory. |
| 94 to_path = paste(opt$output_files_path, "chromosomes.bed", sep="/"); | 93 to_path = paste(opt$output_files_path, "chromosomes.bed", sep="/"); |
| 95 file.rename(opt$chrom_bed_input, to_path) | 94 file.rename(opt$chrom_bed_input, to_path) |
| 96 # Move chromosome_windows.txt to the output directory. | 95 # Move chromosome_windows.txt to the output directory. |
