annotate bdss_client_sra_pe.Rmd @ 15:fe5f30584308 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 14:50:19 -0400
parents efb1938c3020
children c2150a0f9c7c
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) {
7
efb1938c3020 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 6
diff changeset
34
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
35 # build URL from SRA accession
7
efb1938c3020 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 6
diff changeset
36 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/',
efb1938c3020 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 6
diff changeset
37 substr(id, 1, 3), '/',
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
38 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
39 # download sra file with bdss
15
fe5f30584308 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 7
diff changeset
40 bdss_command = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url)
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
41 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
42 # 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
43 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
44 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
45 } 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
46 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
47 }
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 # 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
49 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
50 } 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
51 # 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
52 # 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
53 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
54 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
55 # 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
56 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
57 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
58 # 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
59 print(paste0('only one fastq file found for this SRA accession: ', id))
5
04100e773314 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 3
diff changeset
60 print(paste0('Downloading skipped for ', id))
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
61 # url = paste0(url_base, '/', all_fastq_files)
15
fe5f30584308 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 7
diff changeset
62 # bdss_command = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url)
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
63 # 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
64 # 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
65 } 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
66 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
67 url_1 = paste0(url_base, '/', all_fastq_files[1])
15
fe5f30584308 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 7
diff changeset
68 bdss_command_1 = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url_1)
6
415ebc9016da planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 5
diff changeset
69 run_bdss_1 = system(bdss_command_1, intern = TRUE)
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
70 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
71 url_2 = paste0(url_base, '/', all_fastq_files[1])
15
fe5f30584308 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 7
diff changeset
72 bdss_command_2 = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url_2)
6
415ebc9016da planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit ea6df97960569d247d64be1549aa90768c9786f4-dirty
mingchen0919
parents: 5
diff changeset
73 run_bdss_2 = system(bdss_command_2, intern = TRUE)
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
74 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
75 }
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
76 }
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
77
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
78 }
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 # 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
80 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
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
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 # 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
85
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 ```{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
87 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
88 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
89 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
90 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
91 ```
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
92