comparison fasterq_dump.xml @ 17:c441583adae5 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit e00e33a3405201e8decbbb641ad0a8c3e16c8bef"
author iuc
date Wed, 29 Apr 2020 12:12:23 -0400
parents aad3885b3216
children 7068f48d0ef9
comparison
equal deleted inserted replaced
16:aad3885b3216 17:c441583adae5
1 <tool id="fasterq_dump" name="Faster Download and Extract Reads in FASTQ" version="@VERSION@+galaxy1" profile="18.01"> 1 <tool id="fasterq_dump" name="Faster Download and Extract Reads in FASTQ" version="@VERSION@+galaxy2" profile="18.01">
2 <description>format from NCBI SRA</description> 2 <description>format from NCBI SRA</description>
3 <macros> 3 <macros>
4 <import>sra_macros.xml</import> 4 <import>sra_macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
10 #if $input.input_select == "file": 10 #if $input.input_select == "file":
11 acc='${input.file.name}' && 11 acc='${input.file.name}' &&
12 ln -s '${input.file}' "\$acc" && 12 ln -s '${input.file}' "\$acc" &&
13 #end if 13 #end if
14 @CONFIGURE_TIMEOUT@ 14 @CONFIGURE_TIMEOUT@
15 fasterq-dump "\$acc" -e \${GALAXY_SLOTS:-1} 15 @CONFIGURE_RETRY@
16 $adv.split 16 while [ \$SRA_PREFETCH_ATTEMPT -le \$SRA_PREFETCH_RETRIES ] ; do
17 #if str( $adv.minlen ) != "": 17 fasterq-dump "\$acc" -e \${GALAXY_SLOTS:-1}
18 --min-read-len "$adv.minlen" 18 $adv.split
19 #end if 19 #if str( $adv.minlen ) != "":
20 $adv.skip_technical >> $log 2>&1 20 --min-read-len "$adv.minlen"
21 && 21 #end if
22 $adv.skip_technical >> $log 2>&1 ;
23 if [ \$? == 0 ] ; then
24 break ;
25 else
26 echo "Prefetch attempt \$SRA_PREFETCH_ATTEMPT of \$SRA_PREFETCH_RETRIES exited with code \$?" ;
27 SRA_PREFETCH_ATTEMPT=`expr \$SRA_PREFETCH_ATTEMPT + 1` ;
28 sleep 1 ;
29 fi ;
30 done &&
22 mkdir -p output && 31 mkdir -p output &&
23 mkdir -p outputOther && 32 mkdir -p outputOther &&
24 count=`ls *.fastq | wc -l` && 33 count=`ls *.fastq | wc -l` &&
25 echo "There are \$count fastq" && 34 echo "There are \$count fastq" &&
26 data=(\$(ls *.fastq)) && 35 data=(\$(ls *.fastq)) &&
27 if [ "\$count" -eq 1 ]; then 36 if [ "\$count" -eq 1 ]; then
28 gzip -c "\${data[0]}" > output/"\${acc}"__single.fastqsanger.gz && 37 @COMPRESS@ "\${data[0]}" > output/"\${acc}"__single.fastqsanger.gz &&
29 rm "\${data[0]}"; 38 rm "\${data[0]}";
30 elif [ "$adv.split" = "--split-3" ]; then 39 elif [ "$adv.split" = "--split-3" ]; then
31 if [ -e "\${acc}".fastq ]; then 40 if [ -e "\${acc}".fastq ]; then
32 gzip -c "\${acc}".fastq > outputOther/"\${acc}"__single.fastqsanger.gz; 41 @COMPRESS@ "\${acc}".fastq > outputOther/"\${acc}"__single.fastqsanger.gz;
33 fi && 42 fi &&
34 gzip -c "\${acc}"_1.fastq > output/"\${acc}"_forward.fastqsanger.gz && 43 @COMPRESS@ "\${acc}"_1.fastq > output/"\${acc}"_forward.fastqsanger.gz &&
35 gzip -c "\${acc}"_2.fastq > output/"\${acc}"_reverse.fastqsanger.gz && 44 @COMPRESS@ "\${acc}"_2.fastq > output/"\${acc}"_reverse.fastqsanger.gz &&
36 rm "\${acc}"*.fastq; 45 rm "\${acc}"*.fastq;
37 elif [ "\$count" -eq 2 ]; then 46 elif [ "\$count" -eq 2 ]; then
38 #if $adv.skip_technical: 47 #if $adv.skip_technical:
39 gzip -c "\${data[0]}" > output/"\${acc}"_forward.fastqsanger.gz && 48 @COMPRESS@ "\${data[0]}" > output/"\${acc}"_forward.fastqsanger.gz &&
40 gzip -c "\${data[1]}" > output/"\${acc}"_reverse.fastqsanger.gz && 49 @COMPRESS@ "\${data[1]}" > output/"\${acc}"_reverse.fastqsanger.gz &&
41 #else 50 #else
42 gzip -c "\${data[0]}" > outputOther/"\${data[0]}"sanger.gz && 51 @COMPRESS@ "\${data[0]}" > outputOther/"\${data[0]}"sanger.gz &&
43 gzip -c "\${data[1]}" > outputOther/"\${data[1]}"sanger.gz && 52 @COMPRESS@ "\${data[1]}" > outputOther/"\${data[1]}"sanger.gz &&
44 #end if 53 #end if
45 rm "\${data[0]}" && 54 rm "\${data[0]}" &&
46 rm "\${data[1]}"; 55 rm "\${data[1]}";
47 else 56 else
48 for file in \${data[*]}; do 57 for file in \${data[*]}; do
49 gzip -c "\$file" > outputOther/"\$file"sanger.gz && 58 @COMPRESS@ "\$file" > outputOther/"\$file"sanger.gz &&
50 rm "\$file"; 59 rm "\$file";
51 done; 60 done;
52 fi; 61 fi;
53 #if $input.input_select=="file_list": 62 #if $input.input_select=="file_list":
54 ) ; done 63 ) ; done
79 <!-- Use named regex group to grab pattern 88 <!-- Use named regex group to grab pattern
80 <identifier_0>_<identifier_1>.fq. Here identifier_0 is the list 89 <identifier_0>_<identifier_1>.fq. Here identifier_0 is the list
81 identifier in the nested collection and identifier_1 is either 90 identifier in the nested collection and identifier_1 is either
82 forward or reverse (for instance samp1_forward.fq). 91 forward or reverse (for instance samp1_forward.fq).
83 --> 92 -->
84 93
85 <discover_datasets pattern="(?P&lt;identifier_0&gt;[^_]+)_(?P&lt;identifier_1&gt;[^_]+)\.fastqsanger.gz" directory="output" ext="fastqsanger.gz" /> 94 <discover_datasets pattern="(?P&lt;identifier_0&gt;[^_]+)_(?P&lt;identifier_1&gt;[^_]+)\.fastqsanger.gz" directory="output" ext="fastqsanger.gz" />
86 </collection> 95 </collection>
87 <collection name="output_collection" type='list' label="Single-end data (fasterq-dump)"> 96 <collection name="output_collection" type='list' label="Single-end data (fasterq-dump)">
88 <discover_datasets pattern="(?P&lt;designation&gt;.+)__single\.fastqsanger.gz" directory="output" ext='fastqsanger.gz'/> 97 <discover_datasets pattern="(?P&lt;designation&gt;.+)__single\.fastqsanger.gz" directory="output" ext='fastqsanger.gz'/>
89 </collection> 98 </collection>
177 186
178 ------ 187 ------
179 188
180 **Uploading data for a single accession** 189 **Uploading data for a single accession**
181 190
182 When you type a single accession number (e.g., `SRR1582967`) into **Accession** box and click **Execute** the tool will fetch data for you. 191 When you type a single accession number (e.g., `SRR1582967`) into **Accession** box and click **Execute** the tool will fetch data for you.
183 192
184 ----- 193 -----
185 194
186 **Uploading multiple datasets using a list of accessions** 195 **Uploading multiple datasets using a list of accessions**
187 196
203 212
204 ----- 213 -----
205 214
206 **Output** 215 **Output**
207 216
208 In every case, fastq datasets produced will be saved in Galaxy's history as a collection_ - a single history element containing multiple datasets. 217 In every case, fastq datasets produced will be saved in Galaxy's history as a collection_ - a single history element containing multiple datasets.
209 In fact, three collections will be produced: one containing paired-end data, another containing single-end data, and a third one which contains reads which could not be classified. 218 In fact, three collections will be produced: one containing paired-end data, another containing single-end data, and a third one which contains reads which could not be classified.
210 Some collections may be empty if the accessions provided in the list does not contain one of the type of data. 219 Some collections may be empty if the accessions provided in the list does not contain one of the type of data.
211 220
212 .. class:: warningmark 221 .. class:: warningmark
213 222