Mercurial > repos > mingchen0919 > rmarkdown_fastq_dump
changeset 19:42e154ba2d35 draft
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit c4beda20972367ab7d47a058a01a5f6fe492255d-dirty
author | mingchen0919 |
---|---|
date | Wed, 27 Sep 2017 21:15:56 -0400 |
parents | dcd0e0b6fcaf |
children | 2167f32cf379 |
files | fastq_dump_pe.Rmd fastq_dump_pe.xml fastq_dump_pe_render.R fastq_dump_se.Rmd fastq_dump_se_render.R |
diffstat | 5 files changed, 27 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/fastq_dump_pe.Rmd Wed Sep 27 20:43:32 2017 -0400 +++ b/fastq_dump_pe.Rmd Wed Sep 27 21:15:56 2017 -0400 @@ -31,16 +31,25 @@ # loop through SRA accessions to download and extract reads. for(id in sra_accessions) { if('FORMAT' == 'fasta') { - command = paste0('fastq-dump --fasta --split_files ', '-O read_files_directory ') + command = paste0('fastq-dump --fasta --split-files ', '-O read_files_directory ', id) } else { - command = paste0('fastq-dump --split_files ', '-O read_files_directory ') + command = paste0('fastq-dump --split-files ', '-O read_files_directory ', id) } - - print(command) - system(command = command) } ``` +* `fastq-dump` command +```{r} +print(command) +``` + +* `command line stdout` + +```{r} +system(command = command, intern = TRUE) +``` + + # Rename files ```{r}
--- a/fastq_dump_pe.xml Wed Sep 27 20:43:32 2017 -0400 +++ b/fastq_dump_pe.xml Wed Sep 27 21:15:56 2017 -0400 @@ -42,7 +42,7 @@ </inputs> <outputs> <data format="html" name="report" label="Fastq-dump report" /> - <collection type="list" name="list_collection" label="Fastq-dump (paired end reads)"> + <collection type="list:paired" name="list_collection" label="Fastq-dump (paired end reads)"> <discover_datasets pattern="(?P<identifier_0>[^_]+)_(?P<identifier_1>[^_]+)\.(?P<ext>[^\._]+)?" directory="read_files_directory"/> </collection> <data format="txt" name="sink_message" label="Warnings and Errors" from_work_dir="warnings_and_errors.txt" />
--- a/fastq_dump_pe_render.R Wed Sep 27 20:43:32 2017 -0400 +++ b/fastq_dump_pe_render.R Wed Sep 27 21:15:56 2017 -0400 @@ -54,7 +54,6 @@ library(dplyr) #----- 1. create the report directory ------------------------ -# system(paste0('mkdir -p ', opt$output_dir)) dir.create(opt$output_dir) #----- 2. generate Rmd files with Rmd templates --------------
--- a/fastq_dump_se.Rmd Wed Sep 27 20:43:32 2017 -0400 +++ b/fastq_dump_se.Rmd Wed Sep 27 21:15:56 2017 -0400 @@ -35,8 +35,17 @@ } else { command = paste0('fastq-dump ', '-O read_files_directory ', id) } - print(command) - system(command = command) } ``` +* `fastq-dump` command +```{r} +print(command) +``` + +* `command line stdout` + +```{r} +system(command = command, intern = TRUE) +``` +
--- a/fastq_dump_se_render.R Wed Sep 27 20:43:32 2017 -0400 +++ b/fastq_dump_se_render.R Wed Sep 27 21:15:56 2017 -0400 @@ -54,7 +54,7 @@ library(dplyr) #----- 1. create the report directory ------------------------ -system(paste0('mkdir -p ', opt$output_dir)) +dir.create(opt$output_dir) #----- 2. generate Rmd files with Rmd templates -------------- # a. templates without placeholder variables: