changeset 0:204a131e47db draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bbtools commit ae31a678eb5c04fb74b94161db95705d597990ad"
author iuc
date Thu, 11 Nov 2021 16:38:32 +0000
parents
children 60dd895841cd
files bbduk.xml macros.xml test-data/13-1941-6_S4_L001_R1_600000.fastq.gz test-data/13-1941-6_S4_L001_R2_600000.fastq.gz test-data/NC_002945v4.fasta test-data/adapters.fa.gz test-data/bduk_output_dump1.fasta test-data/bduk_output_quhist1.tabular test-data/bduk_outputu1.fastqsanger test-data/bduk_outputu2.fastqsanger test-data/cv_input.bam test-data/cv_output.gff test-data/cv_output.txt test-data/cv_output.vcf test-data/cv_qualityhist_output.tabular test-data/cv_scorehist_output.tabular test-data/cv_zygosityhist_output.tabular test-data/fasta_indexes.loc test-data/output1.bam test-data/output2.bam test-data/output3.bam tool-data/fasta_indexes.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test
diffstat 24 files changed, 1186 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bbduk.xml	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,356 @@
+<tool id="bbtools_bbduk" name="BBTools: BBduk" version="@WRAPPER_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>decontamination using kmers</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+#import os
+#import re
+
+#if str($input_type_cond.input_type) in ['single', 'pair']:
+    #set read1 = $input_type_cond.read1
+    #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier))
+    ## bbduk uses the file extension to determine the input format.
+    #set ext = $read1_identifier + '.fastq'
+    #if $read1.ext.endswith('.gz'):
+        #set ext = $ext + '.gz'
+    #end if
+    #set read1_file = $read1_identifier + $ext
+    ln -s '${read1}' '${read1_file}' &&
+    #if str($input_type_cond.input_type) == 'pair':
+        #set read2 = $input_type_cond.read2
+        #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.element_identifier))
+        #set read2_file = $read2_identifier + $ext
+        ln -s '${read2}' '${read2_file}' &&
+    #end if
+#else:
+    #set read1 = $input_type_cond.reads_collection['forward']
+    #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.name))
+    ## bbduk uses the file extension to determine the input format.
+    #set ext = $read1_identifier + '.fastq'
+    #if $read1.ext.endswith('.gz'):
+        #set ext = $ext + '.gz'
+    #end if
+    #set read1_file = $read1_identifier + $ext
+    ln -s '${read1}' '${read1_file}' &&
+    #set read2 = $input_type_cond.reads_collection['reverse']
+    #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.name))
+    #set read2_file = $read2_identifier + $ext
+    ln -s '${read2}' '${read2_file}' &&
+#end if
+
+#if str($reference_type_cond.reference_type) == 'files':
+    #set refs = list()
+    #for ref in $reference_type_cond.reference:
+        ## bbduk looks at the file extension.
+        #set ref_name = str($os.path.basename($ref.file_name)) + '.fa'
+        #if $ref.ext.endswith('.gz'):
+            gunzip -c '$ref' > '$ref_name' &&
+        #else:
+            ln -s '$ref' '$ref_name' &&
+        #end if
+        $refs.append(str($ref_name))
+    #end for
+    #set refs = ','.join($refs)
+#else if str($reference_type_cond.reference_type) == 'keywords':
+    #set refs = str($reference_type_cond.reference)
+#end if
+
+bbduk.sh
+in='${read1_file}'
+
+#if str($input_type_cond.input_type) in ['pair', 'paired']:
+    in2='${read2_file}'
+#end if
+#if str($outputs_select).find('outu') >= 0:
+    out='${outputu}'
+    #if str($input_type_cond.input_type) in ['pair', 'paired']:
+        out2='${outputu2}'
+    #end if
+#end if
+#if str($outputs_select).find('outm') >= 0:
+    outm='${outputm}'
+    #if str($input_type_cond.input_type) in ['pair', 'paired']:
+        outm2='${outputm2}'
+    #end if
+#end if
+#if str($outputs_select).find('outs') >= 0:
+    outs='${outputs}'
+#end if
+
+#if str($reference_type_cond.reference_type) != 'no_reference':
+    ref='$refs'
+    #if str($reference_type_cond.ktrim_cond.ktrim_select) == 'yes':
+        ktrim='${reference_type_cond.ktrim_cond.ktrim}'
+        minlength=$reference_type_cond.ktrim_cond.minlength
+    #end if
+#end if
+
+k=$advanced_options.k
+rcomp='${advanced_options.rcomp}'
+maskmiddle='${advanced_options.maskmiddle}'
+minkmerhits='${advanced_options.minkmerhits}'
+minkmerfraction=$advanced_options.minkmerfraction
+mincovfraction=$advanced_options.mincovfraction
+hammingdistance=$advanced_options.hammingdistance
+qhdist=$advanced_options.qhdist
+editdistance=$advanced_options.editdistance
+forbidn='${advanced_options.forbidn}'
+trimfailures='${advanced_options.trimfailures}'
+findbestmatch='${advanced_options.findbestmatch}'
+skipr1='${advanced_options.skipr1}'
+skipr2='${advanced_options.skipr2}'
+
+#if str($output_stats_cond.output_stats) == 'yes':
+    #if str($output_stats_cond.output_stats_select).find('stats') >= 0:
+        stats='${output_stats}'
+    #end if
+    #if str($output_stats_cond.output_stats_select).find('ref') >= 0:
+        refstats='${output_ref}'
+    #end if
+    #if str($output_stats_cond.output_stats_select).find('rpkm') >= 0:
+        rpkm='${output_rpkm}'
+    #end if
+    #if str($output_stats_cond.output_stats_select).find('dump') >= 0:
+        dump='${output_dump}'
+    #end if
+#end if
+#if str($output_hists_cond.output_hists) == 'yes':
+    #if str($output_hists_cond.output_hists_select).find('bhist') >= 0:
+        bhist='${output_bhist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('quhist') >= 0:
+        qhist='${output_quhist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('quchist') >= 0:
+        qchist='${output_quchist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('aqhist') >= 0:
+        aqhist='${output_aqhist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('bqhist') >= 0:
+        bqhist='${output_bqhist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('lhist') >= 0:
+        lhist='${output_lhist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('phist') >= 0:
+        phist='${output_phist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('gchist') >= 0:
+        gchist='${output_gchist}'
+    #end if
+    #if str($output_hists_cond.output_hists_select).find('enthist') >= 0:
+        enthist='${output_enthist}'
+    #end if
+#end if
+t=\${GALAXY_SLOTS:-4}
+]]></command>
+    <inputs>
+        <expand macro="input_type_cond"/>
+        <conditional name="reference_type_cond">
+            <param name="reference_type" type="select" label="Choose the reference type" help="Optional, no reference is the default">
+                <option value="no_reference" selected="true">No reference</option>
+                <option value="files">files</option>
+                <option value="keywords">keywords</option>
+            </param>
+            <when value="no_reference"/>
+            <when value="files">
+                <param name="reference" type="data" format="fasta,fasta.gz" multiple="true" optional="false" label="Select one or more fasta file"/>
+                <expand macro="ktrim_cond"/>
+            </when>
+            <when value="keywords">
+                <param name="reference"  type="select" multiple="true" optional="false" label="Select one or more keywords">
+                    <option value="adapters">adapters</option>
+                    <option value="artifacts">artifacts</option>
+                    <option value="phix">phix</option>
+                    <option value="lambda">lambda</option>
+                    <option value="pjet">pjet</option>
+                    <option value="mtst">mtst</option>
+                    <option value="kapa">kapa</option>
+                </param>
+                <expand macro="ktrim_cond"/>
+            </when>
+        </conditional>
+        <section name="advanced_options" title="Advanced options" expanded="false">
+            <param argument="k" type="integer" value="27" min="1" label="Kmer length used for finding contaminants"/>
+            <param argument="rcomp" type="boolean" truevalue="t" falsevalue="f" checked="true" label="Look for reverse-complements of kmers in addition to forward kmers?"/>
+            <param argument="maskmiddle" type="boolean" truevalue="t" falsevalue="f" checked="true" label="Treat the middle base of a kmer as a wildcard to increase sensitivity in the presence of errors?"/>
+            <param argument="minkmerhits" type="integer" value="1" min="1" label="Reads need at least this many matching kmers to be considered as matching the reference"/>
+            <param argument="minkmerfraction" type="float" value="0" min="0" label="A read needs at least this fraction of its total kmers to hit a ref in order to be considered a match"/>
+            <param argument="mincovfraction" type="float" value="0" min="0" label="A read needs at least this fraction of its total bases to be covered by ref kmers to be considered a match"/>
+            <param argument="hammingdistance" type="integer" value="0" min="0" label="Maximum Hamming distance for ref kmers (subs only)"/>
+            <param argument="qhdist" type="integer" value="0" min="0" label="Hamming distance for query kmers"/>
+            <param argument="editdistance" type="integer" value="0" min="0" label="Maximum edit distance from ref kmers (subs and indels)"/>
+            <param argument="forbidn" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Do not match kmers comntaining N?"/>
+            <param argument="trimfailures" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Trim failed reads to 1bp instead of discarding them?"/>
+            <param argument="findbestmatch" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Associate read with sequence sharing most kmers if multiple matches?"/>
+            <param argument="skipr1" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Don't do kmer-based operations on read 1?"/>
+            <param argument="skipr2" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Don't do kmer-based operations on read 2?"/>
+        </section>
+        <param name="outputs_select"  type="select" multiple="true" optional="false" label="Specify outputs">
+            <option value="outu">Unmatched</option>
+            <option value="outm">Matched</option>
+            <option value="outs">Single</option>
+        </param>
+        <conditional name="output_stats_cond">
+            <param name="output_stats"  type="select" label="Output statistics?">
+                <option value="no" selected="true">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no"/>
+            <when value="yes">
+                <param name="output_stats_select"  type="select" multiple="true" optional="false" label="Specify statistics outputs">
+                    <option value="stats">Statistics about which contamininants were detected</option>
+                    <option value="ref">Statistics on a per-reference-file basis</option>
+                    <option value="rpkm">RPKM for each reference sequence (for RNA-seq)</option>
+                    <option value="dump">kmer tables in fasta format</option>
+                </param>
+            </when>
+        </conditional>
+        <conditional name="output_hists_cond">
+            <param name="output_hists"  type="select" label="Output histograms?">
+                <option value="no" selected="true">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no"/>
+            <when value="yes">
+                <param name="output_hists_select"  type="select" multiple="true" optional="false" label="Specify statistics outputs">
+                    <option value="bhist">Base composition histogram by position</option>
+                    <option value="quhist">Quality histogram by position</option>
+                    <option value="quchist">Count of bases with each quality value</option>
+                    <option value="aqhist">Histogram of average read quality</option>
+                    <option value="bqhist">Quality histogram designed for box plots</option>
+                    <option value="lhist">Read length histogram</option>
+                    <option value="phist">Polymer length histogram</option>
+                    <option value="gchist">Read GC content histogram</option>
+                    <option value="enthist">Read entropy histogram</option>
+                </param>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="outputu" format="fastqsanger" label="${tool.name} on ${on_string} (Unmatched)">
+            <filter>str(outputs_select).find('outu') >= 0</filter>
+            <filter>'outu' in outputs_select</filter>
+        </data>
+        <data name="outputu2" format="fastqsanger" label="${tool.name} on ${on_string} (Unmatched)">
+            <filter>'outu' in outputs_select and input_type_cond['input_type'] != 'single'</filter>
+        </data>
+        <data name="outputm" format="fastqsanger" label="${tool.name} on ${on_string} (Matched)">
+            <filter>'outm' in outputs_select</filter>
+        </data>
+        <data name="outputm2" format="fastqsanger" label="${tool.name} on ${on_string} (Matched)">
+            <filter>'outm' in outputs_select and input_type_cond['input_type'] != 'single'</filter>
+        </data>
+        <data name="outputs" format="fastqsanger" label="${tool.name} on ${on_string} (Single)">
+            <filter>'outs' in outputs_select</filter>
+        </data>
+        <data name="output_stats" format="tabular" label="${tool.name} on ${on_string} (Detected contaminates stats)">
+            <filter>output_stats_cond['output_stats'] == 'yes' and 'stats' in output_stats_cond['output_stats_select']</filter>
+        </data>
+        <data name="output_ref" format="tabular" label="${tool.name} on ${on_string} (Per reference file stats)">
+            <filter>output_stats_cond['output_stats'] == 'yes' and 'ref' in output_stats_cond['output_stats_select']</filter>
+        </data>
+        <data name="output_rpkm" format="tabular" label="${tool.name} on ${on_string} (RPKM for each ref seq)">
+            <filter>output_stats_cond['output_stats'] == 'yes' and 'rpkm' in output_stats_cond['output_stats_select']</filter>
+        </data>
+        <data name="output_dump" format="fasta" label="${tool.name} on ${on_string} (kmer tables)">
+            <filter>output_stats_cond['output_stats'] == 'yes' and 'dump' in output_stats_cond['output_stats_select']</filter>
+        </data>
+        <data name="output_bhist" format="tabular" label="${tool.name} on ${on_string} (Base composition py poition)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'bhist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_quhist" format="tabular" label="${tool.name} on ${on_string} (Quality by position)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'quhist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_quchist" format="tabular" label="${tool.name} on ${on_string} (Bases w/ each quality value)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'quchist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_aqhist" format="tabular" label="${tool.name} on ${on_string} (average read quality)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'aqhist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_bqhist" format="tabular" label="${tool.name} on ${on_string} (Quality for box plots)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'bqhist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_lhist" format="tabular" label="${tool.name} on ${on_string} (Read length)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'lhist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_phist" format="tabular" label="${tool.name} on ${on_string} (Polymer length)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'phist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_gchist" format="tabular" label="${tool.name} on ${on_string} (Read GC content)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'gchist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+        <data name="output_enthist" format="tabular" label="${tool.name} on ${on_string} (Read entropy)">
+            <filter>output_hists_cond['output_hists'] == 'yes' and 'enthist' in output_hists_cond['output_hists_select']</filter>
+        </data>
+    </outputs>
+    <tests>
+        <!-- Single read -->
+        <test expect_num_outputs="1">
+            <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz"/>
+            <param name="reference" value="adapters.fa.gz" ftype="fasta.gz"/>
+            <param name="reference_type" value="files"/>
+            <param name="outputs_select" value="outu"/>
+            <output name="outputu" file="bduk_outputu1.fastqsanger" ftype="fastqsanger" compare="contains"/>
+        </test>
+        <!-- Paired reads in separate datasets -->
+        <test expect_num_outputs="4">
+            <param name="input_type" value="pair"/>
+            <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz"/>
+            <param name="read2" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz"/>
+            <param name="reference_type" value="files"/>
+            <param name="reference" value="adapters.fa.gz" ftype="fasta.gz"/>
+            <param name="outputs_select" value="outu"/>
+            <param name="output_stats" value="yes"/>
+            <param name="output_stats_select" value="dump"/>
+            <param name="output_hists" value="yes"/>
+            <param name="output_hists_select" value="quhist"/>
+            <output name="outputu" file="bduk_outputu1.fastqsanger" ftype="fastqsanger" compare="contains"/>
+            <output name="outputu2" file="bduk_outputu2.fastqsanger" ftype="fastqsanger" compare="contains"/>
+            <output name="output_dump" file="bduk_output_dump1.fasta" ftype="fasta" compare="contains"/>
+            <output name="output_quhist" file="bduk_output_quhist1.tabular" ftype="tabular"/>
+        </test>
+        <!-- Collection of Paired reads -->
+        <test expect_num_outputs="2">
+            <param name="input_type" value="paired"/>
+            <param name="reads_collection">
+                <collection type="paired">
+                    <element name="forward" value="13-1941-6_S4_L001_R1_600000.fastq.gz"/>
+                    <element name="reverse" value="13-1941-6_S4_L001_R2_600000.fastq.gz"/>
+                </collection>
+            </param>
+            <param name="reference_type" value="keywords"/>
+            <param name="reference" value="adapters,artifacts,phix,lambda,pjet,mtst,kapa"/>
+            <param name="outputs_select" value="outu"/>
+            <output name="outputu" file="bduk_outputu1.fastqsanger" ftype="fastqsanger" compare="contains"/>
+            <output name="outputu2" file="bduk_outputu2.fastqsanger" ftype="fastqsanger" compare="contains"/>
+        </test>
+    </tests>
+    <help>
+**What it does**
+
+BBDuk was developed to combine most common data-quality-related trimming, filtering, and masking operations into a single
+high-performance tool.  It is capable of quality-trimming and filtering, adapter-trimming, contaminant-filtering via kmer
+matching, sequence masking, GC-filtering, length filtering, entropy-filtering, format conversion, histogram generation,
+subsampling, quality-score recalibration, kmer cardinality estimation, and various other operations in a single pass.
+Specifically, any combination of operations is possible in a single pass with the exception of kmer-based operations (kmer
+trimming, kmer masking, or kmer filtering). At most 1 kmer-based operation can be done in a single pass.
+
+**Options**
+
+ * **Reference** - if a reference is specified, BBDuk will operate on kmers in one of 4 modes: right-trimming, left-trimming, masking, or filtering.  The default is filtering - any read matching a reference kmer will be discarded.
+
+ * **Trim reads to remove bases matching reference kmers** - When trimming to the right, once a reference kmer is matched in a read, that kmer and all the bases to the right will be trimmed, leaving only the bases to the left.  When trimming to the left, trimming will be done to the left instead.
+
+**Outputs**
+
+ * **Unmatched** - All the reads that pass all filtering criteria. Reads will be at least as long as **Minimum read length** after any trimming operations and reads will not match any reference kmer if kmer-filtering is being performed.  A read’s average quality will be at least as high as the specified **Minimum average quality**.
+ * **Matched** - Reads failing any filter criteria (such as matching a reference kmer). By default, if either read in a pair fails, both will be included in *Matched*.
+ * **Single** - Singleton reads whose mate was trimmed shorter than the value of **Minimum read length**.
+    </help>
+    <expand macro="citations"/>
+</tool>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,96 @@
+<macros>
+    <token name="@WRAPPER_VERSION@">1.0.0</token>
+    <token name="@VERSION_SUFFIX@">1.0.0</token>
+    <token name="@PROFILE@">20.09</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="38.92">bbmap</requirement>
+        </requirements>
+    </xml>
+    <macro name="dbKeyActionsBBMap">
+        <expand macro="dbKeyActions">
+            <option type="from_data_table" name="fasta_indexes" column="1" offset="0">
+                <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
+                <filter type="param_value" ref="ref_source_cond.reference" column="1"/>
+            </option>
+        </expand>
+    </macro>
+    <macro name="dbKeyActions">
+        <actions>
+            <conditional name="ref_source_cond.ref_source">
+                <when value="cached">
+                    <action type="metadata" name="dbkey">
+                        <yield/>
+                    </action>
+                </when>
+                <when value="history">
+                    <action type="metadata" name="dbkey">
+                        <option type="from_param" name="ref_source_cond.reference" param_attribute="dbkey"/>
+                    </action>
+                </when>
+            </conditional>
+        </actions>
+    </macro>
+    <macro name="input_type_cond">
+        <conditional name="input_type_cond">
+            <param name="input_type" type="select" label="Choose the category of the files to be analyzed">
+                <option value="single" selected="true">Single dataset</option>
+                <option value="pair">Dataset pair</option>
+                <option value="paired">List of dataset pairs</option>
+            </param>
+            <when value="single">
+                <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/>
+            </when>
+            <when value="pair">
+                <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/>
+                <param name="read2" type="data" format="fastqsanger.gz,fastqsanger" label="Read2 fastq file"/>
+            </when>
+            <when value="paired">
+                <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="paired" label="Collection of fastqsanger paired read files"/>
+            </when>
+        </conditional>
+    </macro>
+    <macro name="reference_source_cond">
+        <conditional name="ref_source_cond">
+            <param name="ref_source" type="select" label="Select reference genome source; a cached reference or one from the history">
+                <option value="cached" selected="True">Use a cached reference</option>
+                <option value="history">Use a reference from the history</option>
+            </param>
+            <when value="cached">
+                <param name="reference" type="select" label="Using reference genome">
+                    <options from_data_table="fasta_indexes">
+                        <filter type="sort_by" column="2"/>
+                        <validator type="no_options" message="A built-in reference genome is not available"/>
+                    </options>
+                </param>
+            </when>
+            <when value="history">
+                <param name="reference" type="data" format="fasta" label="Using reference genome"/>
+            </when>
+        </conditional>
+    </macro>
+    <macro name="ktrim_cond">
+        <conditional name="ktrim_cond">
+            <param name="ktrim_select"  type="select" label="Trim reads to remove bases matching reference kmers?">
+                <option value="no" selected="true">No</option>
+                <option value="yes">Yes</option>
+            </param>
+            <when value="no"/>
+            <when value="yes">
+                <param argument="ktrim"  type="select" label="Select trimming position">
+                    <option value="r">Trim to the right</option>
+                    <option value="l">Trim to the left</option>
+                </param>
+                <param argument="minlength" type="integer" value="10" label="Minimum read length" help="Trimmed reads shorter than this will be discarded, pairs will be discarded if both are shorter."/>
+             </when>
+        </conditional>
+    </macro>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">
+                https://doi.org/10.1371/journal.pone.0185056
+            </citation>
+        </citations>
+    </xml>
+</macros>
+
Binary file test-data/13-1941-6_S4_L001_R1_600000.fastq.gz has changed
Binary file test-data/13-1941-6_S4_L001_R2_600000.fastq.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/NC_002945v4.fasta	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,101 @@
+>NC_002945.4 Mycobacterium bovis AF2122/97 genome assembly, chromosome: Mycobacterium_bovis_AF2122/97
+TTGACCGATGACCCCGGTTCAGGCTTCACCACAGTGTGGAACGCGGTCGTCTCCGAACTTAACGGCGACC
+CTAAGGTTGACGACGGACCCAGCAGTGATGCTAATCTCAGCGCTCCGCTGACCCCTCAGCAAAGGGCTTG
+GCTCAATCTCGTCCAGCCATTGACCATCGTCGAGGGGTTTGCTCTGTTATCCGTGCCGAGCAGCTTTGTC
+CAAAACGAAATCGAGCGCCATCTGCGGGCCCCGATTACCGACGCTCTCAGCCGCCGACTCGGACATCAGA
+TCCAACTCGGGGTCCGCATCGCTCCGCCGGCGACCGACGAAGCCGACGACACTACCGTGCCGCCTTCCGA
+AAATCCTGCTACCACATCGCCAGACACCACAACCGACAACGACGAGATTGATGACAGCGCTGCGGCACGG
+GGCGATAACCAGCACAGTTGGCCAAGTTACTTCACCGAGCGCCCGCGCAATACCGATTCCGCTACCGCTG
+GCGTAACCAGCCTTAACCGTCGCTACACCTTTGATACGTTCGTTATCGGCGCCTCCAACCGGTTCGCGCA
+CGCCGCCGCCTTGGCGATCGCAGAAGCACCCGCCCGCGCTTACAACCCCCTGTTCATCTGGGGCGAGTCC
+GGTCTCGGCAAGACACACCTGCTACACGCGGCAGGCAACTATGCCCAACGGTTGTTCCCGGGAATGCGGG
+TCAAATATGTCTCCACCGAGGAATTCACCAACGACTTCATTAACTCGCTCCGCGATGACCGCAAGGTCGC
+ATTCAAACGCAGCTACCGCGACGTAGACGTGCTGTTGGTCGACGACATCCAATTCATTGAAGGCAAAGAG
+GGTATTCAAGAGGAGTTCTTCCACACCTTCAACACCTTGCACAATGCCAACAAGCAAATCGTCATCTCAT
+CTGACCGCCCACCCAAGCAGCTCGCCACCCTCGAGGACCGGCTGAGAACCCGCTTTGAGTGGGGGCTGAT
+CACTGACGTACAACCACCCGAGCTGGAGACCCGCATCGCCATCTTGCGCAAGAAAGCACAGATGGAACGG
+CTCGCGATCCCCGACGATGTCCTCGAACTCATCGCCAGCAGTATCGAACGCAATATCCGTGAACTCGAGG
+GCGCGCTGATCCGGGTCACCGCGTTCGCCTCATTGAACAAAACACCAATCGACAAAGCGCTGGCCGAGAT
+TGTGCTTCGCGATCTGATCGCCGACGCCAACACCATGCAAATCAGCGCGGCGACGATCATGGCTGCCACC
+GCCGAATACTTCGACACTACCGTCGAAGAGCTTCGCGGGCCCGGCAAGACCCGAGCACTGGCCCAGTCAC
+GACAGATTGCGATGTACCTGTGTCGTGAGCTCACCGATCTTTCGTTGCCCAAAATCGGCCAAGCGTTCGG
+CCGTGATCACACAACCGTCATGTACGCCCAACGCAAGATCCTGTCCGAGATGGCCGAGCGCCGTGAGGTC
+TTTGATCACGTCAAAGAACTCACCACTCGCATCCGTCAGCGCTCCAAGCGCTAGCACGGCGTGTTCTTCC
+GACAACGTTCTTAAAAAAACTTCTCTCTCCCAGGTCACACCAGTCACAGAGATTGGCTGTGAGTGTCGCT
+GTGCACAAACCGCGCACAGACTCATACAGTCCCGGCGGTTCCGTTCACAACCCACGCCTCATCCCCACCG
+ACCCAACACACACCCCACAGTCATCGCCACCGTCATCCACAACTCCGACCG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GCCGAGTTCCCGAAGTTTCGGCAGTTGCTACCAACCGAACACACCGCGGTGGCC
+ACCATGGACGTGGCCGAGTTGATCGAAGCGATCAAGCTGGTTGCGTTGGTAGCTGATCGGGGCGCGCAGG
+TGCGCATGGAGTTCGCTGATGGCAGCGTGCGGCTTTCTGCGGGTGCCGATGATGTTGGACGAGCCGAGGA
+AGATCTTGTTGTTGACTATGCCGGTGAACCATTGACGATTGCGTTTAACCCAACCTATCTAACGGACGGT
+TTGAGTTCGTTGCGCTCGGAGCGAGTGTCTTTCGGGTTTACGACTGCGGGTAAGCCTGCCTTGCTACGTC
+CGGTGTCCGGGGACGATCGCCCTGTGGCGGGTCTGAATGGCAACGGTCCGTTCCCGGCGGTGTCGACGGA
+CTATGTCTATCTGTTGATGCCGGTTCGGTTGCCGGGCTGAGCACTTGGCGCCCGGGTAGGTGTACGTCCG
+TCATTTGGGGCTGCGTGACTTCCGGTCCTGGGCATGTGTAGATCTGGAATTGCATCCAGGGCGGACGGTT
+TTTGTTGGGCCTAACGGTTATGGTAAGACGAATCTTATTGAGGCACTGTGGTATTCGACGACGTTAGGTT
+CGCACCGCGTTAGCGCCGATTTGCCGTTGATCCGGGTAGGTACCGATCGTGCGGTGATCTCCACGATCGT
+GGTGAACGACGGTAGAGAATGTGCCGTCGACCTCGAGATCGCCACGGGGCGAGTCAACAAAGCGCGATTG
+AATCGATCATCGGTCCGAAGTACACGTGATGTGGTCGGAGTGCTTCGAGCTGTGTTGTTTGCCCCTGAGG
+ATCTGGGGTTGGTTCGTGGGGATCCCGCTGACCGGCGGCGCTATCTGGATGATCTGGCGATCGTGCGTAG
+GCCTGCGATCGCTGCGGTACGAGCCGAATATGAGAGGGTGGTGCGCCAGCGGACGGCGTTATTGAAGTCC
+GTACCTGGAGCACGGTATCGGGGTGACCGGGGTGTGTTTGACACTCTTGAGGTATGGGACAGTCGTTTGG
+CGGAGCACGGGGCTGAACTGGTGGCCGCCCGCATCGATTTGGTCAACCAGTTGGCACCGGAAGT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GATCGGCCCAGAACAAGGCGCTCCGGTCCCGGCCTGA
+GAGCCTCGAGGACGAAGCGGATCCGTATGCCGGACGTCGGGACGCACCAGGAAGAAAGATGTCCGACGCA
+CGGCGCGGTTAGATGGGTAAAAACGAGGCCAGAAGATCGGCCCTGGCGCCCGATCACGGTACAGTGGTGT
+GCGACCCCCTGCGGCGACTCAACCGCATGCACGCAACCCCTGAGGAGAGTATTCGGATCGTGGCTGCCCA
+GAAAAAGAAGGCCCAAGACGAATACGGCGCTGCGTCTATCACCATTCTCGAAGGGCTGGAGGCCGTCCGC
+AAACGTCCCGGCATGTACATTGGCTCGACCGGTGAGCGCGGTTTACACCATCTCATTTGGGAGGTGGTCG
+ACAACGCGGTCGACGAGGCGATGGCCGGTTATGCAACCACAGTGAACGTAGTGCTGCTTGAGGATGGCGG
+TGTCGAGGTCGCCGACGACGGCCGCGGCATTCCGGTCGCCACCCACGCCTCCGGCATACCGACCGTCGAC
+GTGGTGATGACACAACTACATGCCGGCGGCAAGTTCGACTCGGACGCGTATGCGATATCTGGTGGTCTGC
+ACGGCGTCGGCGTGTCGGTGGTTAACGCGCTATCCACCCGGCTCGAAGTCGAGATCAAGCGCGACGGGTA
+CGAGTGGTCTCAGGTTTATGAGAAGTCGGAACCCCTGGGCCTCAAGCAAGGGGCGCCGACCAAGAAGACG
+GGGTCAACGGTACGGTTCTGGGCCGACCCCGCTGTTTTCGAAACCACGGAATACGACTTCGAAACCGTCG
+CCCGCCGGCTGCAAGAGATGGCGTTCCTCAACAAGGGGCTGACCATCAACCTGACCGACGAGAGGGTGAC
+CCAAGACGAGGTCGTCGACGAAGTGGTCAGCGACGTCGCCGAGGCGCCGAAGTCGGCAAGTGAACGCGCA
+GCCGAATCCACTGCACCGCACAAAGTTAAGAGCCGCACCTTTCACTATCCGGGTGGCCTGGTGGACTTCG
+TGAAACACATCAACCGCACCAAGAACGCGATTCATAGCAGCATCGTGGACTTTTCCGGCAAGGGCACCGG
+GCACGAGGTGGAGATCGCGATGCAATGGAACGCCGGGTATTCGGAGTCGGTGCACACCTTCGCCAACACC
+ATCAACACCCACGAGGGCGGCACCCACGAAGAGGGCTTCCGCAGCGCGCTGACGTCGGTGGTGAACAAGT
+ACGCCAAGGACCGCAAGCTACTGAAGGACAAGGACCCCAACCTCACCGGTGACGATATCCGGGAAGGCCT
+GGCCGCTGTGATCTCGGTGAAGGTCAGCGAACCGCAGTTCGAGGGCCAGACCAAGACCAAGTTGGGCAAC
+ACCGAGGTCAAATCGTTTGTGCAGAAGGTCTGTAATGAACAGCTGACCCACTGGTTTGAAGCCAACCCCA
+CCGACTCGAAAGTCGTTGTGAACAAGGCTGTGTCCTCGGCGCAAGCCCGTATCGCGGCACGTAAGGCACG
+AGAGTTGGTGCGGCGTAAGAGCGCCACCGACATCGGTGGATTGCCCGGCAAGCTGGCCGATTGCCGTTCC
+ACGGATCCGCGCAAGTCCGAACTGTATGTCGTAGAAGGTGACTCGGCCGGCGGTTCTGCAAAAAGCGGTC
+GCGATTCGATGTTCCAGGCGATACTTCCGCTGCGCGGCAAGATCATCAATGTGGAGAAAGCGCGCATCGA
+CCGGGTGCTAAAGAACACCGAAGTTCAGGCGATCATCACGGCGCTGGGCACCGGGATCCACGACGAGTTC
+GATATCGGCAAGCTGCGCTACCACAAGATCGTGCTGATGGCCGACGCCGATGTTGACGGCCAACATATTT
+CCACGCTGTTGTTGACGTTGTTGTTCCGGTTCATGCGGCCGCTCATCGAGAACGGGCATGTGTTTTTGGC
+ACAACCGCCGCTGTACAAACTCAAGTGGCAGCGCAGTGACCCGGAATTCGCATACTCCGACCGCGAGCGC
Binary file test-data/adapters.fa.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bduk_output_dump1.fasta	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,100 @@
+>116
+GAGATGGAACTGTAACTGGAGTTCCTT
+>7
+TGCCTAAGTGACTAGAGTTCAGACGTG
+>28
+TGAACTCCAGTCAAATTCCTTTATCTC
+>141
+GCATACGAGATGTATAGGTGACTGGAG
+>3
+GTTCAGCAGGAATACCGAGACCGATCT
+>126
+GGTAGCATCTCGTATGCCGTCTTCTGC
+>123
+GCCAAGGAACTCCAGTCACGTTTCGAT
+>126
+ATACGAGATGCTAACGTGACTGGAGTT
+>18
+CCGTATCTCGTATACCGTCTTCTGCTT
+>26
+TCTGAACTCCAGTAACGAGTGGATATC
+>17
+GAAGACGGCATACAAGATTGTTGACTG
+>22
+TGAACTCCAGTCAAGTGAAACGATCTC
+>50
+ACGCTACGCTATCACGTATGCCGTCTT
+>103
+TCGGGTGCCAAGGAACTCCAGTCACAT
+>141
+ATACATCTCGTATACCGTCTTCTGCTT
+>113
+TCGGGTGCCAAGGAACTCCAGTCACGG
+>84
+GAGATTACTACGCATCTCGTGGGCTCG
+>122
+CGTGGCCATCTCGAATGCCGTCTTCTG
+>139
+TCCAGTCACCGGAATATCTCGTATGCC
+>42
+CAGAAGACGGCATACGAGATTCGCCTT
+>107
+TGTGTGACTGGAGATCCTTGGCACCCG
+>140
+CATACGAGATAGCAAGGTGACTGGAGT
+>6
+GGTGACTGGAGTTAAGACGTGTGCTCT
+>30
+TCTCTTATACACAACTCCGAGCCCACG
+>122
+CAGTCACGTGGCCATCTCGTATGCCGT
+>19
+GTCACATGTCAGAATCTCGTATGCCGT
+>41
+GCGTGTAGATCTCAGTGGTCGCCGTAT
+>1
+GTGACTGGAGTTCAGACGTGTGCTCTT
+>15
+GTCTGAACTCCAGACACGGCTACATCT
+>4
+TCCGATCTCAAGCAGAAGACGGCATAC
+>119
+GAAGACGGCATACAAGATCTCTACGTG
+>129
+GTCACATTCCTATATCGTATGCCGTCT
+>107
+GATCACTGTGTGAATGGAGTTCCTTGG
+>9
+ATACGAGATCACTATGTGACTGGAGTT
+>24
+CTGAACTCCAGTCACGTTTCGGAATCT
+>116
+TGGAACTGTGACTAGAGTTCCTTGGCA
+>13
+GAAGACGGCATACAAGATCTGATCGTG
+>30
+TCTTATACACATCACCGAGCCCACGAG
+>49
+CAGAGAGGATCTCATATGCCGTCTTCT
+>133
+TCGTGGTGACTGGAGTTCCTTGGCACC
+>8
+CAGTCACTGACCAATCTCGTATGCCGT
+>33
+TCTAGTGTAGATCACGGTGGTCGCCGT
+>21
+TGCGGACGTGACTAGAGTTCAGACGTG
+>37
+GACGACTCCTTACATGTAGATCTCGGT
+>124
+GTACGGTGACTGGAGTTCCTTGGCACC
+>69
+TACACTTATGCGAACGTCGGCAGCGTC
+>149
+GCATACGAGATCTACGAGTGACTGGAG
+>124
+GAGATCGTACGGTAACTGGAGTTCCTT
+>105
+GCCAAGGAACTCCAGTCACTTAGGCAT
+>150
+CAGTCACTCGGCAATCTCGTATGCCGT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bduk_output_quhist1.tabular	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,101 @@
+#BaseNum	Read1_linear	Read1_log	Read2_linear	Read2_log
+1	16.400	4.332	32.940	32.694
+2	24.580	19.293	32.680	30.545
+3	29.880	28.913	32.720	32.218
+4	35.400	35.023	35.740	28.139
+5	35.610	35.076	35.980	34.688
+6	36.070	35.819	36.130	35.232
+7	36.030	35.134	35.750	28.304
+8	36.210	35.891	35.760	30.427
+9	37.770	36.724	37.550	36.174
+10	37.770	36.627	37.890	36.829
+11	38.130	34.528	37.720	35.825
+12	38.120	37.610	37.930	36.724
+13	37.600	29.816	37.860	33.975
+14	39.600	38.822	39.490	29.436
+15	39.240	37.118	39.430	34.527
+16	39.370	37.815	39.670	29.527
+17	39.230	35.062	39.310	34.199
+18	39.410	38.456	39.700	38.264
+19	39.470	38.621	38.680	28.791
+20	39.170	36.390	39.340	38.126
+21	39.340	38.280	39.320	37.141
+22	38.870	32.580	38.480	25.015
+23	39.370	37.125	38.850	32.436
+24	38.940	36.347	39.200	37.110
+25	38.560	36.248	39.000	28.586
+26	38.810	33.655	38.460	29.005
+27	38.930	35.395	38.560	25.539
+28	39.090	37.259	38.190	23.947
+29	38.610	25.879	38.730	30.749
+30	38.540	33.271	38.520	32.796
+31	38.840	33.517	38.040	30.447
+32	38.730	36.053	38.530	27.397
+33	38.340	34.385	38.880	35.605
+34	38.470	28.217	38.430	32.167
+35	37.350	30.035	38.560	26.684
+36	37.380	20.434	38.900	32.524
+37	37.810	32.591	38.450	34.632
+38	38.150	33.133	38.750	35.749
+39	37.660	31.924	38.420	26.003
+40	38.040	34.153	38.730	36.080
+41	37.970	35.596	39.020	37.708
+42	37.240	31.069	39.380	33.973
+43	37.740	29.175	38.840	35.607
+44	38.070	34.040	38.400	23.939
+45	37.690	30.131	38.160	26.507
+46	37.160	26.236	37.990	32.407
+47	37.820	35.168	37.330	29.388
+48	37.920	35.623	37.850	31.413
+49	38.150	34.322	37.830	27.255
+50	38.250	34.017	38.260	36.442
+51	38.060	36.455	36.270	30.125
+52	37.240	34.726	37.000	33.291
+53	37.700	32.804	37.210	34.667
+54	37.740	33.699	37.520	34.736
+55	37.780	33.713	37.880	35.604
+56	37.470	31.063	37.880	35.326
+57	36.680	26.593	36.810	22.646
+58	36.390	26.714	37.140	31.327
+59	35.960	29.732	36.900	20.404
+60	35.500	27.738	36.440	21.355
+61	35.800	28.761	36.200	20.579
+62	34.880	22.760	36.570	21.483
+63	35.560	30.716	36.180	21.372
+64	35.460	30.521	35.970	20.108
+65	35.090	25.249	35.450	20.127
+66	35.240	31.736	35.330	20.499
+67	35.230	25.003	35.410	21.618
+68	34.870	25.901	35.400	21.693
+69	34.560	24.095	35.200	21.684
+70	34.670	29.988	34.730	21.372
+71	35.010	32.741	34.710	21.582
+72	33.750	21.148	34.060	18.014
+73	34.130	29.634	34.040	18.342
+74	34.080	21.493	33.840	17.025
+75	33.590	20.367	33.380	16.366
+76	31.930	18.529	33.300	17.088
+77	32.400	18.486	32.360	15.307
+78	32.840	18.708	32.170	15.246
+79	33.190	18.732	32.130	15.504
+80	32.680	17.826	32.770	15.850
+81	32.690	17.578	32.640	15.552
+82	32.510	16.664	32.800	15.822
+83	31.640	15.134	32.350	15.209
+84	31.220	15.026	32.320	15.547
+85	31.270	14.413	32.170	15.387
+86	31.310	14.436	32.520	15.576
+87	32.130	14.923	32.070	15.354
+88	31.610	14.417	31.780	15.361
+89	31.240	14.665	32.290	15.854
+90	31.130	14.606	31.730	15.508
+91	31.350	14.867	32.120	14.926
+92	31.270	14.282	32.040	14.910
+93	31.790	14.879	31.770	14.676
+94	31.010	13.468	31.380	14.768
+95	30.280	12.737	31.220	14.847
+96	30.310	12.852	31.050	14.129
+97	30.390	12.411	31.160	13.935
+98	30.150	12.394	30.960	13.893
+99	30.300	11.964	30.610	13.166
+100	29.860	11.945	30.460	12.397
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bduk_outputu1.fastqsanger	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,102 @@
+@XXXXXXXXXX:7:1101:1582:1835#/1
+NGCTTCAGTTGGTACAGGTGTGTCACCCGTAGTTTGTAGGCTTGGAAGCCTGTAAGCTGTAGGGAACGTGGCAAGAACCAGATCTGGCCTTCCATATCTC
++
+!1=DDDDDAFFDDEFFG@AGHBCFHIFIEGIC?DBFGIFF?FGDFIBFFII8BCFIEEF.@FFIIEFFCE=??B@>A@@@BBBAD>A:?BBBBB@>>>B:
+@XXXXXXXXXX:7:1101:1610:1859#/1
+NTTATGTGTTACGTGAATCTCCTGAAGACAGCAGAAACTAGGTTGGTGAATTCTTATCCATTCTGCCATTCTGTATCTTTTAAGTGGAGCATTTAGGCTA
++
+!1=DDFDFHHHHHHJJIJJJJJJJJJJJIJIIJJJIJIJJJJIJJJIIJJJIJJJIIJJJJIIJJJJGIJJJIHJHHHHHHHFFFFFFDDDEEDEDDCDD
+@XXXXXXXXXX:7:1101:1743:1871#/1
+NCGGGATGGAGGCAGGGCAAGCGGATGCAGGCCCAGCCCTGCCCTTACAGGTAGCTGGAAGTGACGAAGGAGTGGGGCCCCCGGACTCTGCTCAGGTGGA
++
+!1=DDDFFHHHHHI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DDCDCCCCBB?B@>CACAB
+@XXXXXXXXXX:7:1101:1688:1946#/1
+NCCGCCTTCTTTCTCTACTTCGTGACCTTTTGTGGTCCCGAGACCTGCTGCATCTTCTGTCTGATGTTCGGCTTGAGTGTCTACTTCCTGAACGACTTCT
++
+!1:BDAAD<DDDDIEE>DBEEFEEFIIIIIEADEC?C>DD<?D@?@BDDDEEDIEIEDE=CEE>CE?CCC6=?###########################
+@XXXXXXXXXX:7:1101:2767:100225#/1
+CGCCTGGTGTCAATGCGCACATCTGGAGTTCCCATCTCCTTCATGGCAAATTTCCGAATCTCTTTGAGTGCCCGAGGTGCACGCTTCTTGAAGCCCACTC
++
+@@@FDFFFGHHHFJJIJIIIIJIJIJIGHBD@DFGGGJIFIJJJJIIIIIGHIIGIJFIJJIJIG@EECCHEEDCAD>ACCCDDDDDACCAC@CDDDDDD
+@XXXXXXXXXX:7:1101:1536:1959#/1
+NGATACTGTTGGGTCAGGACCAGGGCCTGCACCACCGAAATTCTGTCTTTTACAAACTGGACCAAGCGGTTGAGAATACAGGGGCCGAAGAGTAGGATTA
++
+!4:BB?DDHHDHAE?ECB@=GGI=<;CG@B;<D@DG:@FFABFBG<=FFGFHIIGGH@>==AEC?DECA<;8;3<AC>CCCC8&-5>@@59?4::>>>CC
+@XXXXXXXXXX:7:1101:2797:100234#/1
+GTGCTGGTCTCTCTCCACGATCTCTTACGTGCTAGCAGGGTGAACAAGGACGCCTCGCTGTCATTGCACTCACGCCACAGGAGCCTGGCACATTTCCGCT
++
++:?BDD8DFFFB8ED;@GF8A3?FH?B<)11?@FG<E<;@F629?BF@?2=A;4C6BE7-,7@;@;@A>;@CBB?=88?5(95983?(8<><AA######
+@XXXXXXXXXX:7:1101:1552:1976#/1
+NTGATGAGTTTGCTAATACAATGCCAGTCAGGCCACCTACGGTGAAAAGAAAGATGAATCCTAGGGCTCAGAGCACTGCAGCAGATCATTTCATATTGCT
++
+!1=DDFFFFHFHGJJJJIJJJJJJJJJJJIIJFGHGIIIJIJGHIEIIJJJHIGIIJGJIIJJJBHIIJHHHHHDEFCECEEEEDDDDDEFEEEEEEEDD
+@XXXXXXXXXX:7:1101:1748:1978#/1
+NCGCTGAGCAGGGCAGGCAGTGGTGGAGGCAGCCCCCCAAGACCCCATCTCTATCACAGTGAGAGCATCTGAACTCCAAAGCCACGACAGAACAGCTCCC
++
+!1=DFFFFHHHHHIJJJJIJIJJFHJIIJIJJGJJIIJAHGGGHHHHFFFFFFEEDECE@CDDCDDDCDDDACCCCDDDDCDDDDDDDDBDDCCC@ACDD
+@XXXXXXXXXX:7:1101:2779:100239#/1
+TGGGTGCTCTCCTTGGTCAGCTGCTGCTCGAACAGAGCACTTCTAGATACAGAGTTGGACCCAGACACAGCAGGGGTGGCCATGGCGGCTGGGAAAGACC
++
+@@@?DD?DFHHFFHIEEHIBGI9CFHFGCB::CGIGHG@BF<FHFHD@DDDBBDBFGH<C;C;==;C;;?H;;?<>88=@?C##################
+@XXXXXXXXXX:7:1101:1593:1980#/1
+NGGCACCAGAAGCATGAGCATAGGCAGAGCCATTTCCACCATGCTGACGGCAGGCAAGAAGAAGACAAAAATGAACCCCTTTCATGCTTGTTTAGAAATG
++
+!1=DFFFFHHHHGJJJJJJJJIJJIJJJIGJIIJJJJGIIIJJJJJIIJJJJJJIIJHHHHHFFFFFEEDDDDDDDDDDDDDDDEDDDEDDDDDDDDDDD
+@XXXXXXXXXX:7:1101:2946:100242#/1
+TGGGGATGTTGTTAAAAAAAATACAGGCTCCCCCACAACTGGGGTGCCTGGGGGGAACTTGGTCTGCTTCAGCCCAAGAGGAATCAAAAGATCAAAAGCA
++
+@@@FFDDDHHHHHJIIGIJIGEGIIJJIIJJGJJEECDEA=FHI-=?B?CEDDDD5583:AC3::94:CAACCDBABD8?BA?CCDDDDD@CCACCDCBD
+@XXXXXXXXXX:7:1101:1987:1781#/1
+NTTAGCAGGTCCTCGTAGCGTTTCCGCAACTCTCGGAATCTGGAGTCTTCGGAGTGCAACTCTGAGGGTCCCGGGAAACTTGCGCGGCTCGCCTCGGCCA
++
+!1=DDFFFHHHHHJJJJJIJJJJIJJJJJJJJJJJJJJJGJJJJIIHIJJJIJHHGHFFFFFFCEEDDDDDDDDDBDDDDDDDDDDDDDDBBDDD9B?B<
+@XXXXXXXXXX:7:1101:3046:100006#/1
+CTGTACAGCATGGATGTGGACAGGGAAAACAGCAAGTGCACACAGTGGGACAGGCCACAGGACAGGCTGGGAGTGAATAAAGAGTTCACACTGCTTCCCT
++
+CCCFFFFFHHHHHJJJIJJJJJJJJJJJJJJJIJJJFHIJJIIJIGGHIJJJJJJIJJIIJJJHHHHFFFD=C;?CDCDDD@>?>@CACDACCDDCDDDD
+@XXXXXXXXXX:7:1101:1900:1788#/1
+NCCCGCTGCCCACGCCACTGTCCCGGCGCTGCCCTGGGCGCGGAATGCGCGTTAGGCAATCCCCGGTCTGCGCGTCCCACACGCAGATGTGGCCTGCCAG
++
+!1=DFFFFGHHGHJJJIJJIJJJJGIIJJJIIJJIJJJIHFFDDDDDDDDDBDDDDDDDDDDDDBD@BDDDB>BB<BBDDDDDDDDDDDECDDBDDDDC@
+@XXXXXXXXXX:7:1101:3214:100027#/1
+GGCTGAGGTACTGAATGAGGAACAGCAGGAGGTAACGTCTGAGGGTGCGGCTGGGGAACGGTTTGCACAGGGGTGGCTGTAGGAGCAGGAGGTGAAACAC
++
+@@@FFDFF?DFHHIIIIIIGIIGHGIIGIIII?FHHGDFGIGGIC6?FHIIFIHHH59;=B559=33:55<(830588<((>:(98<CB02&28>CA>98
+@XXXXXXXXXX:7:1101:1848:1879#/1
+NCTTCTTCTTCCTCATGTTTTTTGATCAACTGCTCCACTTCTTTTTGTTTGAGAACTCTGATTACTGTCTTTCCATTCTCTCTTGTTAGTGTTGCAATTT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bduk_outputu2.fastqsanger	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,102 @@
+@XXXXXXXXXX:7:1101:1582:1835#/2
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1<
+@XXXXXXXXXX:7:1101:1536:1959#/2
+GAGACAAAAATTGTTTGAATCAGGACAAGGGAGGTTTGAGGGACTGTTTAACAGGTCCCCATGGTTCACGACCCTGATATCCACCATTATGGGCCCTCTG
++
+@8@1:?:=DD>D<CE+A:+C?+AF++++281)?D):?HD=FG6((?88=CFFCHG7=@HH@9?3.)7772?3,9;A(((5>;5>BBAA:>CCD?8@BD9A
+@XXXXXXXXXX:7:1101:2797:100234#/2
+GGAAACGCTGGAGAAGACAGTGTTGCTAGTCTGTTCCTGTTCGTGAGAATGCTTTGAATGGAGGCTCACTGTGCTGCGGCGGCTGCGGCCGTAGCGGGCG
++
+B1=+:A+0A::A2+2A2A3A<+2<?9<*119:9:1CC:DDFF<)800//9/>8E=<)/8@@@6C(6==737==>>@########################
+@XXXXXXXXXX:7:1101:1552:1976#/2
+TGTGAGCACACCATATATTTACAGTAGGAATAGACGTAGACACACGAGCATATTTCACCTCCGCTACCATAATCATCGCTATCCCCACCGGCGTCAAAGT
++
+CCCFFFFFHHHHHIIGIGGIHJIGHHJIECGGGHJIJJJJJJJJJGHIJJGGHGIIEHIIJDIJFHFFFFF@CCCEECDDDDDCDDDB@BDDBBBDDCD>
+@XXXXXXXXXX:7:1101:1748:1978#/2
+CAAGGAGCTGTTCTGTCGTGGCTTTGGAATTCAGATGCTCTCACTGTGATAGAGATGGGGTCTTGGGGGGCTGGGAGCTGTTCTGTCGTGGCTTTGGAGT
++
+B@@FFFFFHHHHHJJIIJHIJIJJJJJIIJJIJJJJJIJJJJIJJJGHFGGHHIIIJIJJ@GIIJJIHFDDDDDDABBDCCDDEDDDB?BDDDDCCDCDA
+@XXXXXXXXXX:7:1101:2779:100239#/2
+GCTGTGGTTACCTGTCCCCTGCCCCTGGCCTCCAGCCAGCTGCCAGTGGCCCCTCAGCTGCCTGTGGTGAGGCAATACTTAGCTAGGTTCTTAGACGGCC
++
+?<?BBDDEFADA?ECCFFGEHDIDB;;FBG>GDHFGGGAFEHE?F@8?>F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TGCCTGGCCAGCGACGGCATGCTGCTGGTGAGC
++
+CCCFFFFFGHHHHJJJJJJHHJJIFHIJJHHIIIJJJIIIJJJJJHFDDD@@DDDDCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDCDD<?C@C
+@XXXXXXXXXX:7:1101:3214:100027#/2
+CACAACAACTGCTACTTCAGTTGCGCAGACAGTATCAACACCCACAACACAAGATCAGACCCCAAGTTCTGCTGTTTCAGTTGCCACGCCTACAGTTAGT
++
+@CCFFFFFGFHHHIIJJJIIHIIIIIJ<GIIG?DHIJJGIIJBHJJJJJIGCGGHHJJHHHHFDEF;ACEEEDDDDDCEDDDDCDCDDDDDDDCCDDDD>
+@XXXXXXXXXX:7:1101:1848:1879#/2
+GGAGAAATGACCTTGAAGTCAGCACTTGCTTTAGCTATCAAAGTACTAAATAAGACCATGGATGTTAGTAAACTCTCTGCTGAAAAAGTGGAAATTGCAA
Binary file test-data/cv_input.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cv_output.gff	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,18 @@
+##gff-version
+#BBMapVersion
+#ploidy	2
+#rarity	1.00000
+#minAlleleFraction	0.1000
+#reads	2207
+#pairedReads	0
+#properlyPairedReads	0
+#readLengthAvg
+#properPairRate	0.0000
+#totalQualityAvg
+#mapqAvg
+#reference
+#seqid	source	type	start	end	score	strand	phase	attributes
+NC_002945.4	.	sequence_variant_obs	976327	976327
+NC_002945.4	.	sequence_variant_obs	1501932	1501932
+NC_002945.4	.	sequence_variant_obs	3380579	3380579
+NC_002945.4	.	sequence_variant_obs	3646293	3646293
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cv_output.txt	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,18 @@
+#fileformat
+#BBMapVersion
+#ploidy	2
+#rarity	1.00000
+#minAlleleFraction	0.1000
+#reads	2207
+#pairedReads	0
+#properlyPairedReads	0
+#readLengthAvg
+#properPairRate
+#totalQualityAvg
+#mapqAvg
+#reference
+#scaf	start	stop	type	call	r1p	r1m	r2p	r2m	paired	lengthSum	mapq	mapqMax	baseq	baseqMax	edist	edistMax	id	idMax	cov	minusCov	nearbyVarCount	flagged	contigEndDist	phredScore	readCount	alleleFraction	revisedAF	strandRatio	baseqAvg	mapqAvg	edistAvg	identityAvg	edistScore	identityScore	qualityScore	pairedScore	biasScore	coverageScore	homopolymerScore	score
+0	976326	976327	SUB	T
+0	1501931	1501932	SUB	C
+0	3380578	3380579	SUB	G
+0	3646292	3646293	SUB	A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cv_output.vcf	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,60 @@
+##fileformat=VCFv4.2
+##BBMapVersion=
+##ploidy=2
+##rarity=1.00000
+##minallelefraction=0.10000
+##reads=2207
+##pairedReads=0
+##properlyPairedReads=0
+##readLengthAvg=
+##properPairRate=0.00000
+##totalQualityAvg=
+##mapqAvg=43.348
+##reference=
+##contig=<ID=NC_002945.4,length=7000>
+##FILTER=<ID=FAIL,Description="Fail">
+##FILTER=<ID=PASS,Description="Pass">
+##INFO=<ID=SN,Number=1,Type=Integer,Description="Scaffold Number">
+##INFO=<ID=STA,Number=1,Type=Integer,Description="Start">
+##INFO=<ID=STO,Number=1,Type=Integer,Description="Stop">
+##INFO=<ID=TYP,Number=1,Type=String,Description="Type">
+##INFO=<ID=R1P,Number=1,Type=Integer,Description="Read1 Plus Count">
+##INFO=<ID=R1M,Number=1,Type=Integer,Description="Read1 Minus Count">
+##INFO=<ID=R2P,Number=1,Type=Integer,Description="Read2 Plus Count">
+##INFO=<ID=R2M,Number=1,Type=Integer,Description="Read2 Minus Count">
+##INFO=<ID=AD,Number=1,Type=Integer,Description="Allele Depth">
+##INFO=<ID=DP,Number=1,Type=Integer,Description="Total Depth">
+##INFO=<ID=MCOV,Number=1,Type=Integer,Description="Minus Coverage">
+##INFO=<ID=PPC,Number=1,Type=Integer,Description="Paired Count">
+##INFO=<ID=AF,Number=1,Type=Float,Description="Allele Fraction">
+##INFO=<ID=RAF,Number=1,Type=Float,Description="Revised Allele Fraction">
+##INFO=<ID=LS,Number=1,Type=Integer,Description="Length Sum">
+##INFO=<ID=MQS,Number=1,Type=Integer,Description="MAPQ Sum">
+##INFO=<ID=MQM,Number=1,Type=Integer,Description="MAPQ Max">
+##INFO=<ID=BQS,Number=1,Type=Integer,Description="Base Quality Sum">
+##INFO=<ID=BQM,Number=1,Type=Integer,Description="Base Quality Max">
+##INFO=<ID=EDS,Number=1,Type=Integer,Description="End Distance Sum">
+##INFO=<ID=EDM,Number=1,Type=Integer,Description="End Distance Max">
+##INFO=<ID=IDS,Number=1,Type=Integer,Description="Identity Sum">
+##INFO=<ID=IDM,Number=1,Type=Integer,Description="Identity Max">
+##INFO=<ID=NVC,Number=1,Type=Integer,Description="Nearby Variation Count">
+##INFO=<ID=FLG,Number=1,Type=Integer,Description="Flagged">
+##INFO=<ID=CED,Number=1,Type=Integer,Description="Contig End Distance">
+##INFO=<ID=HMP,Number=1,Type=Integer,Description="Homopolymer Count">
+##INFO=<ID=SB,Number=1,Type=Float,Description="Strand Bias">
+##INFO=<ID=DP4,Number=4,Type=Integer,Description="Ref+, Ref-, Alt+, Alt-">
+##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
+##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth">
+##FORMAT=<ID=AD,Number=1,Type=Integer,Description="Allele Depth">
+##FORMAT=<ID=AF,Number=1,Type=Float,Description="Allele Fraction">
+##FORMAT=<ID=RAF,Number=1,Type=Float,Description="Revised Allele Fraction">
+##FORMAT=<ID=NVC,Number=1,Type=Integer,Description="Nearby Variation Count">
+##FORMAT=<ID=FLG,Number=1,Type=Integer,Description="Flagged">
+##FORMAT=<ID=SB,Number=1,Type=Float,Description="Strand Bias">
+##FORMAT=<ID=SC,Number=1,Type=Float,Description="Score">
+##FORMAT=<ID=PF,Number=1,Type=String,Description="Pass Filter">
+#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	
+NC_002945.4	976327	.	N	T	22.21	PASS	SN=0;STA=976326;STO=976327;TYP=SUB;R1P=2;R1M=0;R2P=0;R2M=0;AD=2;DP=2;MCOV=-1;PPC=0;AF=1.0000;RAF=1.0000;LS=292;MQS=77;MQM=40;BQS=48;BQM=24;EDS=111;EDM=65;IDS=1930;IDM=972;NVC=0;FLG=0;CED=0;HMP=0;SB=0.9980	GT:DP:AD:AF:RAF:NVC:FLG:SB:SC:PF	1/1:2:2:1.0000:1.0000:0:0:0.9980:22.21:PASS
+NC_002945.4	1501932	.	N	C	27.20	PASS	SN=0;STA=1501931;STO=1501932;TYP=SUB;R1P=0;R1M=2;R2P=0;R2M=0;AD=2;DP=2;MCOV=-1;PPC=0;AF=1.0000;RAF=1.0000;LS=292;MQS=88;MQM=44;BQS=64;BQM=39;EDS=74;EDM=38;IDS=1986;IDM=993;NVC=0;FLG=0;CED=0;HMP=0;SB=0.9980	GT:DP:AD:AF:RAF:NVC:FLG:SB:SC:PF	1/1:2:2:1.0000:1.0000:0:0:0.9980:27.20:PASS
+NC_002945.4	3380579	.	N	G	27.85	PASS	SN=0;STA=3380578;STO=3380579;TYP=SUB;R1P=0;R1M=2;R2P=0;R2M=0;AD=2;DP=2;MCOV=-1;PPC=0;AF=1.0000;RAF=1.0000;LS=289;MQS=87;MQM=44;BQS=75;BQM=38;EDS=105;EDM=63;IDS=1986;IDM=993;NVC=0;FLG=0;CED=0;HMP=0;SB=0.9980	GT:DP:AD:AF:RAF:NVC:FLG:SB:SC:PF	1/1:2:2:1.0000:1.0000:0:0:0.9980:27.85:PASS
+NC_002945.4	3646293	.	N	A	23.34	PASS	SN=0;STA=3646292;STO=3646293;TYP=SUB;R1P=1;R1M=1;R2P=0;R2M=0;AD=2;DP=2;MCOV=-1;PPC=0;AF=1.0000;RAF=1.0000;LS=291;MQS=86;MQM=44;BQS=76;BQM=38;EDS=44;EDM=31;IDS=1986;IDM=993;NVC=0;FLG=0;CED=0;HMP=0;SB=1.0000	GT:DP:AD:AF:RAF:NVC:FLG:SB:SC:PF	1/1:2:2:1.0000:1.0000:0:0:1.0000:23.34:PASS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cv_qualityhist_output.tabular	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,46 @@
+#BaseQualityHist
+#Vars
+#Mean
+#Median
+#Mode
+#Quality	AvgCount	MaxCount
+0	0	0
+1	0	0
+2	0	0
+3	0	0
+4	0	0
+5	0	0
+6	0	0
+7	0	0
+8	0	0
+9	0	0
+10	0	0
+11	0	0
+12	0	0
+13	0	0
+14	0	0
+15	0	0
+16	0	0
+17	0	0
+18	0	0
+19	0	0
+20	0	0
+21	0	0
+22	0	0
+23	0	0
+24	1	1
+25	0	0
+26	0	0
+27	0	0
+28	0	0
+29	0	0
+30	0	0
+31	0	0
+32	1	0
+33	0	0
+34	0	0
+35	0	0
+36	0	0
+37	1	0
+38	1	2
+39	0	1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cv_scorehist_output.tabular	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,34 @@
+#ScoreHist
+#Vars
+#Mean
+#Median
+#Mode
+#Quality	Count
+0	0
+1	0
+2	0
+3	0
+4	0
+5	0
+6	0
+7	0
+8	0
+9	0
+10	0
+11	0
+12	0
+13	0
+14	0
+15	0
+16	0
+17	0
+18	0
+19	0
+20	0
+21	0
+22	1
+23	1
+24	0
+25	0
+26	0
+27	2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cv_zygosityhist_output.tabular	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,8 @@
+#ZygoHist
+#Vars
+#Mean
+#HomozygousFraction
+#Zygosity	Count
+0	0
+1	0
+2	4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fasta_indexes.loc	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,1 @@
+89	89	Mycobacterium_AF2122	${__HERE__}/NC_002945v4.fasta
Binary file test-data/output1.bam has changed
Binary file test-data/output2.bam has changed
Binary file test-data/output3.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/fasta_indexes.loc.sample	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,29 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of Samtools indexed sequences data files.  You will need
+#to create these data files and then create a fasta_indexes.loc file
+#similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The fasta_indexes.loc
+#file has this format (white space characters are TAB characters):
+#
+# <unique_build_id>	<dbkey>	<display_name>	<file_base_path>
+#
+#So, for example, if you had hg19 Canonical indexed stored in
+#
+# /depot/data2/galaxy/hg19/sam/,
+#
+#then the fasta_indexes.loc entry would look like this:
+#
+#hg19canon	hg19	Human (Homo sapiens): hg19 Canonical	/depot/data2/galaxy/hg19/sam/hg19canon.fa
+#
+#and your /depot/data2/galaxy/hg19/sam/ directory
+#would contain hg19canon.fa and hg19canon.fa.fai files.
+#
+#Your fasta_indexes.loc file should include an entry per line for
+#each index set you have stored.  The file in the path does actually
+#exist, but it should never be directly used. Instead, the name serves
+#as a prefix for the index file.  For example:
+#
+#hg18canon	hg18	Human (Homo sapiens): hg18 Canonical	/depot/data2/galaxy/hg18/sam/hg18canon.fa
+#hg18full	hg18	Human (Homo sapiens): hg18 Full	/depot/data2/galaxy/hg18/sam/hg18full.fa
+#hg19canon	hg19	Human (Homo sapiens): hg19 Canonical	/depot/data2/galaxy/hg19/sam/hg19canon.fa
+#hg19full	hg19	Human (Homo sapiens): hg19 Full	/depot/data2/galaxy/hg19/sam/hg19full.fa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,8 @@
+<!-- Use the file tool_data_table_conf.xml.oldlocstyle if you don't want to update your loc files as changed in revision 4550:535d276c92bc-->
+<tables>
+    <!-- Location of SAMTools indexes for FASTA files -->
+    <table name="fasta_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/fasta_indexes.loc" />
+    </table>
+</tables>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test	Thu Nov 11 16:38:32 2021 +0000
@@ -0,0 +1,6 @@
+<tables>
+    <table name="fasta_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="${__HERE__}/test-data/fasta_indexes.loc" />
+    </table>
+</tables>