Mercurial > repos > mingchen0919 > elastic_expose_data
diff list_paired.Rmd @ 6:52ecc1cfd205 draft
planemo upload commit 979e0f1c28c74ca7df02ef20c2208e9677bc820a-dirty
author | mingchen0919 |
---|---|
date | Mon, 02 Apr 2018 10:21:30 -0400 |
parents | 4f9f1e76f7e6 |
children |
line wrap: on
line diff
--- a/list_paired.Rmd Mon Apr 02 09:16:17 2018 -0400 +++ b/list_paired.Rmd Mon Apr 02 10:21:30 2018 -0400 @@ -30,25 +30,18 @@ ``` ```{r, echo=FALSE} -# write('', file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/script.sh')) +write('', file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/script.sh')) if (nrow(df) > 0) { for (i in 1:nrow(df)) { tool_output_dir = readLines(df[i, 'tool_output_dir'])[1] full_path = paste0(tool_output_dir, '/', df[i, 'relative_path']) + # if it is a directory path, add '/*' to the end. if (dir.exists(full_path)) { - from_files = list.files(full_path, full.names = TRUE) - to_files = list.files(full_path) - to_files = paste0(list_paired_path, to_files) - file.copy(from = from_files, to = to_files) + full_path = paste0(full_path, '/*') } - if (file.exists(full_path)) { - # to_files = list.files(full_path) - to_file = tail(strsplit(full_path, '/')[[1]], 1) - file.copy(from = full_path, to = paste0(list_paired_path, to_file)) - } - # command_line = paste0('cp -r ', full_path, ' paired') - # write(command_line, append = TRUE, - # file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/script.sh')) + command_line = paste0('cp -r ', full_path, ' list_paired') + write(command_line, append = TRUE, + file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/script.sh')) } } ```