diff datasets_gene.xml @ 16:9a10a6449901 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:43:58 +0000
parents dfad868c911b
children 35d32c807c23
line wrap: on
line diff
--- a/datasets_gene.xml	Thu Sep 21 23:02:45 2023 +0000
+++ b/datasets_gene.xml	Fri Feb 21 18:43:58 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>
@@ -333,7 +336,7 @@
                     <param name="text_or_file" value="text"/>
                     <param name="accession" value="brca1"/>
                 </conditional>
-                <param name="taxon" value="mouse"/>
+                <param name="taxon" value="house mouse"/>
             </conditional>
             <section name="file_choices">
                 <conditional name="kingdom_cond">
@@ -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">
@@ -391,7 +394,6 @@
                 </assert_contents>
             </output>
         </test>
-
         <!-- 7: datasets download gene accession NP_000483.3 -->
         <test expect_num_outputs="1">
             <conditional name="query|subcommand">
@@ -438,13 +440,13 @@
             </output>
         </test>
 
-        <!-- 9: datasets download gene accession WP_004675351.1 + include_flanks_bp -->
-        <test 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>
@@ -456,7 +458,8 @@
             </section>
             <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>
@@ -466,6 +469,11 @@
                     <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=">"/>
@@ -477,7 +485,7 @@
         </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"/>
@@ -494,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"/>
@@ -523,7 +531,8 @@
                 <assert_contents>
                     <has_text text=">" n="1" />
                 </assert_contents>
-            </output></test>
+            </output>
+        </test> -->
     </tests>
     <help>
 <![CDATA[