diff lofreq_viterbi.xml @ 1:ecd80c7c3886 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/lofreq commit 9e41ac63171c3e3a6fd2b4d018d0c60c9f1fbae1"
author iuc
date Fri, 31 Jan 2020 06:17:30 -0500
parents 33a416e1659e
children af7e416d8176
line wrap: on
line diff
--- a/lofreq_viterbi.xml	Tue Dec 17 17:25:37 2019 -0500
+++ b/lofreq_viterbi.xml	Fri Jan 31 06:17:30 2020 -0500
@@ -1,4 +1,4 @@
-<tool id="lofreq_viterbi" name="Realign reads" version="@WRAPPER_VERSION@0" python_template_version="3.5">
+<tool id="lofreq_viterbi" name="Realign reads" version="@TOOL_VERSION@+galaxy1">
     <description>with LoFreq viterbi</description>
     <macros>
         <import>macros.xml</import>
@@ -8,13 +8,41 @@
     </expand>
     <command detect_errors="exit_code"><![CDATA[
         @PREPARE_REF@
-        lofreq viterbi --ref '$reference_fasta_fn' --out - $keepflags --defqual $defqual '$reads' | samtools sort - -O BAM -o '$realigned'
+        lofreq viterbi
+        --ref '$reference_fasta_fn'
+        ${adv_options.delflags}
+        --defqual ${adv_options.bq2_handling.defqual}
+        --out tmp.bam '$reads' &&
+
+        samtools sort -T "\${TMPDIR:-.}" -@ \${GALAXY_SLOTS:-1} -O BAM -o '$realigned' tmp.bam
     ]]></command>
     <inputs>
         <param name="reads" type="data" format="bam" label="Reads to realign" />
         <expand macro="reference_interface" />
-        <param argument="--keepflags" type="boolean" truevalue="--keepflags" label="Don't delete flags MC, MD, NM, and A" help="These flags are all prone to changing during realignment" />
-        <param argument="--defqual" type="integer" value="-1" label="Quality to assume for all bases with BQ2" />
+        <section name="adv_options" title="Advanced options" expanded="false">
+            <param argument="--keepflags" name="delflags" type="boolean" truevalue="" falsevalue="--keepflags" checked="true"
+            label="Delete flags MC, MD, NM, and A?"
+            help="These flags are all prone to getting invalidated during realignment. Keep them only if you know what you are doing." />
+            <conditional name="bq2_handling">
+                <param name="replace_bq2" type="select"
+                label="How to handle base qualities of 2?"
+                help="In sequenced reads obtained with Illumina sequencing pipelines before version 1.8, base quality 2 is special in that it serves as a general indicator of low quality of the corresponding bases. For such reads, the tool can make an optimistic guess of the real quality of such bases by replacing base qualities of 2 with the median of all other base qualities observed in the read. Alternatively, you can provide a fixed replacement value. For recently obtained sequencing data, just keep BQ2 values unchanged (the default) since they have no special meaning.">
+                    <option value="keep">Keep unchanged</option>
+                    <option value="dynamic">Adjust dynamically</option>
+                    <option value="fixed">Replace with fixed base quality</option>
+                </param>
+                <when value="keep">
+                    <param name="defqual" type="hidden" value="2" />
+                </when>
+                <when value="dynamic">
+                    <param name="defqual" type="hidden" value="-1" />
+                </when>
+                <when value="fixed">
+                    <param argument="--defqual" name="defqual" type="integer" value="2" min="0"
+                    label="Quality to assume for all bases with BQ2" />
+                </when>
+            </conditional>
+        </section>
     </inputs>
     <outputs>
         <data name="realigned" format="bam" label="${tool.name} on ${on_string}: Realigned reads" />
@@ -29,23 +57,20 @@
         <test>
             <param name="reads" ftype="bam" value="lofreq-in1.bam" />
             <param name="ref_selector" value="history" />
-            <param name="keepflags" value="true" />
+            <section name="adv_options">
+                <param name="delflags" value="false" />
+            </section>
             <param name="ref" ftype="fasta" value="pBR322.fa" />
             <output name="realigned" file="viterbi-out2.bam" />
         </test>
     </tests>
     <help><![CDATA[
-Usage: lofreq viterbi [options] in.bam
+lofreq viterbi: Probabilistic realignment of mapped reads to correct mapping errors.
 
-Options:
-    -f | --ref FILE     Indexed reference fasta file [null]
-    -k | --keepflags    Don't delete flags MC, MD, NM and A, which are all prone to change during realignment.
-    -q | --defqual INT  Assume INT as quality for all bases with BQ2. Default (=-1) is to use median quality of bases in read.
-    -o | --out FILE     Output BAM file [- = stdout = default]
-    --verbose      Be verbose
+.. class:: Warning mark
 
-NOTE: Output BAM file will (likely) be unsorted (use samtools sort, e.g. lofreq viterbi ... | samtools sort -')
+   Not recommended for non-Illumina data.
 
     ]]></help>
     <expand macro="citations" />
-</tool>
\ No newline at end of file
+</tool>