changeset 1:2bec6d7877fc draft default tip

planemo upload commit 68dbaa3df00fe628b7dc0310cd1d19605d0bb307-dirty
author jjohnson
date Tue, 26 Nov 2019 16:11:24 -0500
parents f59e7e242bde
children
files data_manager/macros.xml
diffstat 1 files changed, 21 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/macros.xml	Sun Nov 24 21:54:57 2019 -0500
+++ b/data_manager/macros.xml	Tue Nov 26 16:11:24 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,24 +114,25 @@
             </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 
             @CAT_TAXONOMY@
             #if $bcat == 'CAT'
-                -i cat_output.contigs2classification.tsv
+                -i cat_output.contig2classification.tsv
             #else
                 -i cat_output.bin2classification.tsv
             #end if
             -o classification_names.txt
-        && @TXT2TSV@ -i classification_names -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">
@@ -146,11 +146,11 @@
         #if $names.add_names in ['classification','both'] and $names.only_official: 
             #set $summary_input = $classification_names
         #else 
-            #set $summary_input = classification_offical_names
+            #set $summary_input = 'classification_offical_names'
             && CAT add_names --only_official
                 @CAT_TAXONOMY@
                 #if $bcat == 'CAT'
-                    -i cat_output.contigs2classification.tsv
+                    -i cat_output.contig2classification.tsv
                 #else
                     -i cat_output.bin2classification.tsv
                 #end if
@@ -162,13 +162,13 @@
             #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>
     
     <xml name="select_outputs">
         <param name="select_outputs" type="select" multiple="true" optional="false" label="Select outputs">
-            <option value="log" selected="true">CAT.log</option>
+            <option value="log" selected="true">log</option>
             <option value="predicted_proteins_faa" selected="true">predicted_proteins.faa</option>
             <option value="predicted_proteins_gff">predicted_proteins.gff</option>
             <option value="alignment_diamond">alignment.diamond</option>
@@ -179,6 +179,8 @@
     <xml name="select_cat_outputs">
         <param name="bcat" type="hidden" value="CAT"/>
         <param name="seqtype" type="hidden" value="contig"/>
+        <param name="sum_titles" type="hidden" value="contigs,number of ORFs,number of positions"/>
+        <param name="bin_col" type="hidden" value=""/>
         <expand macro="select_outputs">
             <option value="contig2classification" selected="true">contig2classification.txt</option>
         </expand>
@@ -186,14 +188,12 @@
     <xml name="select_bat_outputs">
         <param name="bcat" type="hidden" value="BAT"/>
         <param name="seqtype" type="hidden" value="bin"/>
+        <param name="sum_titles" type="hidden" value="bins"/>
+        <param name="bin_col" type="hidden" value="bin,"/>
         <expand macro="select_outputs">
             <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>
@@ -215,7 +215,7 @@
             <filter>'orf2lca' in select_outputs</filter>
             <actions>
                 <action name="comment_lines" type="metadata" default="1" />
-                <action name="column_names" type="metadata" default="ORF,lineage,bit-score" />
+                <action name="column_names" type="metadata" default="ORF,${bin_col}lineage,bit-score" />
             </actions>
         </data>
         <data name="contig2classification" format="tabular" label="${bcat}.contig2classification.txt" from_work_dir="cat_output.contig2classification.tsv">
@@ -233,14 +233,14 @@
             </actions>
         </data>
         <data name="orf2lca_names" format="tabular" label="${bcat}.ORF2LCA.names.txt">
-            <filter>'orf2lca' in names.add_names</filter>
+            <filter>names['add_names'] in ['both','orf2lca']</filter>
             <actions>
                 <action name="comment_lines" type="metadata" default="1" />
-                <action name="column_names" type="metadata" default="ORF,lineage,bit-score,superkingdom,phylum,class,order,family,genus,species" />
+                <action name="column_names" type="metadata" default="ORF,${bin_col}lineage,bit-score,superkingdom,phylum,class,order,family,genus,species" />
             </actions>
         </data>
         <data name="classification_names" format="tabular" label="${bcat}.${seqtype}2classification.names.txt">
-            <filter>'classification' in names.add_names</filter>
+            <filter>names['add_names'] in ['both','classification']</filter>
             <actions>
                 <action name="comment_lines" type="metadata" default="1" />
                 <action name="column_names" type="metadata" default="${seqtype},classification,reason,lineage,lineage scores,superkingdom,phylum,class,order,family,genus,species" />
@@ -249,8 +249,8 @@
         <data name="classification_summary" format="tabular" label="${bcat}.${seqtype}2classification.summary.txt">
             <filter>'classification' in summarise</filter>
             <actions>
-                <action name="comment_lines" type="metadata" default="1" />
-                <action name="column_names" type="metadata" default="rank,clade,number of contigs,number of ORFs,number of positions" />
+                <action name="comment_lines" type="metadata" default="4" />
+                <action name="column_names" type="metadata" default="rank,clade,number of ${sum_titles}" />
             </actions>
         </data>
     </xml>
@@ -261,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>