Mercurial > repos > mingchen0919 > rmarkdown_bdss_client
comparison bdss_client_sra_pe.Rmd @ 16:c2150a0f9c7c 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 15:06:20 -0400 |
parents | fe5f30584308 |
children | 246cb7315673 |
comparison
equal
deleted
inserted
replaced
15:fe5f30584308 | 16:c2150a0f9c7c |
---|---|
35 # build URL from SRA accession | 35 # build URL from SRA accession |
36 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/', | 36 url = paste0('ftp://ftp.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/', |
37 substr(id, 1, 3), '/', | 37 substr(id, 1, 3), '/', |
38 substr(id, 1, 6), '/', id, '/', id, '.sra') | 38 substr(id, 1, 6), '/', id, '/', id, '.sra') |
39 # download sra file with bdss | 39 # download sra file with bdss |
40 bdss_command = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url) | 40 bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url) |
41 system(bdss_command, intern = TRUE) | 41 system(bdss_command, intern = TRUE) |
42 # convert .sra to .fastq/.fasta | 42 # convert .sra to .fastq/.fasta |
43 if('FORMAT' == 'fasta') { | 43 if('FORMAT' == 'fasta') { |
44 command = paste0('fastq-dump --fasta --split-files ', '-O read_files_directory ', id) | 44 command = paste0('fastq-dump --fasta --split-files ', '-O read_files_directory ', id) |
45 } else { | 45 } else { |
57 if (length(all_fastq_files) == 1) { | 57 if (length(all_fastq_files) == 1) { |
58 # this is a single end SRA file. build url to download fastq | 58 # this is a single end SRA file. build url to download fastq |
59 print(paste0('only one fastq file found for this SRA accession: ', id)) | 59 print(paste0('only one fastq file found for this SRA accession: ', id)) |
60 print(paste0('Downloading skipped for ', id)) | 60 print(paste0('Downloading skipped for ', id)) |
61 # url = paste0(url_base, '/', all_fastq_files) | 61 # url = paste0(url_base, '/', all_fastq_files) |
62 # bdss_command = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url) | 62 # bdss_command = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url) |
63 # run_bdss = system(bdss_command, intern = TRUE) | 63 # run_bdss = system(bdss_command, intern = TRUE) |
64 # print(run_bdss) | 64 # print(run_bdss) |
65 } else { | 65 } else { |
66 print(paste0('Two fastq files found for this SRA accession: ', id)) | 66 print(paste0('Two fastq files found for this SRA accession: ', id)) |
67 url_1 = paste0(url_base, '/', all_fastq_files[1]) | 67 url_1 = paste0(url_base, '/', all_fastq_files[1]) |
68 bdss_command_1 = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url_1) | 68 bdss_command_1 = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url_1) |
69 run_bdss_1 = system(bdss_command_1, intern = TRUE) | 69 run_bdss_1 = system(bdss_command_1, intern = TRUE) |
70 print(run_bdss_1) | 70 print(run_bdss_1) |
71 url_2 = paste0(url_base, '/', all_fastq_files[1]) | 71 url_2 = paste0(url_base, '/', all_fastq_files[1]) |
72 bdss_command_2 = paste0(' /main/sites/galaxy/galaxy/tools/_conda/bin/bdss transfer -u ', url_2) | 72 bdss_command_2 = paste0('/tool_deps/_conda/bin/bdss transfer -u ', url_2) |
73 run_bdss_2 = system(bdss_command_2, intern = TRUE) | 73 run_bdss_2 = system(bdss_command_2, intern = TRUE) |
74 print(run_bdss_2) | 74 print(run_bdss_2) |
75 } | 75 } |
76 } | 76 } |
77 | 77 |