diff fastq_dump.xml @ 26:f7732611d0fc draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit 7632986831e24fcd189a57d824b9e6b1d5dc5c4c
author iuc
date Mon, 26 Aug 2024 14:59:07 +0000
parents 6669afa92957
children
line wrap: on
line diff
--- a/fastq_dump.xml	Fri Jun 23 21:31:47 2023 +0000
+++ b/fastq_dump.xml	Mon Aug 26 14:59:07 2024 +0000
@@ -12,7 +12,7 @@
     @SET_ACCESSIONS@
 
     #if $input.input_select == "sra_file":
-        fastq-dump --log-level fatal --accession '${input.file.name}'
+        fastq-dump --log-level fatal --accession "\$acc"
     #else:
         ## Do not use prefetch if region is specified, to avoid downloading
         ## the complete sra file.
@@ -20,9 +20,9 @@
             prefetch -X 200000000 "\$acc" &&
         #end if
         fastq-dump --accession "\$acc"
-        --split-files
     #end if
-    --defline-seq '@\$sn[_\$rn]/\$ri'
+    --split-files
+    --defline-seq '$adv.defline_seq'
     --defline-qual '+'
 
     $adv.split
@@ -91,6 +91,7 @@
             <option value="fastqsanger.bz2">bzip2 compressed fastq</option>
         </param>
         <section name="adv" title="Advanced Options" expanded="False">
+            <expand macro="defline" defline_param="--defline-seq" defline_default="@$ac.$sn[_$rn]/$ri"/>
             <param name="minID" type="integer" label="Minimum spot ID" optional="true" help="Minimum spot id to be dumped." argument="--minSpotId"/>
             <param name="maxID" type="integer" label="Maximum spot ID" optional="true" help="Maximum spot id to be dumped." argument="--maxSpotId"/>
             <param name="minlen" type="integer" label="Minimum read length" optional="true" help="Filter by sequence length. Will dump only reads longer or equal to this value." argument="--minReadLen"/>
@@ -225,6 +226,64 @@
                 </element>
             </output_collection>
         </test>
+        <test expect_num_outputs="2">
+            <param name="input_select" value="accession_number"/>
+            <param name="outputformat" value="fastqsanger.gz"/>
+            <param name="accession" value="ERR086330, SRR11953971"/>
+            <section name="adv">
+                <param name="defline_seq" value="@$ac.$si/$ri $sn length=$rl"/>
+            </section>
+            <output_collection name="list_paired" type="list:paired" count="2">
+                <element name="ERR086330">
+                    <element name="forward" ftype="fastqsanger.gz" decompress="True">
+                        <assert_contents>
+                            <!-- decompressed content assertions only work from 23.1
+                                 therefore we test for size being at least one byte
+                                 larger than the results of the previous test which
+                                 uses the shorter default deflines
+                                 TODO replace has_size by has_line-->
+                            <has_size min="147"/>
+                            <!-- <has_line line="@ERR086330.1/1 1 length=76"/> -->
+                        </assert_contents>
+                    </element>
+                    <element name="reverse" ftype="fastqsanger.gz" decompress="True">
+                        <assert_contents>
+                            <has_size min="141"/>
+                            <!-- <has_line line="@ERR086330.1/2 1 length=76"/> -->
+                        </assert_contents>
+                    </element>
+                </element>
+                <element name="SRR11953971">
+                    <element name="forward" ftype="fastqsanger.gz" decompress="True">
+                        <assert_contents>
+                            <has_size min="56206"/>
+                            <!-- <has_line line="@SRR11953971.1/1 1 length=101"/> -->
+                        </assert_contents>
+                    </element>
+                    <element name="reverse" ftype="fastqsanger.gz" decompress="True">
+                        <assert_contents>
+                            <has_size min="59843"/>
+                            <!-- <has_line line="@SRR11953971.1/2 1 length=101"/> -->
+                        </assert_contents>
+                    </element>
+                </element>
+            </output_collection>
+        </test>
+        <test expect_num_outputs="2">
+            <param name="input_select" value="sra_file"/>
+            <param name="sra_file" value="SRR522874.sra"/>
+            <param name="split" value="True"/>
+            <param name="skip_technical" value="True"/>
+            <section name="adv">
+                <param name="defline_seq" value="@$sn/$ri"/>
+            </section>
+            <output_collection name="list_paired" type="list:paired" count="1">
+                <element name="SRR522874.sra">
+                    <element name="forward" file="SRR522874.sra_2_1.fastq.gz" ftype="fastqsanger.gz" decompress="True"/>
+                    <element name="reverse" file="SRR522874.sra_4_1.fastq.gz" ftype="fastqsanger.gz" decompress="True"/>
+                </element>
+            </output_collection>
+        </test>
     </tests>
     <help><![CDATA[
 **What it does?**