<macros>
    <token name="@VERSION@">1.1.1</token>
    <token name="@VERSION_SUFFIX@">0</token>
    <token name="@PLOTS@">
        -w${width}
        -h${height}
    </token>
    <token name="@MEASURE@">
        #if $measure.measurement == "relative":
            -x${max_x}
            -y${max_y}
        #else:
            -X${max_x}
            -Y${max_y} 
        #end if 
    </token>
    <token name="@GRAPHS@">
        #for $graph in $graphs:
            $graph
        #end for
    </token>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@VERSION@">merquryfk</requirement>
        </requirements>
    </xml>
    <xml name="sizes">
        <conditional name="measure">
            <param name="measurement" type="select" label="How would you like to set max value?">
                <option value="absolute">Absolute terms</option>
                <option value="relative">Relative to peak</option>
            </param>
            <when value="absolute">
                <param name="max_x" type="integer" min="0" label="Max X value" optional="true" value="2"/>
                <param name="max_y" type="integer" min="0" label="Max Y value" optional="true" value="1"/>
            </when>            
            <when value="relative">
                <param name="max_x" type="float" min="0" label="Max X multiplier" optional="true" value="2.1" help="Sets max value as assigned multiple of count 'peak' away from origin"/>
                <param name="max_y" type="float" min="0" label="Max Y multiplier" optional="true" value="1.1" help="Sets max value as assigned multiple of count 'peak' away from origin"/>
            </when>
        </conditional>
    </xml>
    <xml name="plots">
        <param name="width" label="Width of plots" type="float" optional="true" value="6.0" min="0"/>
        <param name="height" label="Height of plots" type="float" optional="true" value="4.5" min="0"/>
    </xml>
    <xml name="graphs">
        <param name="graphs" label="What graphs would you like to generate?" type="select" multiple="true" help="If none are selected, all will be generated">
            <option value="-l">Line plot</option>
            <option value="-f">Fill plot</option>
            <option value="-s">Stack plot</option>
            <option value="-z">K-mer counts unique to assembly</option>
        </param>
    </xml>
    <xml name="graphs2">
        <param name="graphs" label="What graphs would you like to generate?" type="select" multiple="true" help="If none are selected, all will be generated">
            <option value="-l">Line plot</option>
            <option value="-f">Fill plot</option>
            <option value="-s">Stack plot</option>
        </param>
    </xml>
    <xml name="pdf">
        <param argument="-pdf" type="boolean" label="PDF Output" truevalue="-pdf" falsevalue="" help="Output in pdf format if true, png if false"/>
    </xml>
    <xml name="description">
        <description>part of MERQURY.FK</description>
    </xml>
    <xml name="citation">
        <citations>
            <citation type="bibtex">
                @misc{githubMERQURY.FK.
                    author = {Eugene Myers},
                    year = {2023},
                    title = {MERQURY.FK},
                    publisher = {GitHub},
                    journal = {GitHub repository},
                    url = {https://github.com/thegenemyers/MERQURY.FK},
                }
            </citation>
        </citations>
    </xml>
</macros>