changeset 10:4b73dbd97a0e draft default tip

planemo upload for repository https://github.com/feltus/BDSS
author mingchen0919
date Tue, 12 Jun 2018 12:30:21 -0400
parents 39831b70aabb
children
files rmarkdown_report.Rmd
diffstat 1 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/rmarkdown_report.Rmd	Tue Jun 12 12:12:56 2018 -0400
+++ b/rmarkdown_report.Rmd	Tue Jun 12 12:30:21 2018 -0400
@@ -76,7 +76,6 @@
     # download sra file with bdss
     bdss_command = paste0('bdss transfer -u ', url, '>> ${REPORT_FILES_PATH}/log.txt 2>&1')
     command_stdout = system(bdss_command, intern = TRUE)
-    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_dir, ' ', id, '.sra')
@@ -99,7 +98,6 @@
     # download sra file with bdss
     bdss_command = paste0('bdss transfer -u ', url, '>> ${REPORT_FILES_PATH}/log.txt 2>&1')
     command_stdout = system(bdss_command, intern = TRUE)
-    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_dir, ' ', id, '.sra')
@@ -108,17 +106,15 @@
     }
     command_stdout = system(command, intern = TRUE)
     write(command_stdout, file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/fastq-dump.log.txt'), append = TRUE)
-    # if(!(paste0(id, '_2.', opt$X_f) %in% list.files('pe_read_files_dir'))) {
-    #   # this is not a paired end SRA file. The corresponding file will be deleted.
-    #   cat(paste0(id, ' is not paired end SRA, the corresponding fastq/fasta file will deleted.'))
-    #   command_stdout = system(paste0('rm ', pe_dir, '/', id, '_1.*'), intern = TRUE)
-    # }
-    
 }
 
+```
+
+```{r echo=FALSE}
 # rename files for paired end reads
 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)
+res = file.rename(old_files, new_files)
 ```
+