diff lofreq_indelqual.xml @ 0:8d8ee5939303 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/lofreq commit b8b08e76ebdca1fceef0da1b377eb4b6d45b0847-dirty"
author dave
date Wed, 27 Nov 2019 15:25:08 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lofreq_indelqual.xml	Wed Nov 27 15:25:08 2019 +0000
@@ -0,0 +1,99 @@
+<tool id="lofreq_indelqual" name="Insert indel qualities" version="@WRAPPER_VERSION@0">
+    <description>into a BAM file</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        #if $strategy.selector == 'dindel'
+            #if str($strategy.reference_source.ref_selector) == 'history':
+                #set $reference_fasta_fn = 'reference.fa'
+                ln -s '$strategy.reference_source.ref' $reference_fasta_fn &&
+                lofreq faidx $reference_fasta_fn 2>&1 || echo "Error running samtools faidx for indexing fasta reference for lofreq" >&2 &&
+            #else
+                #set $reference_fasta_fn = str($strategy.reference_source.ref.fields.path)
+            #end if
+        #end if
+        lofreq indelqual
+        #if $strategy.selector == 'dindel'
+            --dindel
+            --ref $reference_fasta_fn
+        #else
+            #if $strategy.deletions
+                --uniform $strategy.insertions,$strategy.deletions
+            #else
+                --uniform $strategy.insertions
+            #end if
+        #end if
+        -o output.bam $reads
+    ]]></command>
+    <inputs>
+        <param type="data" name="reads" format="bam" />
+        <conditional name="strategy" label="Indel calculation approach">
+            <param name="selector" type="select">
+                <option value="uniform">Uniform</option>
+                <option value="dindel">Dindel</option>
+            </param>
+            <when value="uniform">
+                <param name="insertions" type="integer" value="30" label="Indel quality to add" help="Should probably not be left at the default value" />
+                <param name="deletions" type="integer" optional="true" label="Separate deletion quality" help="Leave blank to use the same values for insertions and deletions" />
+            </when>
+            <when value="dindel">
+                <expand macro="reference_interface" />
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="output" format="bam" from_work_dir="output.bam" label="Add indel qualities to data ${reads.dataset.hid}" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
+            <param name="selector" value="uniform" />
+            <param name="insertions" value="20" />
+            <param name="deletions" value="30" />
+            <output name="output" file="indelqual-out1.bam" />
+        </test>
+        <test>
+            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
+            <param name="selector" value="dindel" />
+            <param name="ref_selector" value="history" />
+            <param name="ref" ftype="fasta" value="pBR322.fa" />
+            <output name="output" file="indelqual-out2.bam" />
+        </test>
+        <test>
+            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
+            <param name="selector" value="uniform" />
+            <param name="insertions" value="20" />
+            <output name="output" file="indelqual-out3.bam" />
+        </test>
+    </tests>
+    <help><![CDATA[
+        lofreq indelqual: Insert indel qualities into BAM file (required for indel predictions)
+
+Usage: lofreq indelqual [options] in.bam
+Options:
+  -u | --uniform INT[,INT]  Add this indel quality uniformly to all bases.
+                            Use two comma separated values to specify
+                            insertion and deletion quality separately.
+                            (clashes with --dindel)
+       --dindel             Add Dindel's indel qualities (Illumina specific)
+                            (clashes with -u; needs --ref)
+  -f | --ref                Reference sequence used for mapping
+                            (Only required for --dindel)
+  -o | --out FILE           Output BAM file [- = stdout = default]
+       --verbose            Be verbose
+
+The preferred way of inserting indel qualities should be via GATK's BQSR (>=2) If that's not possible, use this subcommand.
+The command has two modes: 'uniform' and 'dindel':
+- 'uniform' will assign a given value uniformly, whereas
+- 'dindel' will insert indel qualities based on Dindel (PMID 20980555).
+Both will overwrite any existing values.
+Do not realign your BAM file afterwards!
+
+
+    ]]></help>
+    <expand macro="citations">
+        <citation type="doi">10.1101/gr.112326.110</citation>
+    </expand>
+</tool>
\ No newline at end of file