Mercurial > repos > mingchen0919 > rmarkdown_bdss_client
view bdss_client.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 | c0b8476fbc85 |
children | c2150a0f9c7c |
line wrap: on
line source
--- title: 'Download with BDSS client' output: html_document: number_sections: true toc: true theme: cosmo highlight: tango --- ```{r setup, include=FALSE, warning=FALSE, message=FALSE} knitr::opts_chunk$set( echo = ECHO ) ``` # Command line arguments ```{r 'command line arguments'} str(opt) ``` # BDSS configuration file First, we create a bdss configuration file `bdss.cfg` in the current directory. ```{r} system('echo "[metadata_repository]" > bdss.cfg') system('echo url=http://bdss.bioinfo.wsu.edu/ >> bdss.cfg') ``` # Download data ```{r 'download and extract reads'} # create a directory to store read files dir.create('read_files_directory') # download and extract reads urls = strsplit(gsub(',', ' ', 'URLS'), ' ')[[1]] urls = urls[urls != ''] # loop through SRA accessions to download and extract reads. for(url in urls) { # bdss_command = paste0('cd ./read_files_directory && /tool_deps/_conda/bin/bdss transfer -u ', url) bdss_command = paste0('cd ./read_files_directory && /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url) print(system(bdss_command, intern = TRUE)) } ```