<!--
  ~ Copyright (C) 2009-2010 Institute for Computational Biomedicine,
  ~                    Weill Medical College of Cornell University
  ~
  ~  This program is free software; you can redistribute it and/or modify
  ~  it under the terms of the GNU General Public License as published by
  ~  the Free Software Foundation; either version 3 of the License, or
  ~  (at your option) any later version.
  ~
  ~  This program is distributed in the hope that it will be useful,
  ~  but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~  GNU General Public License for more details.
  ~
  ~  You should have received a copy of the GNU General Public License
  ~  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<jsap>
    <parameters>
        <flaggedOption>
            <id>input</id>
            <shortFlag>i</shortFlag>
            <longFlag>input</longFlag>
            <required>true</required>
            <help>The LAST alignment file to convert to compact alignment format.  By default, both the MAF and COUNTS files associated with this parameter are converted.  No extension is required; it is assumed to be either ".maf" or ".counts".</help>
        </flaggedOption>
        <flaggedOption>
            <id>output</id>
            <shortFlag>o</shortFlag>
            <longFlag>output</longFlag>
            <required>true</required>
            <help>The output path and basename to write the compact format to.</help>
        </flaggedOption>
        <flaggedOption>
            <id>genome-cache</id>
            <shortFlag>g</shortFlag>
            <longFlag>genome-cache</longFlag>
            <required>false</required>
            <help>The genome cache basename. This argument is required when aligning color space with last, in order to translate color-space variations to base space variations.</help>
        </flaggedOption>

        <flaggedOption>
            <id>query-reads-ids</id>
            <shortFlag>q</shortFlag>
            <longFlag>query-ids</longFlag>
            <required>false</required>
            <help>A compact file describing reads which provides identifiers for each read.  If provided, read identifiers are propagated to the alignment header.  </help>
        </flaggedOption>
        <flaggedOption>
            <id>target-reference-ids</id>
            <shortFlag>t</shortFlag>
            <longFlag>target-ids</longFlag>
            <required>false</required>
            <help>A compact file describing targets which provides identifiers for each target sequence.  If provided, target identifiers are propagated to the alignment header.  </help>
        </flaggedOption>
        <switch>
            <id>propagate-query-ids</id>
            <longFlag>propagate-query-ids</longFlag>
            <help>When this switch is provided, propagate query ids if provided in the compact file designated by the query-ids option. The default is false since query ids are generally not useful and can consume a large amount of storage.  </help>
        </switch>
        <flaggedOption>
            <id>propagate-target-ids</id>
            <longFlag>propagate-target-ids</longFlag>
            <defaults>
                <string>true</string>
            </defaults>
             <stringParser>
                <classname>BooleanStringParser</classname>
            </stringParser>
            <help>When this switch is provided, propagate target ids if provided in the compact file designated by the target-ids option. The default is true since target ids are quite useful and not very many.  </help>
        </flaggedOption>


        <flaggedOption>
            <id>read-index-filter</id>
            <shortFlag>f</shortFlag>
            <longFlag>read-index-filter</longFlag>
            <stringParser>
                <classname>FileStringParser</classname>
            </stringParser>
            <required>false</required>
            <help>The name of a read index set with multiplicy information. When provided, last-to-compact appends exactly m identical entries for a read with index </help>
        </flaggedOption>
        <flaggedOption>
            <id>ambiguity-threshold</id>
            <defaults>
                <string>2</string>
            </defaults>
            <stringParser>
                <classname>IntegerStringParser</classname>
            </stringParser>
            <longFlag>ambiguity-threshold</longFlag>
            <required>false</required>
            <help>Maximum number of locations that a read can match to be included in the alignment entries.</help>
        </flaggedOption>
        <flaggedOption>
            <id>quality-filter-parameters</id>
            <shortFlag>p</shortFlag>
            <defaults>
                <string>threshold=0.05</string>
            </defaults>
            <longFlag>quality-filter-parameters</longFlag>
            <required>false</required>
            <help>Parameters to configure the quality filter.</help>
        </flaggedOption>

        <switch>
            <id>only-maf</id>
            <longFlag>only-maf</longFlag>
            <help>When this switch is provided, only convert the MAF file. </help>
        </switch>
        <switch>
            <id>only-counts</id>
            <longFlag>only-counts</longFlag>
            <help>When this switch is provided, only convert the COUNTS file. </help>
        </switch>
         <flaggedOption>
            <id>third-party-input</id>
            <longFlag>third-party-input</longFlag>
            <defaults>
                <string>true</string>
            </defaults>
             <stringParser>
                <classname>BooleanStringParser</classname>
            </stringParser>
            <help>Use to import files not produced by Goby.</help>
        </flaggedOption>
        <switch>
            <id>flip-strand</id>
            <longFlag>flip-strand</longFlag>
            <help>Flip the strand of the alignment strand. This option causes the strand of the query to flip between + and - and the sequence variations to be adjusted accordingly (i.e., C ~ G, A ~ T)</help>
        </switch>
        <flaggedOption>
            <id>substitutions</id>
            <longFlag>substitutions</longFlag>

             <stringParser>
                <classname>StringStringParser</classname>
            </stringParser>
            <help>Substitute characters in the aligned read by other characters. Provide substitutions in the format a/b, where a and b are characters. Character a will be replaced by character b. For instance, --substitions t/C will replace lower case t with C. Multiple substitutions can be provided separated by coma. They will be applied in the order they appear on the command line.</help>
        </flaggedOption>
    </parameters>
</jsap>
