Mercurial > repos > mingchen0919 > statonlab_fasta_splitter
view split_fasta.Rmd @ 0:3918528c19b4 draft
planemo upload
| author | mingchen0919 |
|---|---|
| date | Mon, 09 Apr 2018 11:51:32 -0400 |
| parents | |
| children | ecf34bd52987 |
line wrap: on
line source
--- title: 'FASTA splitter' output: html_document: highlight: pygments --- ```{r setup, include=FALSE, warning=FALSE, message=FALSE} knitr::opts_chunk$set(echo = TRUE, error = TRUE) ``` ```{bash} # build job-script mkdir -p ${WORKING_DIR}/fasta_files # single-end.sh cat <<EOF >${X_d}/fasta_splitter.sh ${WORKING_DIR}/fasta_files && \\ ${X_t}/split.pl ${X_A} ${X_B} > ${X_d}/fasta_splitter-log.txt 2>&1 EOF ``` ```{bash, 'run jobs', echo=FALSE} # run job script, always use absolute path. # we want to run all jobs within the working path. sh ${X_d}/fasta_splitter.sh ``` ```{r, 'display output directory contents', results='asis', echo=FALSE} ## after the job is done, we list all files from the output directory. ## full relative path to the output directory needs to be displayed. cat('##All output files') cat('\n\n') all_files = list.files(path = Sys.getenv('REPORT_FILES_PATH'), full.names = TRUE, recursive = TRUE) for (f in sub(Sys.getenv('REPORT_FILES_PATH'), '.', all_files) ) { cat('* [', f, '](', f, ')\n') } cat('\n') ```
