view macros.xml @ 0:61add3f58f26 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 4fa86613193c985e0cb9a8fc795c56b8bc7b8532
author iuc
date Thu, 02 Oct 2025 10:19:44 +0000
parents
children
line wrap: on
line source

<?xml version="1.0"?>
<macros>
    <token name="@TOOL_VERSION@">3.6.5</token>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@TOOL_VERSION@">jbrowse2</requirement>
            <requirement type="package" version="1.22.1">samtools</requirement>
            <requirement type="package" version="1.11">tabix</requirement>
            <requirement type="package" version="3.13.7">python</requirement>
            <requirement type="package" version="2.32.5">requests</requirement>
            <yield/>
        </requirements>
    </xml>
    <token name="@VERSION_SUFFIX@">0</token>

    <xml name="general_options">
        <section name="jbgen" title="Advanced: general JBrowse options" expanded="false">
            <param label="Enable analytics" help="Will send usage data to Google Analytics, see https://github.com/GMOD/jbrowse-components/issues/1166" name="enableAnalytics" type="boolean" checked="false" truevalue="true" falsevalue="false" />

            <param name="primary_color" type="color" label="Primary color" value="#0d233f"/>
            <param name="secondary_color" type="color" label="Secondary color" value="#721e63"/>
            <param name="tertiary_color" type="color" label="Tertiary color" value="#135560"/>
            <param name="quaternary_color" type="color" label="Quaternary color" value="#ffb11d"/>

            <param label="Font size" name="font_size" type="integer" value="10" min="6" max="50" />
        </section>
    </xml>

    <xml name="track_metadata">
        <section name="metadata" title="Advanced: track metadata" expanded="false">
            <param name="galaxy_metadata" label="Show Galaxy track metadata" type="boolean" checked="true" truevalue="true" falsevalue="false" help="Make Galaxy metadata available in 'About track' window and faceted track selector" />
            <param name="metadata_bonus" type="data" format="tsv,tabular" label="Additional track metadata" optional="true" help="Display additional track metadata from a TSV file" />
        </section>
    </xml>

    <xml name="track_visibility">
        <param type="select" label="Track Visibility" name="track_visibility">
            <option value="default_off">Off when browser opens</option>
            <option value="default_on" selected="true">On when browser opens</option>
        </param>
    </xml>

    <xml name="track_styling_linear">

        <param name="display_mode" type="select" label="Display mode">
            <option value="normal" selected="true">normal</option>
            <option value="compact">compact</option>
            <option value="reducedRepresentation">reducedRepresentation</option>
            <option value="collapse">collapse</option>
        </param>

        <param label="Show labels" name="show_labels" type="boolean" checked="true" truevalue="true" falsevalue="false" />

        <param label="Features label"
                type="text"
                name="labels_name"
                value="jexl:get(feature,'name') || get(feature,'id')"
                help="See https://jbrowse.org/jb2/docs/config_guide/#configuration-callbacks for syntax">
            <expand macro="jexl_sanitize" />
        </param>

        <param label="Show descriptions" name="show_descriptions" type="boolean" checked="true" truevalue="true" falsevalue="false" />

        <param label="Features description"
                type="text"
                name="descriptions_name"
                value="jexl:get(feature,'note') || get(feature,'description')"
                help="See https://jbrowse.org/jb2/docs/config_guide/#configuration-callbacks for syntax">
            <expand macro="jexl_sanitize" />
        </param>

        <param label="Max height" name="max_height" type="integer" value="600" min="20" help="Maximum height that the track is permitted to reach in pixels."/>
    </xml>

    <xml name="track_styling_arc">

        <param name="display_mode" type="select" label="Display mode">
            <option value="arcs" selected="true">arcs</option>
            <option value="semicircles">semicircles</option>
        </param>

        <param label="Arcs label"
                type="text"
                name="labels_name"
                value="jexl:get(feature,'score')"
                help="See https://jbrowse.org/jb2/docs/config_guide/#configuration-callbacks for syntax">
            <expand macro="jexl_sanitize" />
        </param>
    </xml>

    <xml name="track_styling_feature">
        <section name="jbstyle" title="Advanced: styling options" expanded="false">
        <conditional name="track_style">
            <param name="display" type="select" label="Display style" help="How the track will be displayed by default">
                <option value="LinearBasicDisplay" selected="true">LinearBasicDisplay</option>
                <option value="LinearArcDisplay">LinearArcDisplay</option>
            </param>
            <when value="LinearBasicDisplay">
                <expand macro="track_styling_linear"/>
            </when>
            <when value="LinearArcDisplay">
                <expand macro="track_styling_arc"/>
            </when>
        </conditional>
        </section>
    </xml>

    <xml name="track_styling_xam">
        <section name="jbstyle" title="Advanced: styling options" expanded="false">
            <conditional name="track_style">
                <param name="display" type="select" label="Display style" help="How the track will be displayed by default">
                    <option value="LinearAlignmentsDisplay" selected="true">Alignments (Pileup + SNP Coverage)</option>
                    <option value="LinearPileupDisplay">Pileup</option>
                    <option value="LinearSNPCoverageDisplay">SNP Coverage</option>
                    <option value="LinearReadArcsDisplay">Arc</option>
                    <option value="LinearReadCloudDisplay">Read Cloud</option>
                </param>
                <when value="LinearAlignmentsDisplay"/>
                    <!-- TODO add options from both LinearPileupDisplay and LinearSNPCoverageDisplay (doesn't work currently) -->
                <when value="LinearPileupDisplay"/>
                    <!-- TODO add more options (doesn't work currently) -->
                <when value="LinearSNPCoverageDisplay">
                    <!-- TODO add more options (doesn't work currently) -->
                    <param name="scale_type" type="select" label="Scale type">
                        <option value="linear" selected="true">Linear</option>
                        <option value="log">Log</option>
                    </param>
                    <param name="min_score" label="Min score" type="integer" value="" optional="true"/>
                    <param name="max_score" label="Max score" type="integer" value="" optional="true"/>
                </when>
                <when value="LinearReadArcsDisplay"/>
                    <!-- TODO add more options -->
                <when value="LinearReadCloudDisplay"/>
                    <!-- TODO add more options -->
            </conditional>
        </section>
    </xml>

    <xml name="track_styling_vcf">
        <section name="jbstyle" title="Advanced: styling options" expanded="false">
            <conditional name="track_style">
                <param name="display" type="select" label="Display style" help="How the track will be displayed by default">
                    <option value="LinearVariantDisplay" selected="true">Variant</option>
                    <option value="MultiLinearVariantDisplay">Multi-sample variant display (matrix)</option>
                    <option value="LinearVariantMatrixDisplay">Multi-sample variant display (regular)</option>
                    <option value="LinearPairedArcDisplay">Arc</option>
                </param>
                <when value="LinearVariantDisplay">
                    <!-- TODO does not work (jbrowse side) -->
                    <!--expand macro="track_styling_linear"/-->
                </when>
                <when value="MultiLinearVariantDisplay"/>
                <when value="LinearVariantMatrixDisplay"/>
                <when value="LinearPairedArcDisplay"/>
            </conditional>
        </section>
    </xml>

    <xml name="track_styling_bigwig">
        <section name="jbstyle" title="Advanced: styling options" expanded="false">
            <conditional name="track_style">
                <param name="display" type="select" label="Display style" help="How the track will be displayed by default">
                    <option value="LinearWiggleDisplay" selected="true">Wiggle</option>
                    <option value="MultiLinearWiggleDisplay" selected="true">Multiple Wiggle</option>
                </param>
                <when value="LinearWiggleDisplay">
                    <param name="wig_renderer" type="select" label="Renderer type">
                        <option value="xyplot" selected="true">XY Plot</option>
                        <option value="density">Density</option>
                        <option value="line">Line</option>
                    </param>

                    <!-- TODO not working -->
                    <!--param name="autoscale" type="select" label="Autoscale type">
                        <option value="local" selected="true">Local</option>
                        <option value="global">Global</option>
                        <option value="globalsd">Global ± 3σ</option>
                        <option value="localsd">Local ± 3σ</option>
                    </param>
                    <param name="resolution" label="Resolution" type="integer" value="1"/>
                    <param name="summaryScoreMode" type="select" label="Autoscale type">
                        <option value="max">Max</option>
                        <option value="min">Min</option>
                        <option value="avg">Avg</option>
                        <option value="whiskers" selected="true">Whiskers (combines all three)</option>
                    </param>
                    <param name="filled" label="Fill in histogram" type="boolean" checked="true" truevalue="true" falsevalue="false" />
                    <param name="scaleType" type="select" label="Scale type">
                        <option value="linear" selected="true">Linear</option>
                        <option value="log">Log</option>
                    </param>
                    <param name="displayCrossHatches" label="Draw cross hatches" type="boolean" checked="true" truevalue="true" falsevalue="false" />
                    <param name="minScore" label="Min score" type="integer" value="" optional="true"/>
                    <param name="maxScore" label="Max score" type="integer" value="" optional="true"/-->
                </when>
                <when value="MultiLinearWiggleDisplay">
                    <param name="wig_renderer" type="select" label="Renderer type">
                        <option value="multirowxy" selected="true">Multi row XY Plot</option>
                        <option value="xyplot">Multi XY Plot</option>
                        <option value="multirowdensity">Density</option>
                        <option value="multiline">Line</option>
                        <option value="multirowline">Row line</option>
                    </param>
                </when>
            </conditional>
        </section>
    </xml>

    <xml name="track_styling_maf">
        <param name="track_display" type="hidden" value="LinearMafDisplay" />
    </xml>

    <xml name="track_styling_hic">
        <param name="track_display" type="hidden" value="LinearHicDisplay" />
    </xml>

    <xml name="track_styling_gc">
        <param name="track_display" type="hidden" value="LinearGCContentDisplay" />
    </xml>

    <xml name="track_styling_synteny">
        <section name="jbstyle" title="Advanced: styling options" expanded="false">
            <conditional name="track_style">
                <param name="display" type="select" label="Display style" help="How the track will be displayed by default">
                    <option value="LinearBasicDisplay" selected="true">Basic track display</option>
                    <option value="LinearSyntenyDisplay" selected="true">Synteny viewer</option>
                </param>
                <when value="LinearBasicDisplay"/>
                <when value="LinearSyntenyDisplay"/>
            </conditional>
        </section>
    </xml>

    <xml name="details_panel">
        <section name="formatdetails" title="Advanced: feature details panel customization" expanded="false">
            <param label="JEXL code to customize the top-level feature"
                    type="text"
                    name="formatdetails_feature"
                    optional="true"
                    help="e.g. jexl:{newfield:'Custom contents here: '+feature.name} (see https://jbrowse.org/jb2/docs/config_guides/customizing_feature_details/ for more details)">
                <expand macro="jexl_sanitize" />
            </param>
            <param label="JEXL code to customize the subfeatures"
                    type="text"
                    name="formatdetails_subfeature"
                    optional="true"
                    help="e.g. jexl:{newfield:'Custom contents here: '+feature.name} (see https://jbrowse.org/jb2/docs/config_guides/customizing_feature_details/ for more details)">
                <expand macro="jexl_sanitize" />
            </param>
            <param name="formatdetails_depth" label="Depth to customize the subfeatures to" type="integer" value="1"/>
        </section>
    </xml>

    <xml name="jexl_sanitize">
        <sanitizer>
            <mapping initial="galaxy.util.mapped_chars">
            <add source="&#10;" target=" " />
            <add source="&gt;" target="__gt__" />
            <add source="&lt;" target="__lt__" />
            </mapping>
            <valid initial="default">
                <add value="|" />
                <add value="{"/>
                <add value="}"/>
                <add value="!"/>
                <add value="?"/>
                <add value="&amp;"/>
                <add value="+"/>
                <add value="="/>
                <add value="'"/>
                <add value='"'/>
            </valid>
        </sanitizer>
    </xml>

    <xml name="input_conditional" token_label="Track Data" token_format="data" token_help="" token_multiple="True">
        <conditional name="annotation_cond">
            <param label="@LABEL@" name="annotation_source" type="select">
                <option selected="True" value="history">Use data from history</option>
                <option value="remote">Use a genome from a remote source (not recommended)</option>
            </param>
            <when value="history">
                <param name="annotation" label="@LABEL@" format="@FORMAT@" type="data" multiple="@MULTIPLE@" help="@HELP@"/>
            </when>
            <when value="remote">
                <param name="uri" type="text" label="URI pointing to a @LABEL@"
                    help="@HELP@ ⚠️ WARNING: If this URI is not available for any reason, your JBrowse track will not show up." />
                <param name="label" type="text" label="Track label" />
                <param name="format" type="hidden" value="@FORMAT@" />
            </when>
        </conditional>
    </xml>

    <xml name="input_conditional_no_remote" token_label="Track Data" token_format="data" token_help="" token_multiple="True">
        <conditional name="annotation_cond">
            <param label="@LABEL@" name="annotation_source" type="select">
                <option selected="True" value="history">Use data from history</option>
            </param>
            <when value="history">
                <param name="annotation" label="@LABEL@" format="@FORMAT@" type="data" multiple="@MULTIPLE@" help="@HELP@"/>
            </when>
        </conditional>
    </xml>

    <xml name="citations">
        <citations>
        <citation type="doi">10.1186/s13059-023-02914-z</citation>
        </citations>
    </xml>
</macros>