diff samtools_calmd.xml @ 5:c147e3a10573 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_calmd commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author iuc
date Tue, 28 Sep 2021 16:12:02 +0000
parents 06dc50b7b711
children 92ec40abcdcf
line wrap: on
line diff
--- a/samtools_calmd.xml	Thu Oct 17 02:18:43 2019 -0400
+++ b/samtools_calmd.xml	Tue Sep 28 16:12:02 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_calmd" name="CalMD" version="2.0.2">
+<tool id="samtools_calmd" name="Samtools calmd" version="2.0.3" profile="@PROFILE@">
     <description>recalculate MD/NM tags</description>
     <macros>
         <import>macros.xml</import>
@@ -8,13 +8,7 @@
     <expand macro="version_command"/>
     <command><![CDATA[
 @ADDTHREADS@
-#if str( $reference_source.reference_source_selector ) == "history":
-    #set ref_fa = 'ref.fa'
-    ln -s '${reference_source.ref_fasta}' ref.fa &&
-    samtools faidx ref.fa &&
-#else:
-    #set ref_fa = str( $reference_source.ref_fasta.fields.path )
-#end if
+@PREPARE_FASTA_IDX@
 
 samtools calmd
     $baq_settings.use_baq $baq_settings.modify_quality $baq_settings.extended_baq
@@ -23,29 +17,13 @@
     #end if
     -b
     -@ \$addthreads
-    '$input_bam'
-    '$ref_fa'
+    '$input'
+    '$reffa'
     > '$calmd_output'
     ]]></command>
     <inputs>
-        <param name="input_bam" type="data" format="bam" label="BAM file to recalculate" />
-        <conditional name="reference_source">
-            <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
-                <option value="cached">Use a built-in genome</option>
-                <option value="history">Use a genome from the history</option>
-            </param>
-            <when value="cached">
-                <param name="ref_fasta" type="select" label="Using reference genome">
-                    <options from_data_table="fasta_indexes">
-                        <filter type="data_meta" column="dbkey" key="dbkey" ref="input_bam" />
-                        <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file" />
-                    </options>
-                </param>
-            </when>
-            <when value="history">
-                <param name="ref_fasta" type="data" format="fasta" label="Using reference file" />
-            </when>
-        </conditional>
+        <param name="input" type="data" format="bam" label="BAM file to recalculate" />
+        <expand macro="mandatory_reference"/>
         <conditional name="baq_settings">
             <param name="use_baq" argument="-r" type="select"
             label="Do you also want BAQ (Base Alignment Quality) scores to be calculated?">
@@ -86,10 +64,10 @@
         <test>
             <param name="use_baq" value="" />
             <param name="option_sets" value="default" />
-            <param name="input_bam" value="phiX.bam"/>
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_fasta" value="phiX.fasta" />
-            <output name="calmd_output" file="samtools_calmd_out_1.bam" ftype="bam" />
+            <param name="input" value="phiX.bam"/>
+            <param name="addref_select" value="history" />
+            <param name="ref" value="phiX.fasta" />
+            <output name="calmd_output" file="samtools_calmd_out_1.bam" ftype="bam" lines_diff="4" />
         </test>
         <test>
             <param name="use_baq" value="-r" />
@@ -97,10 +75,10 @@
             <param name="option_sets" value="advanced" />
             <param name="change_identical" value="true" />
             <param name="adjust_mq" value="50" />
-            <param name="input_bam" value="phiX.bam"/>
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_fasta" value="phiX.fasta" />
-            <output name="calmd_output" file="samtools_calmd_out_2.bam" ftype="bam" />
+            <param name="input" value="phiX.bam"/>
+            <param name="addref_select" value="history" />
+            <param name="ref" value="phiX.fasta" />
+            <output name="calmd_output" file="samtools_calmd_out_2.bam" ftype="bam" lines_diff="4" />
         </test>
     </tests>
     <help><![CDATA[
@@ -125,7 +103,7 @@
 
   MD (string)  String for mismatching positions. Regex : [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)*7
   NM (integer) Edit distance to the reference, including ambiguous bases but excluding clipping
-  BQ (string)  String of offsets to base alignment quality (BAQ), of the same length as the read sequence. 
+  BQ (string)  String of offsets to base alignment quality (BAQ), of the same length as the read sequence.
                At the i-th read base, BAQ i = Q i − (BQ i − 64) where Q i is the i-th base quality.
 
 See references for more information about SAM format tags.