# HG changeset patch
# User mingchen0919
# Date 1522672379 14400
# Node ID 9ff33a3631fa7bc59b653eeab22912eb05f53215
# Parent 5838300fc1aab0cd75b635a8d275216b2bc4ec40
planemo upload commit 979e0f1c28c74ca7df02ef20c2208e9677bc820a-dirty
diff -r 5838300fc1aa -r 9ff33a3631fa elastic_expose_individuals.xml
--- a/elastic_expose_individuals.xml Mon Apr 02 00:32:04 2018 -0400
+++ b/elastic_expose_individuals.xml Mon Apr 02 08:32:59 2018 -0400
@@ -51,7 +51,7 @@
############ run render R script to render R markdowns
- Rscript '${__tool_directory__}/paired_render.R'
+ Rscript '${__tool_directory__}/individuals_render.R'
]]>
@@ -61,11 +61,10 @@
-
-
-
+
+
diff -r 5838300fc1aa -r 9ff33a3631fa elastic_expose_to_list_collection.xml
--- a/elastic_expose_to_list_collection.xml Mon Apr 02 00:32:04 2018 -0400
+++ b/elastic_expose_to_list_collection.xml Mon Apr 02 08:32:59 2018 -0400
@@ -61,8 +61,8 @@
-
-
+
+
diff -r 5838300fc1aa -r 9ff33a3631fa elastic_expose_to_list_paired_collection.xml
--- a/elastic_expose_to_list_paired_collection.xml Mon Apr 02 00:32:04 2018 -0400
+++ b/elastic_expose_to_list_paired_collection.xml Mon Apr 02 08:32:59 2018 -0400
@@ -61,8 +61,8 @@
-
-
+
+
diff -r 5838300fc1aa -r 9ff33a3631fa individuals.Rmd
--- a/individuals.Rmd Mon Apr 02 00:32:04 2018 -0400
+++ b/individuals.Rmd Mon Apr 02 08:32:59 2018 -0400
@@ -37,11 +37,15 @@
full_path = paste0(tool_output_dir, '/', df[i, 'relative_path'])
if (dir.exists(full_path)) {
from_files = list.files(full_path, full.names = TRUE)
- to_files = paste0(Sys.getenv('individual_outputs/'), list.files(full_path))
+ to_files = list.files(full_path)
+ to_files = paste0(individual_outputs_path, to_files)
file.copy(from = from_files, to = to_files)
}
if (file.exists(full_path)) {
- file.copy(from = full_path, to = paste0(Sys.getenv('individual_outputs/'), df[i, 'relative_path']))
+ # to_files = list.files(full_path)
+ to_file = tail(strsplit(full_path, '/')[[1]], 1)
+ print(to_file)
+ file.copy(from = full_path, to = paste0(individual_outputs_path, to_file))
}
# command_line = paste0('cp -r ', full_path, ' paired')
# write(command_line, append = TRUE,
diff -r 5838300fc1aa -r 9ff33a3631fa individuals_render.R
--- a/individuals_render.R Mon Apr 02 00:32:04 2018 -0400
+++ b/individuals_render.R Mon Apr 02 08:32:59 2018 -0400
@@ -19,9 +19,12 @@
# create three folders within working directory
dir.create('individual_outputs')
+job_working_dir = getwd()
+individual_outputs_path = paste0(job_working_dir, '/individual_outputs/')
+
#-----------------render Rmd--------------
# copy R markdown file to working directory and render it within the working directory.
-render(paste0(Sys.getenv('TOOL_INSTALL_DIR'), '/paired.Rmd'),
+render(paste0(Sys.getenv('TOOL_INSTALL_DIR'), '/individuals.Rmd'),
output_file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/report.html'))
# for some unknow reason, directly using REPORT as the input value for output_file parameter