changeset 3:18ece3d5bcde draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cat commit 3febcc9ba3d3717877c36bf96742209012a13ac4-dirty
author jjohnson
date Tue, 26 Nov 2019 15:42:14 -0500
parents 9a01840eac52
children aaeb63501369
files cat_bins.xml cat_contigs.xml cat_summarise.xml macros.xml test-data/cached_locally/CAT_prepare_test/CAT_database/protIDs test-data/cached_locally/CAT_prepare_test/CAT_database/test.nr.dmnd test-data/cached_locally/cat_database.loc test-data/contigs.fasta test-data/genome2.fna
diffstat 9 files changed, 75 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/cat_bins.xml	Mon Nov 25 15:09:24 2019 -0500
+++ b/cat_bins.xml	Tue Nov 26 15:42:14 2019 -0500
@@ -45,10 +45,20 @@
     </outputs>
     <tests>
         <test>
+            <param name="mags" ftype="fasta" value="genome2.fna"/>
+            <expand macro="test_catdb"/>
+            <param name="select_outputs" value="bin2classification"/>
+            <output name="bin2classification">
+                <assert_contents>
+                    <has_text text="666" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
             <param name="mags" ftype="fasta" value="genome3.fna"/>
             <expand macro="test_catdb"/>
-            <param name="select_outputs" value="contig2classification"/>
-            <output name="contig2classification">
+            <param name="select_outputs" value="bin2classification"/>
+            <output name="bin2classification">
                 <assert_contents>
                     <has_text text="1639" />
                 </assert_contents>
@@ -57,14 +67,42 @@
         <test>
             <param name="mags" ftype="fasta" value="genome2.fna,genome3.fna"/>
             <expand macro="test_catdb"/>
-            <param name="select_outputs" value="contig2classification"/>
-            <output name="contig2classification">
+            <param name="select_outputs" value="bin2classification"/>
+            <output name="bin2classification">
                 <assert_contents>
                     <has_text text="666" />
                     <has_text text="1639" />
                 </assert_contents>
             </output>
         </test>
+        <test>
+            <param name="mags" ftype="fasta" value="genome2.fna,genome3.fna"/>
+            <expand macro="test_catdb"/>
+            <param name="select_outputs" value="bin2classification"/>
+           <param name="select_outputs" value="predicted_proteins_faa"/>
+            <conditional name="names">
+                <param name="add_names" value="both"/>
+            </conditional>
+            <param name="summarise" value="classification"/>
+            <output name="predicted_proteins_faa">
+                <assert_contents>
+                    <has_text text="contig_11394" />
+                    <has_text text="contig_4403" />
+                </assert_contents>
+            </output>
+            <output name="orf2lca_names">
+                <assert_contents>
+                    <has_text text="Listeria" />
+                    <has_text text="Vibrio" />
+                </assert_contents>
+            </output>
+            <output name="classification_summary">
+                <assert_contents>
+                    <has_text text="Listeria" />
+                </assert_contents>
+            </output>
+        </test>
+
     </tests>
     <help><![CDATA[
 **CAT bin or bins**
--- a/cat_contigs.xml	Mon Nov 25 15:09:24 2019 -0500
+++ b/cat_contigs.xml	Tue Nov 26 15:42:14 2019 -0500
@@ -37,6 +37,30 @@
                 </assert_contents>
             </output>
         </test>
+        <test>
+            <param name="contigs_fasta" ftype="fasta" value="contigs.fasta"/>
+            <expand macro="test_catdb"/>
+            <param name="select_outputs" value="predicted_proteins_faa"/>
+            <conditional name="names">
+                <param name="add_names" value="both"/>
+            </conditional>
+            <param name="summarise" value="classification"/>
+            <output name="predicted_proteins_faa">
+                <assert_contents>
+                    <has_text text=">contig_9952" />
+                </assert_contents>
+            </output>
+            <output name="orf2lca_names">
+                <assert_contents>
+                    <has_text text="Listeria" />
+                </assert_contents>
+            </output>
+            <output name="classification_summary">
+                <assert_contents>
+                    <has_text text="Listeria" />
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help><![CDATA[
 **CAT contigs**
--- a/cat_summarise.xml	Mon Nov 25 15:09:24 2019 -0500
+++ b/cat_summarise.xml	Tue Nov 26 15:42:14 2019 -0500
@@ -22,7 +22,7 @@
     <tests>
         <test>
             <param name="input" ftype="tabular" value="test_contig.contig2classification.names.txt"/>
-            <param name="contigs_fasta" ftype="fasta" value="configs.fasta"/>
+            <param name="contigs_fasta" ftype="fasta" value="contigs.fasta"/>
             <output name="output">
                 <assert_contents>
                     <has_text text="Firmicutes" />
--- a/macros.xml	Mon Nov 25 15:09:24 2019 -0500
+++ b/macros.xml	Tue Nov 26 15:42:14 2019 -0500
@@ -19,7 +19,7 @@
             </param>
             <when value="cached">
                 <param name="cat_builtin" type="select" label="Use a built-in CAT database" help="If the CAT database of interest is not listed, contact your Galaxy administrator">
-                    <options from_data_table="cat_databases">
+                    <options from_data_table="cat_database">
                         <filter type="sort_by" column="2" />
                         <validator type="no_options" message="No CAT database is available." />
                     </options>
@@ -77,7 +77,6 @@
       #end if
       --out_prefix 'cat_output'
 ]]></token>
-
     <xml name="custom_settings">
         <param argument="--range" type="integer" value="10" min="0" max="49" label="range"/>
         <param argument="--fraction" type="float" value="0.5" min="0" max="0.99" label="fraction"/>
@@ -115,6 +114,7 @@
             </when>
         </conditional>
     </xml>
+    <token name="@TXT2TSV@">${__tool_directory__}/tabpad.py</token>
     <token name="@ADD_NAMES@"><![CDATA[
     #if $names.add_names in ['classification','both']:
         && CAT add_names $names.only_official $names.exclude_scores 
@@ -125,14 +125,14 @@
                 -i cat_output.bin2classification.tsv
             #end if
             -o classification_names.txt
-        && @TXT2TSV@ -i classification_names.txt -o $classification_names
+        && ${__tool_directory__}/tabpad.py -i classification_names.txt -o $classification_names
     #end if
     #if $names.add_names in ['orf2lca','both']:
         && CAT add_names $names.only_official $names.exclude_scores 
             @CAT_TAXONOMY@
             -i cat_output.ORF2LCA.tsv 
             -o orf2lca_names.txt
-        && @TXT2TSV@ -i orf2lca_names.txt -o $orf2lca_names
+        && ${__tool_directory__}/tabpad.py -i orf2lca_names.txt -o $orf2lca_names
     #end if
 ]]></token>
     <xml name="summarise">
@@ -162,7 +162,7 @@
             #end if
             -i $summary_input
             -o classification_summary.txt
-        && @TXT2TSV@ -i classification_summary.txt -o $classification_summary
+        && ${__tool_directory__}/tabpad.py -i classification_summary.txt -o $classification_summary
     #end if
 ]]></token>
     
@@ -194,10 +194,6 @@
             <option value="bin2classification" selected="true">bin2classification.txt</option>
         </expand>
     </xml>
-    
-    <token name="@TXT2TSV@"><![CDATA[
-    $__tool_directory__/tabpad.py 
-]]></token>
     <xml name="outputs">
         <data name="log" format="txt" label="${bcat}.log" from_work_dir="cat_output.log">
             <filter>'log' in select_outputs or not select_outputs</filter>
@@ -265,6 +261,8 @@
         <citations>
             <citation type="doi">https://doi.org/10.1101/072868</citation>
             <citation type="doi">https://doi.org/10.1186/s13059-019-1817-x</citation>
+            <citation type="doi">https://doi.org/10.1038/nmeth.3176</citation>
+            <citation type="doi">https://doi.org/10.1186/1471-2105-11-119</citation>
             <yield />
         </citations>
     </xml>
--- a/test-data/cached_locally/CAT_prepare_test/CAT_database/protIDs	Mon Nov 25 15:09:24 2019 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-WP_000159554.1
-WP_000214552.1
-WP_000346214.1
-WP_000568619.1
-WP_000958804.1
-WP_000991933.1
-WP_000996146.1
-WP_003722398.1
-WP_005378126.1
-XP_961517.1
-
Binary file test-data/cached_locally/CAT_prepare_test/CAT_database/test.nr.dmnd has changed
--- a/test-data/cached_locally/cat_database.loc	Mon Nov 25 15:09:24 2019 -0500
+++ b/test-data/cached_locally/cat_database.loc	Tue Nov 26 15:42:14 2019 -0500
@@ -5,4 +5,4 @@
 #  2019-07-19_taxonomy
 #value  name    database_folder	taxonomy_folder
 #2019-07-19_CAT_database	2019-07-19_CAT_database	/opt/galaxy/tool-data/cat_database/CAT_prepare_20190719/2019-07-19_CAT_database	/opt/galaxy/tool-data/cat_database/CAT_prepare_20190719/2019-07-19_taxonomy
-CAT_database_test	CAT_database_test	${__HERE__}/CAT_prepare_test/CAT_database	${__HERE__}/CAT_prepare_test/taxonomy
+CAT_prepare_test	CAT_prepare_test	${__HERE__}/CAT_prepare_test/CAT_database	${__HERE__}/CAT_prepare_test/taxonomy
--- a/test-data/contigs.fasta	Mon Nov 25 15:09:24 2019 -0500
+++ b/test-data/contigs.fasta	Tue Nov 26 15:42:14 2019 -0500
@@ -1,4 +1,3 @@
-
 >contig_9952
 TGGTTATGTACGCAGACAGCTTACTCCTCCTCGGAGACCACTCGCGGTACTCTATTCCCTCCACGGTTGCGAGGCGCTCGCCGTAGATCCGCTTCCCGGG
 ACAGGCAGACAGGGTGTATAGCCTCCCCCTCTCGGAAAAAACCCCGGGCACGCGGTCCAAAGACTCCATGCCCGTAACAACGCCGTGGTTTTAGAAATAA
--- a/test-data/genome2.fna	Mon Nov 25 15:09:24 2019 -0500
+++ b/test-data/genome2.fna	Tue Nov 26 15:42:14 2019 -0500
@@ -36,44 +36,6 @@
 CGTTCTTTGCGGAGTCGTGGGAACCCTGGTGGTCGTGAAACGGATGGTGTTCGTAACGGGTGGCATAGCACACACCACTTTCGGAGGTGTGGGTCTTGCA
 TATTATGTTATGTCCGTCGTCGCAGTCTCATGGTTCACCCCCATGATCGGCGCCGCACTGTTCGCGGTCGTTTCGGCGGTCATAATGGCGCTTCCCGCGG
 
->contig_5089
-TGCCGAAAGGTACGAGGAGATCATGGAGGCGCTCCGGGAGCTGGAGGAGATGTCTTGGGAACGGGTCATACTCGTGGAGGGCCGAAGGGACGTCACCGCG
-CTGGAGCATCTCGGCATATTCGGGGACGTTTTCACCGTCCAGGCGTCGGGCGGCCCGGTAAAGGCCGCAGAATATGTGGCCGGCAGACGGAAGAAGGCGG
-TCATACTGACCGATTGGGACAGGAAGGGCGACATAATAGCCTCGGACCTGGAGGTCCACCTGAGCGCTCTCGATGTCCAGTACGACACGGCGGTAAGAAG
-CAGACTGGCGGGCCTTTGCAGGATCGACATCAAGGACGTGCAGTCCCTGGACGAACTGGTACACCGACTCGAGACGGCATGAAGTAATATATTCAGTAAA
-TCATATTGAACCGTTAAGGATGGCAGGCCGTTTCATTGTTTTCGAAGGCATCGACGGTGCGGGCAAAAGCACTTTGATAGATGAAGTTTCAAAAAAATTG
-GAGTCGGCGGGCATAAGGACCGTCGTAACCGCAGAGCCCACTGAAGGGCCGATAGGAATGCTGATACGGAGCGGGGCGGTCAAATGCATATCTCCGAACG
-CGGAAGCTCTGCTGTTCACCGCCGACCGTGCCTGCCACACCTCCGAGATAGTCGGATGGATGGAGGAGGGGACGACCGTCCTCTGCGACCGTTACTACGC
-CTCCACCATAGCGTACCAGTCCGCAGGACTCGACGGAACGGTGTCGGGCAAGGAATGGCTCATGGACATCAACCGTCCCGTCACCGTAGAACCCGACACG
-ACGATACTTCTGGACATCGACCCCGAGGCGGGGATGCGCCGGGTGGGGGAACGCGGAGCGAGGAGCAAGTACGAGGTCACCGAGTACCTCGGCAGAGTGC
-GCTCCAATTATCTGGAAATAGCGGAGGAGAAAGGATTCCGCATAATAGACGCTTCTCGTCCGAAGGACGAGGTGCTGAGAGAAACGATGAAAATCTTAGG
-TGAGTGAAATGCATCCGTCGGAAGAGATCTATTGTGAGAAGAGCAACAGGCTGAAGGGAAAGACAGTGGTACTCGGGATAACGGGAAGCATCGCCGCAAC
-GGAATGTTTCTCCACGATACGCGAGCTGATACGCCACGGCGCTACGGTTATACCTGTCATGACAAGGGCGGCCTGCGACATAGTGACCGAGCAGAGCATA
-GAGTTCGCATCCGGAAAAAAACCCATAACCGAGCTCACGGGCCAGACCGAGCATGTCAAGCTGATGGGCGACTCCCGCACCGCGGACCTTCTTATGATCT
-AGAATGGACCACAGATGCGGATACAATGCATGCGGACACGAGGATCGGCACTGTCTCGGGCTCCGCGAACCCCGAAACGAAGGACGAGACCGAGGGATAC
-GAGACCAGCATCAAAGCGGCCAGCGTGTTGACGTGAATGCCAGGCACCAGTCCGGTCACCGCGCCCATCAGGGCCCCCGCCATGCTCATCAGCGATACAA
-GAAGCAGGACGTCCGTACCCATGGCCTAAGATCTGTCGCCGTGCGGTATATATGCGGATATCTACAGTTAGCAATCCAGGAACGGTTTGCCGTCCCTCAC
-TCCCACGCGCAGCATCGCCTTCACACGGACACCCGGCACGGCATCTGCGAGGTCCCCGGTCTTATCGAAGACCGCCAATACCTCCACGAGCCTGATGCCG
-TGGGAGGCCAGCGCAAGGGCGAGGGCCCTCACGGTCCCGCCGGTGCTGAGGGTGTCCTCGACTATCACGGCCCTGTCGCCTCTTCCCGGTCCGTTTATAT
-ACAAACTTCCTGAAGAATAGCCGGTGCTCCTGTCTATGATTATTTCTCCGGGAAGCCCGTAACCGCGTTTCCTTACTATGCTGTAGGGGATGCCCAGCCT
-TAGGGATATTGGCACGGCCAGCGGGATGCCCATAGCCTCCGGCGCGAGTATGACGTCGCAGTCGAAATCTCCCAGGTCAATCAGCCCCTCCACGACTTCG
-TTCAGAAGCGCGGGGTCCACGCGGGGAACGCCGTCGCTTATGGGATTGACGAAATACGGGTAGCCGTTCCTGTCGATCACAGGGCTGGCCATAAAGCTCT
-TTCTCAGAAGCTCGTACACTGAACGTGCACGGCGATGTGGTTATTTACCTGTTCTTAAAAGGAGACATATTTAAGGGAAGGTACGATAACAGCAACGATA
-TCCGTCGAAACGGCTCCGTTGACAACGGTCACGAACACCTGGACGGAATCGGAATCGATCCCTCCGAACGCACCGGTGTTTGCGGATATGTAGTAAGCTT
-TGATCTTACCCTGTGTCCCGTTATCGATATTGTCGCTGAAGTCAGGGCTCACCACCAGAAGGTTAGAGAGGCCCTTCTCCTGCATCAGCGAGATCGTCTC
-CTCGTCGGTCAGTATGGAGGACGGGTACAGCTTGATCAGGTACTGGTCCCTGGTGGCGGGATCGTACATCCCGTCCAACGCGGAATTGACAGTGTCGTAA
-TATGTGGAAGAACTCTGATCGTCGTAGTTTATCACGCCCATCCTGACGGGCTCCATGGCCTGTTCGGTCTGGTCGCTGATCATATATCCCAGACCTACGA
-ACAGTATCATGACGACCGCTATCGAGATTAGGGACTCGAGGGTCATCAGCTCCCTGAGCTCTTTCTTGACCAGGTTAAACAGATTGTTCAACGGACTTCA
-CCCCCTTGATGAAGACCTCTTCAAGGTTTTTAGCGTCGTATTTCGCCTTGAGCTCCGCGGGAGTCCCCTGCATGATGATCTCTCCCTTGTTGATCATGGC
-GACGCGGTCGCACAGGGATTCGACCTCATACATGTTGTGCGAGGAGAGGAGAACCGTAACTCCGGACCCGGCTATCTCCCGGATCAGCTCCCTGATGTCG
-TGCGCGTTCATCACGTCCAATCCGGATGTTACCTCGTCCATGATGGCGAAACGCGGTGAGGTCATTATCGCCCTTGCGATGAGCAGGCGTCTCATCATGC
-CCTTGCTGTAAGTGTTGACCTTGCTGTCGATGCGGTCTCCCAGGTTGGCGATGTCCATCCCCCTCTGGGTCATTTTTTCTGTCTCCTCGCCGTCGGTGAA
-GAAGCCCGCGATGAAGCGCAGATAGGTGCGTCCCGTCAGGTCCTTGTAGGCGCCCGCGTCCTCGGGCAGATAGCTTATGGATTTTCTTACGTCGTCCCCC
-TGGGCGGCGACATCGTATCCGCAGACGGTTATCTTTCCGGAAGTTATGGTTATGAGCGTCGAGATCATCCTAAGCGCCGTGGTCTTCCCGGCGCCGTTCG
-GTCCGATGAGGCCAAAGATCTCTCCCTCTTTGACAGAGAAGTTTATTCCCTTGACGGCCTCGATGTTCCCGTATATTTTATGCACGTTCTCTACGCGCAG
-GGCATCCATGAAGCATTGAGGTATATCTCGCTTTTAAATTTATTGGAGTGCTGTTAAGTGTCTAAAAAAGTGTGTATTCGGGCCGGGGCCCGTAATGTGT
-TTACTGTTCCGCGCCGGCCGAGGCGTTGCCCATGGCCTTATTTATGGTCTCTTGGAGGGACTGGTATTTCTCGCGGAGACTTTTCTCCTGGCGGTCCAGG
-
 >contig_159
 TATAGCTCAGCTCGTTGGCGGAGACGCTGCTTCCGTACATCTGGCCGCCGCCGTTGATGCCGCCGCCCCAGGCGGCCGTCCCGATCCCCACGGGAGAAAT
 GTCCGTACCTCGGAACCTTATGTTTCTCACGGATTCCCGTATATGTTCCTGGATTATAACTGATACGCAATCCTGTTTCCGACGTCCGCCATGTTTAGAT