diff datasets_gene.xml @ 17:da8260eba74b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_datasets commit 1c7abf3293422fb432b5acd2ef178e7536d65f0b
author iuc
date Fri, 21 Feb 2025 18:44:07 +0000
parents a6a475ed58cb
children
line wrap: on
line diff
--- a/datasets_gene.xml	Fri Jun 07 14:19:58 2024 +0000
+++ b/datasets_gene.xml	Fri Feb 21 18:44:07 2025 +0000
@@ -75,7 +75,7 @@
 ## unzip and rehydrate if any data is to be downloaded (include is not None)
 #if $file_choices.kingdom_cond.include
     ## unzip
-    && 7z x -y ncbi_dataset.zip > 7z.log
+    && unzip ncbi_dataset.zip
 #end if
 ]]></command>
     <inputs>
@@ -114,7 +114,7 @@
                             </valid>
                         </sanitizer>
                     </param>
-                    <param argument="--include-flanks-bp" type="integer" optional="true" min="0" label="Length of flanking nucleotides" help="WP accessions only"/>
+                    <param argument="--include-flanks-bp" type="integer" optional="true" min="0" value="" label="Length of flanking nucleotides" help="WP accessions only"/>
                 </when>
                 <when value="taxon">
                     <expand macro="taxon_positional"/>
@@ -196,6 +196,9 @@
         <data name="gene_fasta" label="NCBI Gene Datasets: Gene fasta" format="fasta" from_work_dir="ncbi_dataset/data/gene.fna">
             <filter>file_choices['kingdom_cond']['include'] and "gene" in file_choices['kingdom_cond']['include']</filter>
         </data>
+        <data name="gene_flanks" label="NCBI Gene Datasets: Flanking faste" format="fasta" from_work_dir="ncbi_dataset/data/gene_flank.fna">
+            <filter>query['subcommand']['download_by'] == "accession" and query['subcommand']['include_flanks_bp'] != ""</filter>
+        </data>
         <data name="rna_fasta" label="NCBI Gene Datasets: RNA fasta" format="fasta" from_work_dir="ncbi_dataset/data/rna.fna">
             <filter>file_choices['kingdom_cond']['include'] and "rna" in file_choices['kingdom_cond']['include']</filter>
         </data>
@@ -353,7 +356,7 @@
                     <has_text text="house mouse"/>
                     <has_text text="XR_004936704.1"/>
                     <has_n_lines min="130"/>
-                    <has_n_columns n="38"/>
+                    <has_n_columns n="39"/>
                 </assert_contents>
             </output>
             <output name="threep_utr_fasta">
@@ -437,15 +440,13 @@
             </output>
         </test>
 
-        <!-- 9: datasets download gene accession WP_004675351.1 + include_flanks_bp
-            test broken at the moment https://github.com/ncbi/datasets/issues/328
-        -->
-        <test expect_failure="true"> <!-- expect_num_outputs="3" -->
+        <!-- 9: datasets download gene accession WP_003249567.1 + include_flanks_bp -->
+        <test expect_num_outputs="4">
             <conditional name="query|subcommand">
                 <param name="download_by" value="accession"/>
                 <conditional name="text_or_file">
                     <param name="text_or_file" value="text"/>
-                    <param name="accession" value="WP_004675351.1"/>
+                    <param name="accession" value="WP_003249567.1"/>
                 </conditional>
                 <param name="include_flanks_bp" value="100"/>
             </conditional>
@@ -455,9 +456,10 @@
                     <param name="include" value="gene,protein"/>
                 </conditional>
             </section>
-            <!-- <output name="gene_data_report">
+            <output name="gene_data_report">
                 <assert_contents>
-                    <has_text text="glcE"/>
+                    <has_text text="WP_003249567.1"/>
+                    <has_text text="menG"/>
                     <has_n_lines n="2"/>
                     <has_n_columns n="7"/>
                 </assert_contents>
@@ -467,18 +469,23 @@
                     <has_text text=">"/>
                 </assert_contents>
             </output>
+            <output name="gene_flanks">
+                <assert_contents>
+                    <has_text text=">"/>
+                </assert_contents>
+            </output>
             <output name="protein_fasta">
                 <assert_contents>
                     <has_text text=">"/>
                 </assert_contents>
-            </output> -->
+            </output>
             <assert_command>
                 <has_text text="include-flanks-bp 100"/>
             </assert_command>
         </test> 
 
         <!-- 10: datasets download gene taxon human   -->
-        <test expect_num_outputs="1">
+        <!-- <test expect_num_outputs="1">
             <conditional name="query|subcommand">
                 <param name="download_by" value="taxon"/>
                 <param name="taxon_positional" value="human"/>
@@ -495,9 +502,9 @@
                     <has_n_columns n="8"/>
                 </assert_contents>
             </output>
-        </test> 
+        </test>  -->
         <!-- 11: datasets download gene taxon human + \-\-fasta-filter  -->
-        <test expect_num_outputs="2">
+        <!-- <test expect_num_outputs="2">
             <conditional name="query|subcommand">
                 <param name="download_by" value="taxon"/>
                 <param name="taxon_positional" value="human"/>
@@ -524,7 +531,8 @@
                 <assert_contents>
                     <has_text text=">" n="1" />
                 </assert_contents>
-            </output></test>
+            </output>
+        </test> -->
     </tests>
     <help>
 <![CDATA[