comparison bdss_client_sra.Rmd @ 25:821832531529 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_bdss_client commit b212086a85c4d1e62e0d0c0e77b6f3fcabea04ef-dirty
author mingchen0919
date Sun, 15 Oct 2017 22:38:29 -0400
parents a1c0ebd05f2f
children fb8f1d1ceeae
comparison
equal deleted inserted replaced
24:a1c0ebd05f2f 25:821832531529
44 # build URL from SRA id 44 # build URL from SRA id
45 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/', 45 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/',
46 substr(id, 1, 3), '/', 46 substr(id, 1, 3), '/',
47 substr(id, 1, 6), '/', id, '/', id, '.sra') 47 substr(id, 1, 6), '/', id, '/', id, '.sra')
48 # download sra file with bdss 48 # download sra file with bdss
49 bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url) 49 bdss_command = paste0('/main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url)
50 system(bdss_command, intern = TRUE) 50 system(bdss_command, intern = TRUE)
51 # convert .sra to .fastq/.fasta 51 # convert .sra to .fastq/.fasta
52 if('FORMAT' == 'fasta') { 52 if('FORMAT' == 'fasta') {
53 command = paste0('fastq-dump --fasta -O se_read_files_directory ', id, '.sra') 53 command = paste0('fastq-dump --fasta -O se_read_files_directory ', id, '.sra')
54 } else { 54 } else {
66 # build URL from SRA id 66 # build URL from SRA id
67 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/', 67 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/',
68 substr(id, 1, 3), '/', 68 substr(id, 1, 3), '/',
69 substr(id, 1, 6), '/', id, '/', id, '.sra') 69 substr(id, 1, 6), '/', id, '/', id, '.sra')
70 # download sra file with bdss 70 # download sra file with bdss
71 bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url) 71 bdss_command = paste0('/main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url)
72 system(bdss_command, intern = TRUE) 72 system(bdss_command, intern = TRUE)
73 # convert .sra to .fastq/.fasta 73 # convert .sra to .fastq/.fasta
74 if('FORMAT' == 'fasta') { 74 if('FORMAT' == 'fasta') {
75 command = paste0('fastq-dump --fasta --split-files -O pe_read_files_directory ', id, '.sra') 75 command = paste0('fastq-dump --fasta --split-files -O pe_read_files_directory ', id, '.sra')
76 } else { 76 } else {