annotate bdss_client_sra_pe.Rmd @ 3:c707a4178832 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
author mingchen0919
date Wed, 11 Oct 2017 11:23:04 -0400
parents 614e9553f366
children 04100e773314
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
1 ---
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
2 title: 'Fastq-dump: download and extract paired end reads into FASTQ/FASTA file'
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
3 output:
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
4 html_document:
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
5 number_sections: true
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
6 toc: true
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
7 theme: cosmo
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
8 highlight: tango
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
9 ---
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
10
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
11 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
12 knitr::opts_chunk$set(
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
13 echo = ECHO
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
14 )
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
15 ```
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
16
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
17 # Command line arguments
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
18
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
19 ```{r 'command line arguments'}
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
20 str(opt)
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
21 ```
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
22
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
23 # Download and extract reads
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
24
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
25 ```{r 'download and extract reads'}
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
26 # create a directory to store read files
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
27 dir.create('read_files_directory')
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
28 # download and extract reads
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
29 sra_accessions = strsplit(gsub(',', ' ', 'SRA_ACCESSION'), ' ')[[1]]
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
30 sra_accessions = sra_accessions[sra_accessions != '']
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
31 # loop through SRA accessions to download and extract reads.
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
32 for(id in sra_accessions) {
3
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
33 if (SRA_BOOLEAN) {
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
34 # build URL from SRA accession
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
35 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/',
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
36 substr(id, 1, 6), '/', id, '/', id, '.sra')
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
37 # download sra file with bdss
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
38 bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
39 system(bdss_command, intern = TRUE)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
40 # convert .sra to .fastq/.fasta
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
41 if('FORMAT' == 'fasta') {
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
42 command = paste0('fastq-dump --fasta --split-files ', '-O read_files_directory ', id)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
43 } else {
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
44 command = paste0('fastq-dump --split-files ', '-O read_files_directory ', id)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
45 }
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
46 # command line stdout
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
47 system(command = command, intern = TRUE)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
48 } else {
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
49 # if SRA_BOOLEAN is FALSE, download fastq directly
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
50 # build URL for downloading fastq
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
51 url_base = paste0('ftp://ftp.sra.ebi.ac.uk/vol1/fastq/',
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
52 substr(id, 1, 6), '/', id)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
53 # list all fastq files
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
54 all_fastq_files = strsplit(getURL(url_base, dirlistonly = TRUE), split = '\n')[[1]]
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
55 if (length(all_fastq_files) == 1) {
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
56 # this is a single end SRA file. build url to download fastq
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
57 print(paste0('only one fastq file found for this SRA accession: ', id))
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
58 print('Downloading skipped for ', id)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
59 # url = paste0(url_base, '/', all_fastq_files)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
60 # bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
61 # run_bdss = system(bdss_command, intern = TRUE)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
62 # print(run_bdss)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
63 } else {
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
64 print(paste0('Two fastq files found for this SRA accession: ', id))
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
65 print('Downloading skipped for ', id)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
66 url_1 = paste0(url_base, '/', all_fastq_files[1])
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
67 bdss_command_1 = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url_1)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
68 run_bdss_1 = system(bdss_command, intern = TRUE)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
69 print(run_bdss_1)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
70 url_2 = paste0(url_base, '/', all_fastq_files[1])
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
71 bdss_command_2 = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url_2)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
72 run_bdss_2 = system(bdss_command, intern = TRUE)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
73 print(run_bdss_2)
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
74 }
0
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
75 }
3
c707a4178832 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 0
diff changeset
76
0
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
77 }
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
78 # remove all .sra file
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
79 system('rm *.sra', intern = TRUE)
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
80 ```
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
81
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
82
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
83 # Rename files
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
84
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
85 ```{r}
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
86 old_files = paste0('./read_files_directory/', list.files('./read_files_directory'))
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
87 new_files = gsub('_1', '_forward', old_files)
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
88 new_files = gsub('_2', '_reverse', new_files)
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
89 file.rename(old_files, new_files)
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
90 ```
614e9553f366 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit 36de2ee9751d1ef5db0c76c217fd5ba262ca3739-dirty
mingchen0919
parents:
diff changeset
91