Repository 'megan_blast2rma'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/megan_blast2rma

Changeset 1:2f8d3924bb3b (2021-12-03)
Previous changeset 0:fa3c3a64c993 (2021-11-24) Next changeset 2:5be253dd3e08 (2021-12-07)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/megan commit c5facb54a0de925b30cb86f05989e9254d22b89d"
modified:
blast2rma.xml
macros.xml
added:
test-data/daa2info_output1.txt
test-data/daa2info_output2.txt
test-data/daa2info_output_summary2.txt
test-data/input.daa
test-data/input_meganized.daa
test-data/read_extractor_input.rma6
test-data/read_extractor_output.txt
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b blast2rma.xml
--- a/blast2rma.xml Wed Nov 24 21:52:14 2021 +0000
+++ b/blast2rma.xml Fri Dec 03 23:09:53 2021 +0000
b
@@ -114,8 +114,8 @@
 --lcaAlgorithm '$advanced_options.lcaAlgorithm'
 --lcaCoveragePercent $advanced_options.lcaCoveragePercent
 --readAssignmentMode '$advanced_options.readAssignmentMode'
-#if str($advanced_options.con_file_cond.conFile) == 'yes':
-    --conFile '$advanced_options.con_file_cond.conFile'
+#if $advanced_options.conFile:
+    --conFile '$advanced_options.conFile'
 #end if
 #if str($input_type_cond.input_type) == 'paired':
     && mv './tmp.rma6' '$rma6_output'
@@ -127,35 +127,14 @@
             <expand macro="blast_mode_options"/>
         </param>
         <section name="advanced_options" title="Advanced options" expanded="false">
-            <param argument="--longReads" type="boolean" truevalue="--longReads" falsevalue="" checked="false" label="Parse and analyse input reads as long reads?"/>
+            <expand macro="long_reads_param"/>
             <param argument="--maxMatchesPerRead" type="integer" value="100" label="Maximum matches per read"/>
-            <param argument="--classify" type="boolean" truevalue="--classify" falsevalue="" checked="true" label="Run classification algorithm?"/>
-            <expand macro="common_blast_params"/>
-            <param argument="--minSupportPercent" type="float" value="0.05" min="0.0" max="100.0" label="Minimum support as percent of assigned reads" help="0 value ignores"/>
-            <param argument="--minSupport" type="integer" value="0" label="Minimum support" help="0 value ignores"/>
-            <param argument="--minPercentReadCover" type="float" value="0.0" min="0.0" max="100.0" label="Minimum percent of read length to be covered by alignments"/>
-            <param argument="--minPercentReferenceCover" type="float" value="0.0" min="0.0" max="100.0" label="Minimum percent of reference length to be covered by alignments"/>
-            <param argument="--minReadLength" type="integer" value="0" label="Minimum read length"/>
-            <param argument="--lcaAlgorithm" type="select" label="Select the LCA algorithm to use for taxonomic assignment">
-                <option value="naive" selected="true">naive</option>
-                <option value="weighted">weighted</option>
-                <option value="longReads">longReads</option>
-            </param>
-            <param argument="--lcaCoveragePercent" type="float" value="100.0" min="0.0" max="100.0" label="Percent for the LCA to cover"/>
-            <param argument="--readAssignmentMode" type="select" label="Select the read assignment mode">
-                <option value="alignedBases" selected="true">alignedBases</option>
-                <option value="readCount">readCount</option>
-            </param>
-            <conditional name="con_file_cond">
-                <param argument="--conFile" type="select" label="Process a file of contaminant taxa" help="One id or name per line">
-                    <option value="no" selected="true">No</option>
-                    <option value="yes">Yes</option>
-                </param>
-                <when value="no"/>
-                <when value="yes">
-                    <param argument="conFile" type="data" format="txt" label="File of contaminant taxa"/>
-                </when>
-            </conditional>
+            <expand macro="classify_param"/>
+            <expand macro="blast_params"/>
+            <expand macro="min_max_params"/>
+            <expand macro="lca_params"/>
+            <expand macro="read_assignment_mode_param"/>
+            <expand macro="con_file_param"/>
         </section>
     </inputs>
     <outputs>
@@ -178,7 +157,6 @@
             <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz"/>
             <param name="blast1" value="blast_R1.txt" ftype="txt"/>
             <param name="blastMode" value="BlastN"/>
-            <param name="conFile" value="yes"/>
             <param name="conFile" value="contaminants.txt" ftype="txt"/>
             <output name="rma6_output" ftype="rma6">
                 <assert_contents>
@@ -239,8 +217,6 @@
 This tool outputs a RealMedia Audio (RMA) file.  MEGAN uses an update of the original RMA file format known as RMA6.  This update
 requires less disk space for files.
     </help>
-    <citations>
-        <citation type="doi">https://doi.org/10.1101/050559</citation>
-    </citations>
+    <expand macro="citations"/>
 </tool>
 
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b macros.xml
--- a/macros.xml Wed Nov 24 21:52:14 2021 +0000
+++ b/macros.xml Fri Dec 03 23:09:53 2021 +0000
b
@@ -38,6 +38,18 @@
             </when>
         </conditional>
     </macro>
+    <macro name="long_reads_param">
+        <param argument="--longReads" type="boolean" truevalue="--longReads" falsevalue="" checked="false" label="Parse and analyse input reads as long reads?"/>
+    </macro>
+    <macro name="classification_options">
+        <option value="EC" selected="true">EC</option>
+        <option value="EGGNOG">EGGNOG</option>
+        <option value="GTDB">GTDB</option>
+        <option value="INTERPRO2GO">INTERPRO2GO</option>
+        <option value="KEGG">KEGG</option>
+        <option value="SEED">SEED</option>
+        <option value="Taxonomy">Taxonomy</option>
+    </macro>
     <macro name="blast_mode_options">
         <option value="Unknown" selected="true">Unknown</option>
         <option value="BlastN">BlastN</option>
@@ -45,12 +57,42 @@
         <option value="BlastX">BlastX</option>
         <option value="Classifier">Classifier</option>
     </macro>
-    <macro name="common_blast_params">
+    <macro name="classify_param">
+        <param argument="--classify" type="boolean" truevalue="--classify" falsevalue="" checked="true" label="Run classification algorithm?"/>
+    </macro>
+    <macro name="blast_params">
         <param argument="--minScore" type="float" value="50.0" label="Minimum score"/>
         <param argument="--maxExpected" type="float" value="0.01" label="Maximum expected"/>
         <param argument="--minPercentIdentity" type="float" value="0.0" min="0.0" max="100.0" label="Minimum percent identity"/>
         <param argument="--topPercent" type="float" value="10.0" min="0.0" max="100.0" label="Top percent"/>
     </macro>
+    <macro name="min_max_params">
+        <param argument="--minSupportPercent" type="float" value="0.05" min="0.0" max="100.0" label="Minimum support as percent of assigned reads" help="0 value ignores"/>
+        <param argument="--minSupport" type="integer" value="0" label="Minimum support" help="0 value ignores"/>
+        <param argument="--minPercentReadCover" type="float" value="0.0" min="0.0" max="100.0" label="Minimum percent of read length to be covered by alignments"/>
+        <param argument="--minPercentReferenceCover" type="float" value="0.0" min="0.0" max="100.0" label="Minimum percent of reference length to be covered by alignments"/>
+        <param argument="--minReadLength" type="integer" value="0" label="Minimum read length"/>
+    </macro>
+    <macro name="lca_params">
+        <param argument="--lcaAlgorithm" type="select" label="Select the LCA algorithm to use for taxonomic assignment">
+            <option value="naive" selected="true">naive</option>
+            <option value="weighted">weighted</option>
+            <option value="longReads">longReads</option>
+        </param>
+        <param argument="--lcaCoveragePercent" type="float" value="100.0" min="0.0" max="100.0" label="Percent for the LCA to cover"/>
+    </macro>
+    <macro name="read_assignment_mode_param">
+        <param argument="--readAssignmentMode" type="select" label="Select the read assignment mode">
+            <option value="alignedBases" selected="true">alignedBases</option>
+            <option value="readCount">readCount</option>
+        </param>
+    </macro>
+    <macro name="con_file_param">
+        <param argument="--conFile" type="data" format="txt" optional="true" label="File of contaminant taxa (one id or name per line)" help="Optional, no selection ignores"/>
+    </macro>
+    <macro name="mapdb_param">
+        <param argument="--mapDB" type="data" format="sqlite" optional="true" label="MEGAN mapping db" help="Optional, no selection ignores"/>
+    </macro>
     <xml name="sanitize_query" token_validinitial="string.printable">
         <sanitizer>
             <valid initial="@VALIDINITIAL@">
@@ -64,6 +106,8 @@
     </xml>
     <xml name="citations">
         <citations>
+            <citation type="doi">10.1038/nmeth.3176</citation>
+            <citation type="doi">10.1101/gr.120618.111</citation>
             <citation type="doi">10.1101/gr.5969107</citation>
         </citations>
     </xml>
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b test-data/daa2info_output1.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/daa2info_output1.txt Fri Dec 03 23:09:53 2021 +0000
b
@@ -0,0 +1,3 @@
+# Number of reads: 1
+# Alignment mode:  BLASTP
+# Is meganized:    false
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b test-data/daa2info_output2.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/daa2info_output2.txt Fri Dec 03 23:09:53 2021 +0000
b
@@ -0,0 +1,19 @@
+# Number of reads: 1
+# Alignment mode:  BLASTP
+# Is meganized:    true
+# Classifications: Taxonomy
+# Meganization summary:
+## @Creator DAA2Info
+## @CreationDate
+## @ContentType Summary4
+## @Names input
+## @BlastMode BlastP
+## @Uids
+## @Sizes 1.0
+## @TotalReads 1
+## @AdditionalReads 0
+## Classifications:
+##  Taxonomy (1 classes)
+## @Algorithm Taxonomy merge
+## @Parameters
+## 
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b test-data/daa2info_output_summary2.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/daa2info_output_summary2.txt Fri Dec 03 23:09:53 2021 +0000
b
@@ -0,0 +1,16 @@
+@Creator DAA2Info
+@CreationDate
+@ContentType Summary4
+@Names input
+@BlastMode BlastP
+@Uids
+@Sizes 1
+@TotalReads 1
+@AdditionalReads 0
+@Algorithm Taxonomy merge
+@Parameters
+@ColorTable Fews8 White-Green
+TAX -2 1
+END_OF_DATA_TABLE
+#SampleID @Source
+input.daa input.DAA
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b test-data/input.daa
b
Binary file test-data/input.daa has changed
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b test-data/input_meganized.daa
b
Binary file test-data/input_meganized.daa has changed
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b test-data/read_extractor_input.rma6
b
Binary file test-data/read_extractor_input.rma6 has changed
b
diff -r fa3c3a64c993 -r 2f8d3924bb3b test-data/read_extractor_output.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/read_extractor_output.txt Fri Dec 03 23:09:53 2021 +0000
b
@@ -0,0 +1,2 @@
+>sequence
+LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLVEWIWGGFSVDKATLNRFFAFHFILFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLGLXXXXXXXXXXXXXSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVILGLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGXIENY