changeset 0:31216d510164 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/lofreq commit 9efcb813ab17041c7f5aad834dfff45bd7046c60"
author iuc
date Tue, 17 Dec 2019 17:27:17 -0500
parents
children 03627f24605f
files lofreq_call.xml macros.xml test-data/alnqual-out1.bam test-data/alnqual-out2.bam test-data/alnqual-out3.bam test-data/alnqual-out4.bam test-data/alnqual-out5.bam test-data/call-out1.vcf test-data/call-out2.vcf test-data/indelqual-out1.bam test-data/indelqual-out2.bam test-data/indelqual-out3.bam test-data/lofreq-in1.bam test-data/pBR322.fa test-data/viterbi-out1.bam test-data/viterbi-out2.bam tool-data/fasta_indexes.loc.sample tool_data_table_conf.xml.sample
diffstat 18 files changed, 609 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lofreq_call.xml	Tue Dec 17 17:27:17 2019 -0500
@@ -0,0 +1,365 @@
+<tool id="lofreq_call" name="Call variants" version="@WRAPPER_VERSION@0">
+    <description>with LoFreq</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        ## prepare reference genome and mapped reads input
+        @PREPARE_REF@
+        ln -s '$reads' reads.bam &&
+        ln -s -f '${reads.metadata.bam_index}' reads.bam.bai &&
+
+        ## call variants with lofreq
+
+        ## make lofreq stick to tool contract by
+        ## generating tmp output inside job working dir
+        mkdir pp-tmp &&
+        export TMPDIR=pp-tmp &&
+
+        lofreq call-parallel --pp-threads \${GALAXY_SLOTS:-1} --verbose
+
+        --ref '$reference_fasta_fn' --out variants.vcf $variant_types
+
+        #if str($regions.restrict_to_region) == 'regions_from_file':
+            --bed '$regions.bed'
+        #end if
+
+        #if str($call_control.set_call_options) == 'yes':
+            --min-cov $call_control.coverage.min_cov
+            --max-depth $call_control.coverage.max_depth
+            $call_control.pe.use_orphan
+            --min-bq $call_control.bc_quals.min_bq
+            --min-alt-bq $call_control.bc_quals.min_alt_bq
+            --def-alt-bq $call_control.bc_quals.def_alt_bq
+            ${call_control.align_quals.alnqual.use_alnqual}
+            #if str($call_control.align_quals.alnqual.use_alnqual) != '-A -B':
+                ${call_control.align_quals.alnqual.alnqual_choice.alnquals_to_use}
+                ${call_control.align_quals.alnqual.alnqual_choice.extended_baq}
+            #end if
+            --min-mq $call_control.map_quals.min_mq
+            --max-mq $call_control.map_quals.use_mq.max_mq
+            $call_control.map_quals.use_mq.no_mq
+            #if str($call_control.source_qual.use_src_qual.src_qual):
+                $call_control.source_qual.use_src_qual.src_qual
+                #set $ign_vcfs = ','.join([str($ign_vcf) for $ign_vcf in $call_control.source_qual.use_src_qual.ign_vcf if $ign_vcf])
+                #if $ign_vcfs:
+                    --ign-vcf "$ign_vcfs"
+                #end if
+                --def-nm-q $call_control.source_qual.use_src_qual.def_nm_q
+            #end if
+            --min-jq $call_control.joint_qual.min_jq
+            --min-alt-jq $call_control.joint_qual.min_alt_jq
+            --def-alt-jq $call_control.joint_qual.def_alt_jq
+        #end if
+
+        --sig $filter_control.sig
+        #set $bonf_factor = $filter_control.bonf or 'dynamic'
+        --bonf $bonf_factor
+        $filter_control.others
+
+        reads.bam 2>&1
+
+        ## in case of errors add the log files produced
+        ## by the parallel workers to stderr
+        || (tool_exit_code=\$? && cat pp-tmp/lofreq2_call_parallel*/*.log 1>&2 && exit \$tool_exit_code)
+
+        ## work around a bug in lofreq call-parallel
+        ## https://github.com/CSB5/lofreq/issues/85
+        ## that causes the output format to be vcf.gz with certain filter
+        ## combinations.
+        #if str($bonf_factor) != 'dynamic':
+            #if '--no-default-filter' in str($filter_control.others):
+                && ln -s variants.vcf variants.vcf.gz
+                && gzip -df variants.vcf.gz
+            #end if
+        #end if
+    ]]></command>
+    <inputs>
+        <param type="data" name="reads" format="bam" label="Input reads in BAM format" />
+        <expand macro="reference_interface" />
+        <conditional name="regions">
+            <param name="restrict_to_region" type="select"
+            label="Call variants across">
+                <option value="genome">Whole reference</option>
+                <option value="regions_from_file">Regions specified in BED</option>
+            </param>
+            <when value="genome" />
+            <when value="regions_from_file">
+                <param argument="--bed" type="data" format="bed"
+                label="BED dataset with regions to examine" />
+            </when>
+        </conditional>
+        <param name="variant_types" type="select"
+        label="Types of variants to call"
+        help="Note: When including indels in the called variants you should preprocess your input data to include indel alignment qualities">
+            <option value="--call-indels">SNVs and indels</option>
+            <option value="" selected="True">Only SNVs</option>
+            <option value="--only-indels">Only indels</option>
+        </param>
+        <conditional name="call_control">
+            <param name="set_call_options" type="select"
+            label="Variant calling parameters">
+                <option value="no">Use default settings</option>
+                <option value="yes">Configure settings</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <section name="coverage" title="Coverage" expanded="true">
+                    <param name="min_cov" argument="--min-cov" type="integer" value="1" min="1"
+                    label="Minimal coverage"
+                    help="Do not attempt variant calling at sites that are not covered by at least this number of reads (default: 1)" />
+                    <param name="max_depth" argument="--max-depth" type="integer" value="1000000" min="1"
+                    label="Coverage cap"
+                    help="For efficiency, don not consider more than this number of reads at any site (default: 1,000,000)" />
+                </section>
+                <section name="pe" title="Paired reads" expanded="true">
+                    <param name="use_orphan" argument="--use-orphan" type="boolean" truevalue="--use-orphan" falsevalue="" checked="False"
+                    label="Use reads from anomalously mapped pairs"
+                    help="Applies to paired-end reads only. If set to true, reads from pairs that are flagged as non-proper pairs (SAM/BAM FLAG field 2) will be used in variant calling. The default is to ignore such reads." />
+                </section>
+                <section name="bc_quals" title="Base-calling quality" expanded="true">
+                    <param name="min_bq" argument="--min-bq" type="integer" value="6"
+                    label="Minimum baseQ"
+                    help="For variant calling at any given site, do not consider reads for which the base at that site has a base quality less than this value (default: 6)" />
+                    <param name="min_alt_bq" argument="--min-alt-bq" type="integer" min="0" value="6"
+                    label="Minimum baseQ for alternate bases"
+                    help="For variant calling at any given site, do not consider reads that support a non-reference allele at the site if that base has a base quality less than this value (default: 6). Note: this setting will have no effect if the specified value is less than the general Minimum baseQ above." />
+                    <param name="def_alt_bq" argument="--def-alt-bq" type="integer" min="0" value="0"
+                    label="Overwrite baseQs of alternate bases with this value"
+                    help="After filtering reads according to the Minimum baseQ settings above, set the base quality of the non-reference bases in the surviving reads to this new value (default: 0 = keep the original base quality)." />
+                </section>
+                <section name="align_quals" title="Base alignment quality" expanded="true"
+                help="Choose here whether you want to incorporate base and/or indel alignment qualities into lofreq's joint quality model. If you have previously computed and stored (using lofreq alnqual) any of these quality scores into your input dataset, you can tell the tool to reuse them. Alternatively, the tool can calculate the necessary scores on the fly.">
+                    <conditional name="alnqual">
+                        <param name="use_alnqual" type="select"
+                            label="Consider base/indel alignment qualities during variant calling?">
+                            <option value="">Yes, and prefer existing alignment qualities encoded in input</option>
+                            <option value="--del-baq">Yes, (re)calculate alignment qualities on the fly and use them</option>
+                            <option value="-A -B">No, don't make use of alignment qualities</option>
+                        </param>
+                        <when value="">
+                            <expand macro="handle_existing_alnqual" />
+                        </when>
+                        <when value="--del-baq">
+                            <expand macro="handle_alnqual" mode="Add and use" />
+                        </when>
+                        <when value="-A -B" />
+                    </conditional>
+                </section>
+                <section name="map_quals" title="Mapping quality" expanded="true">
+                    <param name="min_mq" argument="--min-mq" type="integer" value="0"
+                    label="Minimum mapping quality"
+                    help="For variant calling at any given site, do not consider reads with a mapping quality (MAPQ) less than this value (default: 0 = do not filter on read mapping quality)." />
+                    <conditional name="use_mq">
+                        <param name="no_mq" argument="--no-mq" type="select"
+                        label="Consider mapping quality during variant calling?">
+                            <option value="">Yes, incorporate MAPQ into joint quality score</option>
+                            <option value="--no-mq">No, ignore MAPQ scores during variant calling</option>
+                        </param>
+                        <when value="">
+                            <param name="max_mq" argument="--max-mq" type="integer" value="255"
+                            label="Maximum mapping quality"
+                            help="For the joint quality model at any site, cap the mapping quality of reads at this value (default: 255 = do not cap mapping qualities). Note: The special MAPQ value 255 is used by many tools to indicate undefined mapping quality, and lofreq call will ignore such reads during variant calling. Capping, however, will turn 255 into a regular MAPQ score. Thus, if you need to avoid using such reads, you should filter out MAPQ 255 reads from your input data with other tools before using lofreq call with MAPQ capping."/>
+                        </when>
+                        <when value="--no-mq">
+                            <param name="max_mq" type="hidden" value="" />
+                        </when>
+                    </conditional>
+                </section>
+                <section name="source_qual" title="Source quality" expanded="true">
+                    <conditional name="use_src_qual">
+                        <param argument="--src-qual" name="src_qual" type="select"
+                        label="Compute source quality and consider it during variant calling">
+                            <option value="">No, don't incorporate source quality into joint quality score</option>
+                            <option value="--src-qual">Yes, compute source quality and merge it into joint quality score</option>
+                        </param>
+                        <when value="" />
+                        <when value="--src-qual">
+                            <param name="def_nm_q" argument="--def-nm-q" type="integer" min="-1" value="-1"
+                            label="Replace non-match base qualities with this value"
+                            help="For the calculation of the source quality, replace all base qualities of non-match bases with this value (default: -1 = use original base qualities)." />
+                            <param name="ign_vcf" argument="--ign-vcf" type="data" format="vcf" optional="true" multiple="true"
+                            label="VCF input(s) with variants to ignore for source quality computation"
+                            help="Mismatches caused by known true variants in your samples should not lower the source quality estimate. If any read in your input has a base that is non-reference, but supports one of the known variants in the specified VCF datasets, that base will not be treated as a mismatch." />
+                        </when>
+                    </conditional>
+                </section>
+                <section name="joint_qual" title="Joint quality" expanded="true">
+                    <param name="min_jq" argument="--min-jq" type="integer" min="0" value="0"
+                    label="Minimum joinedQ"
+                    help="At any site, do not use reads for variant calling, if their calculated joint quality at that site is lower than this value (default: 0 = do not filter based on joint quality)" />
+                    <param name="min_alt_jq" argument="--min-alt-jq" type="integer" min="0" value="0"
+                    label="Minimum joinedQ for alternate bases"
+                    help="At any site, do not use reads for variant calling, if they support a non-reference allele at that site and their calculated joint quality at the site is lower than this value (default: 0 = do not filter based on joint quality). Note: this setting has no effect if the specified value is smaller than the general Minimum joinedQ set above." />
+                    <!-- def-alt-jq==-1, though documented, is currently not implemented -->
+                    <param name="def_alt_jq" argument="--def-alt-jq" type="integer" min="0" value="0"
+                    label="Overwrite joinedQs of alternate bases with this value"
+                    help="After filtering according to the Minimum joinedQ settings above, set the joint quality values for all reads surviving filtering and supporting a non-reference allele to this value (default: 0 = use the original calculated joint quality)." />
+                </section>
+            </when>
+        </conditional>
+        <conditional name="filter_control">
+            <param name="filter_type" type="select"
+            label="Variant filter parameters">
+                <option value="set_all_off">Strictly no filtering</option>
+                <option value="set_no_default">Preset QUAL score-based filtering</option>
+                <option value="set_lofreq_standard" selected="true">Preset filtering on QUAL score + coverage + strand bias (lofreq call default)</option>
+                <option value="set_custom">Custom filter settings/combinations</option>
+            </param>
+            <when value="set_all_off">
+                <param name="sig" type="hidden" value="1" />
+                <param name="bonf" type="hidden" value="1" />
+                <param name="others" type="hidden" value="--no-default-filter" />
+            </when>
+            <when value="set_no_default">
+                <param name="sig" type="hidden" value="0.01" />
+                <param name="bonf" type="hidden" value="dynamic" />
+                <param name="others" type="hidden" value="--no-default-filter" />
+            </when>
+            <when value="set_lofreq_standard">
+                <param name="sig" type="hidden" value="0.01" />
+                <param name="bonf" type="hidden" value="dynamic" />
+                <param name="others" type="hidden" value="" />
+            </when>
+            <when value="set_custom">
+                <param name="sig" type="float" value="0.01" min="0" max="1"
+                label="Significance threshold for calls"/>
+                <param name="bonf" type="integer" value="0" min="0"
+                label="Bonferroni correction factor for multiple testing"
+                help="Set to zero to determine dynamically from actual number of variant tests performed. Dynamic detection will calculate separate correction factors for SNVs and indels" />
+                <param name="others" type="boolean" truevalue="" falsevalue="--no-default-filter" checked="true"
+                label="Apply default coverage and strand-bias filter?"
+                help="" />
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="variants" from_work_dir="variants.vcf" format="vcf" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
+            <param name="ref_selector" value="history" />
+            <param name="ref" ftype="fasta" value="pBR322.fa" />
+            <output name="variants" file="call-out1.vcf" lines_diff="4" />
+        </test>
+        <test>
+            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
+            <param name="ref_selector" value="history" />
+            <param name="ref" ftype="fasta" value="pBR322.fa" />
+            <conditional name="filter_control">
+                <param name="filter_type" value="set_all_off" />
+            </conditional>
+            <output name="variants" file="call-out2.vcf" lines_diff="4" />
+        </test>
+    </tests>
+    <help><![CDATA[
+lofreq call: call variants from BAM file
+        
+LoFreq is a fast and sensitive variant-caller for inferring SNVs and indels
+from next-generation sequencing data. It makes full use of base-call qualities
+and other sources of errors inherent in sequencing, which are usually ignored
+by other methods or only used for filtering.
+
+LoFreq can run on almost any type of aligned sequencing data since no machine-
+or sequencing-technology dependent thresholds are used. It automatically adapts
+to changes in coverage and sequencing quality and can therefore be applied to a
+variety of data-sets e.g. viral/quasispecies, bacterial, metagenomics or
+somatic data.
+
+While the tool will often give reasonable results with default settings a
+variety of options let you control its exact behavior. These advanced options
+can be subdivided into those affecting variant calling and those affecting
+posterior filtering of the results.
+
+**Variant calling paramters**
+
+At the heart of LoFreq's variant caller is a **joint quality score** that is
+computed for every site in every read (that survives filtering) and that
+combines some or all of the following read and base quality measures:
+
+- Base/indel quality
+
+  For any read, this is the Phred-scaled likelihood that the base mapped to a
+  given site does not represent a sequencing error. For every base, this score
+  got computed by the base caller of your sequencing platform and got
+  incorporated into your input dataset during read alignment.
+
+  For insertions/deletions this is defined, analogously, as the Phred-scaled
+  likelihood that any inserted/deleted base is real, however, you are
+  responsible for adding indel qualitites, which are required for indel
+  calling with lofreq, to your input.
+
+  For doing so, you can use ``lofreq indelqual`` or GATK's BQSR.
+
+- Base/indel alignment quality
+
+  For any read, this is the Phred-scaled likelihood that the read's base or
+  indel mapped to a given reference genome position is mapped to this position
+  correctly.
+
+  The tool can calculate these scores for you on the fly. Alternatively, you
+  can precalculate them using ``lofreq alnqual``, which will incorporate them
+  into your input dataset.
+
+- Mapping quality
+
+  The Phred-scaled likelihood that the read got mapped to the correct place
+  in the reference genome. This score got incorporated into your input dataset
+  by the aligner you used to map your reads.
+        
+- Source quality
+
+  This is the Phred-scaled likelihood that the given read comes from the
+  reference genome. The tool can calculate this score for you.
+
+
+**Variant filter parameters**
+
+After generating a list of called variants, the tool can filter this list
+based on:
+
+- the statistical significance of the variant calls
+- strand-bias of reads supporting the variant
+- coverage of the variant site
+
+While posterior filtering can help reduce false-positive variant calls, please
+note that the separate ``lofreq filter``, which can be run on the output of
+``lofreq call`` has many more options for configuring filters.
+
+These are the different filter settings supported by the tool:
+
+*Preset filtering on QUAL score + coverage + strand bias*
+
+For variants to pass this filter, the following is required:
+
+- statistical signficance of the variant call with a pvalue < 0.01 based on the
+  retransformed QUAL score of the variant and multiple-testing corrected using
+  a dynamically determined Bonferroni factor (based on the number of overall
+  variants considered during calling).
+
+- A strand-bias in supporting reads not significant under a FDR-corrected p
+  value of 0.001 and 85% of supporting reads mapped to the same strand of the
+  genome.
+
+- A coverage of the variant site of at least 10x.
+
+*Preset QUAL score-based filtering*
+
+Same QUAL-based significance filter as the default, but without the strand-bias
+and coverage criteria
+
+*Strictly no filtering*
+
+Do not apply any filters, but produce the original list of all called variants.
+You will almost always want to use ``lofreq filter`` to process the resulting
+output.
+        
+*Custom filter settings/combinations*
+
+Lets you define your own QUAL-based significance filter and, optionally,
+combine it with the default starnd-bias and coverage filters.
+]]></help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Dec 17 17:27:17 2019 -0500
@@ -0,0 +1,88 @@
+<macros>
+    <token name="@WRAPPER_VERSION@">@TOOL_VERSION@+galaxy</token>
+    <token name="@TOOL_VERSION@">2.1.3.1</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">lofreq</requirement>
+            <yield/>
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1093/nar/gks918</citation>
+            <yield />
+        </citations>
+    </xml>
+    <token name="@PREPARE_REF@"><![CDATA[
+        #if str($reference_source.ref_selector) == 'history':
+            #set $reference_fasta_fn = 'reference.fa'
+            ln -s '$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($reference_source.ref.fields.path)
+        #end if
+    ]]></token>
+    <xml name="reference_interface">
+        <conditional name="reference_source">
+            <param name="ref_selector" type="select"
+            label="Choose the source for the reference genome">
+                <option value="cached">Locally cached</option>
+                <option value="history">History</option>
+            </param>
+            <when value="cached">
+                <param argument="--ref" type="select"
+                label="Reference genome">
+                    <options from_data_table="fasta_indexes">
+                        <filter type="data_meta" column="dbkey" key="dbkey" ref="reads" />
+                        <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 argument="--ref" type="data" format="fasta" label="Reference" help="Reference sequence" />
+            </when>
+        </conditional>
+    </xml>
+    <xml name="handle_existing_alnqual">
+        <conditional name="alnqual_choice">
+            <param name="alnquals_to_use" type="select"
+            label="Use the following alignment quality scores">
+                <option value="">Base and indel alignment qualities (BAQ and IDAQ)</option>
+                <option value="-A">Only base alignment qualities (BAQ)</option>
+                <option value="-B">Only indel alignment qualities (IDAQ)</option>
+            </param>
+            <when value="-B">
+                <param name="extended_baq" type="hidden" value="" />
+            </when>
+            <when value="">
+                <param argument="-e" name="extended_baq" type="boolean" checked="true" truevalue="" falsevalue="-e"
+                label="If BAQ needs to be computed, calculate extended BAQ?" />
+            </when>
+            <when value="-A">
+                <param argument="-e" name="extended_baq" type="boolean" checked="true" truevalue="" falsevalue="-e"
+                label="If BAQ needs to be computed, calculate extended BAQ?" />
+            </when>
+        </conditional>
+    </xml>
+    <xml name="handle_alnqual" token_mode="Use">
+        <conditional name="alnqual_choice">
+            <param name="alnquals_to_use" type="select"
+            label="@MODE@ the following alignment quality scores">
+                <option value="">Base and indel alignment qualities (BAQ and IDAQ)</option>
+                <option value="-A">Only base alignment qualities (BAQ)</option>
+                <option value="-B">Only indel alignment qualities (IDAQ)</option>
+            </param>
+            <when value="-B">
+                <param name="extended_baq" type="hidden" value="" />
+            </when>
+            <when value="">
+                <param argument="-e" name="extended_baq" type="boolean" checked="true" truevalue="" falsevalue="-e"
+                label="Use extended BAQ?" />
+            </when>
+            <when value="-A">
+                <param argument="-e" name="extended_baq" type="boolean" checked="true" truevalue="" falsevalue="-e"
+                label="Use extended BAQ?" />
+            </when>
+        </conditional>
+    </xml>
+</macros>
Binary file test-data/alnqual-out1.bam has changed
Binary file test-data/alnqual-out2.bam has changed
Binary file test-data/alnqual-out3.bam has changed
Binary file test-data/alnqual-out4.bam has changed
Binary file test-data/alnqual-out5.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/call-out1.vcf	Tue Dec 17 17:27:17 2019 -0500
@@ -0,0 +1,19 @@
+##fileformat=VCFv4.0
+##fileDate=20191125
+##source=lofreq call --verbose --ref reference.fa --sig 0.01 --bonf dynamic --no-default-filter -r pBR322:1-2180 -o /tmp/lofreq2_call_parallel3mrmthi_/0.vcf.gz alignments.bam
+##reference=reference.fa
+##INFO=<ID=DP,Number=1,Type=Integer,Description="Raw Depth">
+##INFO=<ID=AF,Number=1,Type=Float,Description="Allele Frequency">
+##INFO=<ID=SB,Number=1,Type=Integer,Description="Phred-scaled strand bias at this position">
+##INFO=<ID=DP4,Number=4,Type=Integer,Description="Counts for ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
+##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Indicates that the variant is an INDEL.">
+##INFO=<ID=CONSVAR,Number=0,Type=Flag,Description="Indicates that the variant is a consensus variant (as opposed to a low frequency variant).">
+##INFO=<ID=HRUN,Number=1,Type=Integer,Description="Homopolymer length to the right of report indel position">
+##FILTER=<ID=min_snvqual_38,Description="Minimum SNV Quality (Phred) 38">
+##FILTER=<ID=min_indelqual_20,Description="Minimum Indel Quality (Phred) 20">
+##FILTER=<ID=min_dp_10,Description="Minimum Coverage 10">
+##FILTER=<ID=sb_fdr,Description="Strand-Bias Multiple Testing Correction: fdr corr. pvalue > 0.001000">
+##FILTER=<ID=min_snvqual_38,Description="Minimum SNV Quality (Phred) 38">
+##FILTER=<ID=min_indelqual_20,Description="Minimum Indel Quality (Phred) 20">
+#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
+pBR322	1134	.	C	T	49314	PASS	DP=1767;AF=1.000000;SB=0;DP4=0,0,910,857
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/call-out2.vcf	Tue Dec 17 17:27:17 2019 -0500
@@ -0,0 +1,27 @@
+##fileformat=VCFv4.0
+##fileDate=20191204
+##source=lofreq call --verbose --ref reference.fa --sig 1 --bonf 1 --no-default-filter --no-default-filter -r pBR322:1-2180 -o /tmp/tmpjsbggC/job_working_directory/000/8/working/pp-tmp/lofreq2_call_parallelj9yxuugx/0.vcf.gz reads.bam 
+##reference=reference.fa
+##INFO=<ID=DP,Number=1,Type=Integer,Description="Raw Depth">
+##INFO=<ID=AF,Number=1,Type=Float,Description="Allele Frequency">
+##INFO=<ID=SB,Number=1,Type=Integer,Description="Phred-scaled strand bias at this position">
+##INFO=<ID=DP4,Number=4,Type=Integer,Description="Counts for ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
+##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Indicates that the variant is an INDEL.">
+##INFO=<ID=CONSVAR,Number=0,Type=Flag,Description="Indicates that the variant is a consensus variant (as opposed to a low frequency variant).">
+##INFO=<ID=HRUN,Number=1,Type=Integer,Description="Homopolymer length to the right of report indel position">
+#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO
+pBR322	815	.	A	G	0	.	DP=665;AF=0.003008;SB=6;DP4=333,311,0,2
+pBR322	861	.	A	C	0	.	DP=946;AF=0.002114;SB=3;DP4=447,497,0,2
+pBR322	1001	.	A	C	0	.	DP=1797;AF=0.000556;SB=3;DP4=877,918,1,0
+pBR322	1013	.	C	G	0	.	DP=1773;AF=0.000564;SB=0;DP4=875,897,0,1
+pBR322	1068	.	T	G	0	.	DP=1774;AF=0.000564;SB=3;DP4=853,920,1,0
+pBR322	1084	.	G	T	0	.	DP=1789;AF=0.000559;SB=3;DP4=875,913,1,0
+pBR322	1113	.	T	A	0	.	DP=1784;AF=0.000561;SB=0;DP4=885,898,0,1
+pBR322	1134	.	C	T	49314	.	DP=1767;AF=1.000000;SB=0;DP4=0,0,910,857
+pBR322	1193	.	G	A	0	.	DP=1698;AF=0.000589;SB=3;DP4=865,832,0,1
+pBR322	1218	.	A	C	0	.	DP=1708;AF=0.000585;SB=3;DP4=875,831,0,1
+pBR322	1230	.	T	C	0	.	DP=1759;AF=0.000569;SB=3;DP4=907,850,0,1
+pBR322	1256	.	A	G	0	.	DP=1746;AF=0.000573;SB=0;DP4=902,842,1,0
+pBR322	1498	.	C	G	0	.	DP=1195;AF=0.000837;SB=3;DP4=588,606,1,0
+pBR322	1503	.	T	G	0	.	DP=1156;AF=0.000865;SB=3;DP4=563,592,1,0
+pBR322	1505	.	G	A	0	.	DP=1137;AF=0.000880;SB=0;DP4=560,576,0,1
Binary file test-data/indelqual-out1.bam has changed
Binary file test-data/indelqual-out2.bam has changed
Binary file test-data/indelqual-out3.bam has changed
Binary file test-data/lofreq-in1.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/pBR322.fa	Tue Dec 17 17:27:17 2019 -0500
@@ -0,0 +1,74 @@
+>pBR322
+TTCTCATGTTTGACAGCTTATCATCGATAAGCTTTAATGCGGTAGTTTATCACAGTTAAA
+TTGCTAACGCAGTCAGGCACCGTGTATGAAATCTAACAATGCGCTCATCGTCATCCTCGG
+CACCGTCACCCTGGATGCTGTAGGCATAGGCTTGGTTATGCCGGTACTGCCGGGCCTCTT
+GCGGGATATCGTCCATTCCGACAGCATCGCCAGTCACTATGGCGTGCTGCTAGCGCTATA
+TGCGTTGATGCAATTTCTATGCGCACCCGTTCTCGGAGCACTGTCCGACCGCTTTGGCCG
+CCGCCCAGTCCTGCTCGCTTCGCTACTTGGAGCCACTATCGACTACGCGATCATGGCGAC
+CACACCCGTCCTGTGGATCCTCTACGCCGGACGCATCGTGGCCGGCATCACCGGCGCCAC
+AGGTGCGGTTGCTGGCGCCTATATCGCCGACATCACCGATGGGGAAGATCGGGCTCGCCA
+CTTCGGGCTCATGAGCGCTTGTTTCGGCGTGGGTATGGTGGCAGGCCCCGTGGCCGGGGG
+ACTGTTGGGCGCCATCTCCTTGCATGCACCATTCCTTGCGGCGGCGGTGCTCAACGGCCT
+CAACCTACTACTGGGCTGCTTCCTAATGCAGGAGTCGCATAAGGGAGAGCGTCGACCGAT
+GCCCTTGAGAGCCTTCAACCCAGTCAGCTCCTTCCGGTGGGCGCGGGGCATGACTATCGT
+CGCCGCACTTATGACTGTCTTCTTTATCATGCAACTCGTAGGACAGGTGCCGGCAGCGCT
+CTGGGTCATTTTCGGCGAGGACCGCTTTCGCTGGAGCGCGACGATGATCGGCCTGTCGCT
+TGCGGTATTCGGAATCTTGCACGCCCTCGCTCAAGCCTTCGTCACTGGTCCCGCCACCAA
+ACGTTTCGGCGAGAAGCAGGCCATTATCGCCGGCATGGCGGCCGACGCGCTGGGCTACGT
+CTTGCTGGCGTTCGCGACGCGAGGCTGGATGGCCTTCCCCATTATGATTCTTCTCGCTTC
+CGGCGGCATCGGGATGCCCGCGTTGCAGGCCATGCTGTCCAGGCAGGTAGATGACGACCA
+TCAGGGACAGCTTCAAGGATCGCTCGCGGCTCTTACCAGCCTAACTTCGATCACTGGACC
+GCTGATCGTCACGGCGATTTATGCCGCCTCGGCGAGCACATGGAACGGGTTGGCATGGAT
+TGTAGGCGCCGCCCTATACCTTGTCTGCCTCCCCGCGTTGCGTCGCGGTGCATGGAGCCG
+GGCCACCTCGACCTGAATGGAAGCCGGCGGCACCTCGCTAACGGATTCACCACTCCAAGA
+ATTGGAGCCAATCAATTCTTGCGGAGAACTGTGAATGCGCAAACCAACCCTTGGCAGAAC
+ATATCCATCGCGTCCGCCATCTCCAGCAGCCGCACGCGGCGCATCTCGGGCAGCGTTGGG
+TCCTGGCCACGGGTGCGCATGATCGTGCTCCTGTCGTTGAGGACCCGGCTAGGCTGGCGG
+GGTTGCCTTACTGGTTAGCAGAATGAATCACCGATACGCGAGCGAACGTGAAGCGACTGC
+TGCTGCAAAACGTCTGCGACCTGAGCAACAACATGAATGGTCTTCGGTTTCCGTGTTTCG
+TAAAGTCTGGAAACGCGGAAGTCAGCGCCCTGCACCATTATGTTCCGGATCTGCATCGCA
+GGATGCTGCTGGCTACCCTGTGGAACACCTACATCTGTATTAACGAAGCGCTGGCATTGA
+CCCTGAGTGATTTTTCTCTGGTCCCGCCGCATCCATACCGCCAGTTGTTTACCCTCACAA
+CGTTCCAGTAACCGGGCATGTTCATCATCAGTAACCCGTATCGTGAGCATCCTCTCTCGT
+TTCATCGGTATCATTACCCCCATGAACAGAAATCCCCCTTACACGGAGGCATCAGTGACC
+AAACAGGAAAAAACCGCCCTTAACATGGCCCGCTTTATCAGAAGCCAGACATTAACGCTT
+CTGGAGAAACTCAACGAGCTGGACGCGGATGAACAGGCAGACATCTGTGAATCGCTTCAC
+GACCACGCTGATGAGCTTTACCGCAGCTGCCTCGCGCGTTTCGGTGATGACGGTGAAAAC
+CTCTGACACATGCAGCTCCCGGAGACGGTCACAGCTTGTCTGTAAGCGGATGCCGGGAGC
+AGACAAGCCCGTCAGGGCGCGTCAGCGGGTGTTGGCGGGTGTCGGGGCGCAGCCATGACC
+CAGTCACGTAGCGATAGCGGAGTGTATACTGGCTTAACTATGCGGCATCAGAGCAGATTG
+TACTGAGAGTGCACCATATGCGGTGTGAAATACCGCACAGATGCGTAAGGAGAAAATACC
+GCATCAGGCGCTCTTCCGCTTCCTCGCTCACTGACTCGCTGCGCTCGGTCGTTCGGCTGC
+GGCGAGCGGTATCAGCTCACTCAAAGGCGGTAATACGGTTATCCACAGAATCAGGGGATA
+ACGCAGGAAAGAACATGTGAGCAAAAGGCCAGCAAAAGGCCAGGAACCGTAAAAAGGCCG
+CGTTGCTGGCGTTTTTCCATAGGCTCCGCCCCCCTGACGAGCATCACAAAAATCGACGCT
+CAAGTCAGAGGTGGCGAAACCCGACAGGACTATAAAGATACCAGGCGTTTCCCCCTGGAA
+GCTCCCTCGTGCGCTCTCCTGTTCCGACCCTGCCGCTTACCGGATACCTGTCCGCCTTTC
+TCCCTTCGGGAAGCGTGGCGCTTTCTCATAGCTCACGCTGTAGGTATCTCAGTTCGGTGT
+AGGTCGTTCGCTCCAAGCTGGGCTGTGTGCACGAACCCCCCGTTCAGCCCGACCGCTGCG
+CCTTATCCGGTAACTATCGTCTTGAGTCCAACCCGGTAAGACACGACTTATCGCCACTGG
+CAGCAGCCACTGGTAACAGGATTAGCAGAGCGAGGTATGTAGGCGGTGCTACAGAGTTCT
+TGAAGTGGTGGCCTAACTACGGCTACACTAGAAGGACAGTATTTGGTATCTGCGCTCTGC
+TGAAGCCAGTTACCTTCGGAAAAAGAGTTGGTAGCTCTTGATCCGGCAAACAAACCACCG
+CTGGTAGCGGTGGTTTTTTTGTTTGCAAGCAGCAGATTACGCGCAGAAAAAAAGGATCTC
+AAGAAGATCCTTTGATCTTTTCTACGGGGTCTGACGCTCAGTGGAACGAAAACTCACGTT
+AAGGGATTTTGGTCATGAGATTATCAAAAAGGATCTTCACCTAGATCCTTTTAAATTAAA
+AATGAAGTTTTAAATCAATCTAAAGTATATATGAGTAAACTTGGTCTGACAGTTACCAAT
+GCTTAATCAGTGAGGCACCTATCTCAGCGATCTGTCTATTTCGTTCATCCATAGTTGCCT
+GACTCCCCGTCGTGTAGATAACTACGATACGGGAGGGCTTACCATCTGGCCCCAGTGCTG
+CAATGATACCGCGAGACCCACGCTCACCGGCTCCAGATTTATCAGCAATAAACCAGCCAG
+CCGGAAGGGCCGAGCGCAGAAGTGGTCCTGCAACTTTATCCGCCTCCATCCAGTCTATTA
+ATTGTTGCCGGGAAGCTAGAGTAAGTAGTTCGCCAGTTAATAGTTTGCGCAACGTTGTTG
+CCATTGCTGCAGGCATCGTGGTGTCACGCTCGTCGTTTGGTATGGCTTCATTCAGCTCCG
+GTTCCCAACGATCAAGGCGAGTTACATGATCCCCCATGTTGTGCAAAAAAGCGGTTAGCT
+CCTTCGGTCCTCCGATCGTTGTCAGAAGTAAGTTGGCCGCAGTGTTATCACTCATGGTTA
+TGGCAGCACTGCATAATTCTCTTACTGTCATGCCATCCGTAAGATGCTTTTCTGTGACTG
+GTGAGTACTCAACCAAGTCATTCTGAGAATAGTGTATGCGGCGACCGAGTTGCTCTTGCC
+CGGCGTCAACACGGGATAATACCGCGCCACATAGCAGAACTTTAAAAGTGCTCATCATTG
+GAAAACGTTCTTCGGGGCGAAAACTCTCAAGGATCTTACCGCTGTTGAGATCCAGTTCGA
+TGTAACCCACTCGTGCACCCAACTGATCTTCAGCATCTTTTACTTTCACCAGCGTTTCTG
+GGTGAGCAAAAACAGGAAGGCAAAATGCCGCAAAAAAGGGAATAAGGGCGACACGGAAAT
+GTTGAATACTCATACTCTTCCTTTTTCAATATTATTGAAGCATTTATCAGGGTTATTGTC
+TCATGAGCGGATACATATTTGAATGTATTTAGAAAAATAAACAAATAGGGGTTCCGCGCA
+CATTTCCCCGAAAAGTGCCACCTGACGTCTAAGAAACCATTATTATCATGACATTAACCT
+ATAAAAATAGGCGTATCACGAGGCCCTTTCGTCTTCAAGAA
\ No newline at end of file
Binary file test-data/viterbi-out1.bam has changed
Binary file test-data/viterbi-out2.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/fasta_indexes.loc.sample	Tue Dec 17 17:27:17 2019 -0500
@@ -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	Tue Dec 17 17:27:17 2019 -0500
@@ -0,0 +1,7 @@
+<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>