# HG changeset patch # User mingchen0919 # Date 1528816434 14400 # Node ID a1dfadeb3b59fcfc6f11ff8beaa5841d7e9ebcd1 # Parent c062782a7534ba1c6211e445a8c4ff65cf27cef6 planemo upload for repository https://github.com/feltus/BDSS diff -r c062782a7534 -r a1dfadeb3b59 rmarkdown_report.Rmd --- 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)