changeset 5:a1dfadeb3b59 draft

planemo upload for repository https://github.com/feltus/BDSS
author mingchen0919
date Tue, 12 Jun 2018 11:13:54 -0400
parents c062782a7534
children 9dabaecf12ff
files rmarkdown_report.Rmd
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/rmarkdown_report.Rmd	Tue Jun 12 10:58:55 2018 -0400
+++ b/rmarkdown_report.Rmd	Tue Jun 12 11:13:54 2018 -0400
@@ -79,9 +79,9 @@
     write(command_stdout, file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/bdss-download.log.txt'), append = TRUE)
     # convert .sra to .fastq/.fasta
     if(opt$X_f == 'fasta') {
-      command = paste0('fastq-dump --fasta -O se_read_files_dir ', id, '.sra')
+      command = paste0('fastq-dump --fasta -O ', se_dir, ' ', id, '.sra')
     } else {
-      command = paste0('fastq-dump -O se_read_files_dir ', id, '.sra')
+      command = paste0('fastq-dump -O ', se_dir, ' ', id, '.sra')
     }
     cat('----convert SRA to fastq/fasta------\n')
     command_stdout = system(command, intern = TRUE)
@@ -103,9 +103,9 @@
     write(command_stdout, file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/bdss-download.log.txt'), append = TRUE)
     # convert .sra to .fastq/.fasta
     if(opt$X_f == 'fasta') {
-      command = paste0('fastq-dump --fasta --split-files -O pe_read_files_dir ', id, '.sra')
+      command = paste0('fastq-dump --fasta --split-files -O ',pe_dir, ' ', id, '.sra')
     } else {
-      command = paste0('fastq-dump --split-files -O pe_read_files_dir ', id, '.sra')
+      command = paste0('fastq-dump --split-files -O ',pe_dir, ' ', id, '.sra')
     }
     cat('----convert SRA to fastq/fasta------\n')
     command_stdout = system(command, intern = TRUE)
@@ -121,7 +121,7 @@
 
 cat('-----Renaming files------\n')
 # rename files for paired end reads
-old_files = paste0('./pe_read_files_dir/', list.files('./pe_read_files_dir'))
+old_files = list.files(path = pe_dir, full.names = TRUE)
 new_files = gsub('_1', '_forward', old_files)
 new_files = gsub('_2', '_reverse', new_files)
 file.rename(old_files, new_files)