# HG changeset patch # User mingchen0919 # Date 1519932315 18000 # Node ID 746b9263ec646921d9cacd1038ad3c14ce3675e5 planemo upload diff -r 000000000000 -r 746b9263ec64 skewer.Rmd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/skewer.Rmd Thu Mar 01 14:25:15 2018 -0500 @@ -0,0 +1,29 @@ +--- +title: 'HTML report title' +output: + html_document: + number_sections: true + toc: true + theme: cosmo + highlight: tango +--- + +```{r setup, include=FALSE, warning=FALSE, message=FALSE} +knitr::opts_chunk$set( + echo = as.logical(), + error = TRUE +) +``` + + +# Code for computational analysis + +```{r 'step 1'} + +``` + +```{r 'ste[ 2'} + +``` + + diff -r 000000000000 -r 746b9263ec64 skewer.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/skewer.xml Thu Mar 01 14:25:15 2018 -0500 @@ -0,0 +1,54 @@ + + A fast and accurate adapter trimmer for next-generation sequencing paired-end reads + + + pandocr-getoptr-rmarkdownskewer + + + + + + + + + + diff -r 000000000000 -r 746b9263ec64 skewer_render.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/skewer_render.R Thu Mar 01 14:25:15 2018 -0500 @@ -0,0 +1,50 @@ +##============ Sink warnings and errors to a file ============== +## use the sink() function to wrap all code within it. +##============================================================== +zz = file('warnings_and_errors.txt') +sink(zz) +sink(zz, type = 'message') + +#------------import libraries-------------------- +options(stringsAsFactors = FALSE) + +library(getopt) +library(rmarkdown) +#------------------------------------------------ + + +#------------get arguments into R-------------------- +# getopt_specification_matrix(extract_short_flags('fastqc_report.xml')) %>% +# write.table(file = 'spec.txt', sep = ',', row.names = FALSE, col.names = TRUE, quote = FALSE) + + +spec_matrix = as.matrix() +opt = getopt(spec_matrix) +#---------------------------------------------------- + + +#-----------using passed arguments in R +# to define system environment variables--- +do.call(Sys.setenv, opt[-1]) +#---------------------------------------------------- + +#---------- often used variables ---------------- +# OUTPUT_DIR: path to the output associated directory, which stores all outputs +# TOOL_DIR: path to the tool installation directory +OUTPUT_DIR = '' +TOOL_DIR = '' +RMD_NAME = '' + +# create the output associated directory to store all outputs +dir.create(OUT_DIR, recursive = TRUE) + +#-----------------render Rmd-------------- +render(paste0(TOOL_DIR, RMD_NAME, sep = '/'), OUTPUT_DIR) +#------------------------------------------ + +#==============the end============== + + +##--------end of code rendering .Rmd templates---------------- +sink() +##=========== End of sinking output============================= \ No newline at end of file