Mercurial > repos > mingchen0919 > rmarkdown_bdss_client
comparison bdss_client.Rmd @ 14:c0b8476fbc85 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:36:19 -0400 |
parents | 03893b1ee3ef |
children | fe5f30584308 |
comparison
equal
deleted
inserted
replaced
13:03893b1ee3ef | 14:c0b8476fbc85 |
---|---|
27 ```{r} | 27 ```{r} |
28 system('echo "[metadata_repository]" > bdss.cfg') | 28 system('echo "[metadata_repository]" > bdss.cfg') |
29 system('echo url=http://bdss.bioinfo.wsu.edu/ >> bdss.cfg') | 29 system('echo url=http://bdss.bioinfo.wsu.edu/ >> bdss.cfg') |
30 ``` | 30 ``` |
31 | 31 |
32 # Download and extract reads | 32 # Download data |
33 | 33 |
34 ```{r 'download and extract reads'} | 34 ```{r 'download and extract reads'} |
35 # create a directory to store read files | 35 # create a directory to store read files |
36 dir.create('read_files_directory') | 36 dir.create('read_files_directory') |
37 # download and extract reads | 37 # download and extract reads |
38 urls = strsplit(gsub(',', ' ', 'URLS'), ' ')[[1]] | 38 urls = strsplit(gsub(',', ' ', 'URLS'), ' ')[[1]] |
39 urls = urls[urls != ''] | 39 urls = urls[urls != ''] |
40 # loop through SRA accessions to download and extract reads. | 40 # loop through SRA accessions to download and extract reads. |
41 for(url in urls) { | 41 for(url in urls) { |
42 bdss_command = paste0('cd ./read_files_directory && /tool_deps/_conda/bin/bdss transfer -u ', url) | 42 bdss_command = paste0('cd ./read_files_directory && /tool_deps/_conda/bin/bdss transfer -u ', url) |
43 system(bdss_command) | 43 print(system(bdss_command, intern = TRUE)) |
44 } | 44 } |
45 ``` | 45 ``` |
46 | 46 |
47 * `fastq-dump` command | |
48 ```{r} | |
49 print(command) | |
50 ``` | |
51 | 47 |
52 * `command line stdout` | |
53 | |
54 ```{r} | |
55 system(command = command, intern = TRUE) | |
56 ``` | |
57 |