# HG changeset patch # User mingchen0919 # Date 1524686123 14400 # Node ID 5f00aef42904b9c21f09f09bf0a60de42b503d26 # Parent 2fbb7d627af101f7d15a123cd3ed0d6b3ec7bea0 planemo upload commit 58ac10c63c4cc51b4122de0fa07b887ace6df657-dirty diff -r 2fbb7d627af1 -r 5f00aef42904 expose-outputs.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/expose-outputs.sh Wed Apr 25 15:55:23 2018 -0400 @@ -0,0 +1,5 @@ +# change directory to tool outputs directory +cd ${REPORT_FILES_PATH} + +# copy outputs from tool outputs directory to corresponding galaxy output path +cp fastqc.html ${REPORT} \ No newline at end of file diff -r 2fbb7d627af1 -r 5f00aef42904 fastqc.Rmd --- a/fastqc.Rmd Wed Apr 18 09:04:09 2018 -0400 +++ b/fastqc.Rmd Wed Apr 25 15:55:23 2018 -0400 @@ -40,6 +40,14 @@ }); +```{css} +pre code, pre, code { + white-space: pre !important; + overflow-x: scroll !important; + word-break: keep-all !important; + word-wrap: initial !important; +} +``` ---------------------- @@ -49,14 +57,14 @@ # Run FastQC ```{bash} -sh ${TOOL_INSTALL_DIR}/run-fastqc.sh +sh ${TOOL_INSTALL_DIR}/shell-script-template.sh ``` - -```{r} +```{r echo=FALSE,results='asis'} # display fastqc job script -fastqc_sh = paste0(opt$X_d, '/fastqc.sh') -tags$code(tags$pre(readChar(fastqc_sh, file.info(fastqc_sh)$size ))) +cat('```bash\n') +cat(readLines(paste0(Sys.getenv('REPORT_FILES_PATH'), '/fastqc.sh')), sep = '\n') +cat('\n```') ``` # Fastqc Output Visualization @@ -396,11 +404,6 @@ - - - - - ----------------------------------------- ## Output diff -r 2fbb7d627af1 -r 5f00aef42904 fastqc.xml --- a/fastqc.xml Wed Apr 18 09:04:09 2018 -0400 +++ b/fastqc.xml Wed Apr 25 15:55:23 2018 -0400 @@ -71,7 +71,7 @@ - + 0) { - lapply(files, function(x){ - path_end = tail(strsplit(x, '/')[[1]],1) - href_path = strsplit(x, paste0(output_dir, '/'))[[1]][2] - li_item = tags$li(tags$a(path_end, href=href_path)) - li_item$attribs = list('data-jstree'='{"icon":"jstree-file"}') + dirs = list.dirs(path = dir, + recursive = FALSE, + full.names = TRUE) + tags$ul({ + if (length(files) > 0) { + lapply(files, function(x) { + path_end = tail(strsplit(x, '/')[[1]], 1) + href_path = strsplit(x, paste0(output_dir, '/'))[[1]][2] + li_item = tags$li(tags$a(path_end, href = href_path)) + li_item$attribs = list('data-jstree' = '{"icon":"jstree-file"}') + li_item + }) + } + }, + { + if (length(dirs) > 0) { + lapply(dirs, function(x) { + path_end = tail(strsplit(x, '/')[[1]], 1) + # hide vakata-jstree-3.3.5 folder + if (path_end != 'vakata-jstree-3.3.5') { + # x_path = strsplit(x, paste0(output_dir, '/'))[[1]][2] + li_item = tags$li(path_end, file_tree(x)) + li_item$attribs = list('data-jstree' = '{"icon":"jstree-folder"}') li_item - }) - } - }, - { - if (length(dirs) > 0) { - lapply(dirs, function(x){ - x_path = strsplit(x, paste0(output_dir, '/'))[[1]][2] - li_item = tags$li(x_path, file_tree(x)) - li_item$attribs = list('data-jstree'='{"icon":"jstree-folder"}') - li_item - }) - } + } + }) } - ) + }) } diff -r 2fbb7d627af1 -r 5f00aef42904 run-fastqc.sh --- a/run-fastqc.sh Wed Apr 18 09:04:09 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - -#create extra file directory -mkdir -p ${X_d} - -cd ${X_d} -cp ${X_r} ${X_d}/read_1.fq -cp ${X_R} ${X_d}/read_2.fq - -cat >temp.sh < /dev/null 2>&1 - -fastqc \\ - -q \\ - -c ${X_c} \\ - -l ${X_l} \\ - ${X_d}/read_2.fq > /dev/null 2>&1 -EOL - -grep -v None temp.sh > fastqc.sh -rm temp.sh - -# run fastqc -sh fastqc.sh - -# unzip outputs -unzip -q read_1_fastqc.zip -unzip -q read_2_fastqc.zip \ No newline at end of file diff -r 2fbb7d627af1 -r 5f00aef42904 shell-script-template.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shell-script-template.sh Wed Apr 25 15:55:23 2018 -0400 @@ -0,0 +1,36 @@ +# SHELL_SCRIPT file name +SHELL_SCRIPT='fastqc.sh' + +# run SHELL_SCRIPT within tool outputs directory +cd ${REPORT_FILES_PATH} + +# build job-script.sh +cat >temp.sh < /dev/null 2>&1 + +fastqc \\ + -q \\ + -c ${X_c} \\ + -l ${X_l} \\ + ${X_d}/read_2.fq > /dev/null 2>&1 + +EOF + +grep -v None temp.sh > ${SHELL_SCRIPT} +rm temp.sh + +# run SHELL_SCRIPT +sh ${SHELL_SCRIPT} + + +# unzip outputs +unzip -q read_1_fastqc.zip +unzip -q read_2_fastqc.zip \ No newline at end of file