Mercurial > repos > mingchen0919 > rmarkdown_bdss_client
comparison bdss_client_sra_pe.Rmd @ 7:efb1938c3020 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 13:21:54 -0400 |
parents | 415ebc9016da |
children | fe5f30584308 |
comparison
equal
deleted
inserted
replaced
6:415ebc9016da | 7:efb1938c3020 |
---|---|
29 sra_accessions = strsplit(gsub(',', ' ', 'SRA_ACCESSION'), ' ')[[1]] | 29 sra_accessions = strsplit(gsub(',', ' ', 'SRA_ACCESSION'), ' ')[[1]] |
30 sra_accessions = sra_accessions[sra_accessions != ''] | 30 sra_accessions = sra_accessions[sra_accessions != ''] |
31 # loop through SRA accessions to download and extract reads. | 31 # loop through SRA accessions to download and extract reads. |
32 for(id in sra_accessions) { | 32 for(id in sra_accessions) { |
33 if (SRA_BOOLEAN) { | 33 if (SRA_BOOLEAN) { |
34 | |
34 # build URL from SRA accession | 35 # build URL from SRA accession |
35 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/', | 36 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/', |
37 substr(id, 1, 3), '/', | |
36 substr(id, 1, 6), '/', id, '/', id, '.sra') | 38 substr(id, 1, 6), '/', id, '/', id, '.sra') |
37 # download sra file with bdss | 39 # download sra file with bdss |
38 bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url) | 40 bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url) |
39 system(bdss_command, intern = TRUE) | 41 system(bdss_command, intern = TRUE) |
40 # convert .sra to .fastq/.fasta | 42 # convert .sra to .fastq/.fasta |