view macros.xml @ 3:c5f2ce99da69 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/freyja commit 79a21a9a4a63e538f2ba0bc29384593df2c65859
author iuc
date Fri, 15 Nov 2024 16:44:54 +0000
parents 53b22b7dff19
children
line wrap: on
line source

<?xml version="1.0"?>
<macros>
    <token name="@TOOL_VERSION@">1.5.2</token>
    <token name="@VERSION_SUFFIX@">0</token>
    <token name="@PROFILE@">21.01</token>
    <xml name="biotools">
        <xrefs>
            <xref type="bio.tools">freyja</xref>
        </xrefs>
    </xml>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@TOOL_VERSION@">freyja</requirement>
            <yield/>
        </requirements>
    </xml>
    <xml name="version">
        <version_command>freyja --version</version_command>
    </xml>
    <token name="@RUN_FREYJA_UPDATE_COMMAND@"><![CDATA[
#if $usher_update_option.choice == 'update'
    freyja update &&
#end if
]]></token>
    <token name="@PREPROCESS_VCF_INPUT@"><![CDATA[
ln -s '$variants_file' 'variants_file.vcf' &&
]]></token>
    <token name="@STANDARD_INPUT_FOR_BOOT@"><![CDATA[
#if $variants_file.ext == 'vcf'
    'variants_file.vcf'
#else
    '$variants_file'
#end if
'$depth_file'
#if $eps
    --eps '${eps}'
#end if
#if $meta
    --meta '${meta}'
#end if
$confirmedonly
--pathogen '$pathogen'
]]></token>
    <token name="@CUSTOM_BARCODES_COMMAND@"><![CDATA[
#if $usher_update_option.choice == 'custom'
    --barcodes '${usher_update_option.usher_barcodes}'
#end if
]]></token>
    <token name="@DASH_COMMAND@"><![CDATA[
echo '${plot_format.plot_title}' > plot_title.txt &&
echo '${plot_format.plot_intro}' > plot_intro.txt &&
freyja dash
    --mincov $plot_format.mincov
    #if $need_aggregation.choice == 'no'
        '$tsv_aggregated'
    #else
        'aggregated.tsv'
    #end if
    '$plot_format.csv_meta'
    plot_title.txt
    plot_intro.txt
    --output abundances_dashboard.html
]]></token>
    <token name="@PLOT_COMMAND@"><![CDATA[
freyja plot
    $plot_format.lineages
    --mincov $plot_format.mincov
    #if $need_aggregation.choice == 'no'
        '$tsv_aggregated'
    #else
        'aggregated.tsv'
    #end if
    --output abundances_plot.pdf
    #if $plot_format.csv_meta
        --times '${plot_format.csv_meta}'
    #end if
    #if $plot_format.interval == 'MS'
        --interval MS
    #else
        --interval D
        --windowsize 70
    #end if
]]></token>
    <token name="@PLOT_AND_DASH_COMMAND@"><![CDATA[
#if $plot_format.choice == 'dash'
    @DASH_COMMAND@
#else if $plot_format.choice == 'plot'
    freyja plot
    $plot_format.lineages
    --mincov $plot_format.mincov
    #if $need_aggregation.choice == 'no'
        $tsv_aggregated
    #else
        aggregated.tsv
    #end if
    --output abundances_plot.pdf
    #if $plot_format.need_metadata.choice == 'yes'
        --times '${plot_format.need_metadata.csv_meta}'
        #if $plot_format.need_metadata.interval == 'MS'
            --interval MS
        #else
            --interval D
            --windowsize 70
        #end if
    #end if
#else if $plot_format.choice == 'plot_and_dash'
    @DASH_COMMAND@ &&
    @PLOT_COMMAND@
#end if
]]></token>
    <xml name="demixing_common_options">
        <param name="depth_file" type="data" format="tabular" label="Sequencing depth file"/>
        <conditional name="usher_update_option">
            <param name="choice" type="select" label="Source of UShER barcodes data"
                   help="Freyja ships with an usher_barcodes.csv file, which the tool can access internally. Since this file gets updated rather frequently, you can also download the latest version of the file from https://github.com/andersen-lab/Freyja/raw/main/freyja/data/usher_barcodes.csv, set the dataset's datatype to csv and use it as a custom barcodes file.">
                <option value="repo" selected="true">Use data shipped with the tool (can be
                    outdated)
                </option>
                <option value="custom">Provide a custom barcodes file</option>
                <!--<option value="update">Get updated versions of the curated lineage file as well as the UShER global phylogenetic tree (can cause tool to run slowly)</option>-->
            </param>
            <when value="repo"/>
            <when value="custom">
                <param name="usher_barcodes" type="data" format="csv" label="UShER barcodes file"/>
            </when>
            <!--<when value="update" />-->
        </conditional>
        <param argument="--meta" type="data" format="json" optional="true"
               label="Custom lineage metadata file"
               help="For additional flexibility and reproducibility of analyses, a custom lineage-to-contellation mapping metadata file can be provided."/>
        <param argument="--eps" type="float" optional="true"
               label="Minimum lineage abundance tp include"
               help="e.g. 0.0001."/>
        <param argument="--confirmedonly" type="boolean" truevalue="--confirmedonly" falsevalue=""
               checked="false"
               label="Remove unconfirmed lineages from the analysis"
               help="If the UShER tree includes proposed lineages, the --confirmedonly flag removes unconfirmed lineages from the analysis."/>
        <param argument="--wgisaid" type="boolean" truevalue="--wgisaid" falsevalue=""
               checked="false"
               label="Use larger library with non-public lineages"
               help="Allows to use larger UShER barcodes library extended with GISAID non-public lineages"/>
        <param argument="--pathogen" type="select" label="Pathogen of interest">
            <option value="SARS-CoV-2" selected="true">SARS-CoV-2</option>
            <option value="MPXV" selected="true">MPXV</option>
            <option value="H5NX" selected="true">H5NX</option>
            <option value="H1N1pdm" selected="true">H1N1pdm</option>
            <option value="FLU-B-VIC" selected="true">FLU-B-VIC</option>
            <option value="MEASLESN450" selected="true">MEASLESN450</option>
            <option value="MEASLES" selected="true">MEASLES</option>
            <option value="RSVa" selected="true">RSVa</option>
            <option value="RSVb" selected="true">RSVb</option>
        </param> 
    </xml>
    <xml name="plot_lineages">
        <param argument="--lineages" type="boolean" truevalue="--lineages" falsevalue=""
               checked="false" label="Use lineage specific breakdown"/>
    </xml>
    <xml name="plot_mincov">
        <param argument="--mincov" type="float" min="0" max="100" value="60"
               label="Minimum genome coverage"
               help="Include in the plot only samples where the 'coverage' value is greater than the specified --mincov parameter. It excludes samples with coverage values below the minimum coverage threshold. By default, the minimum genome coverage is set at 60 percent."/>
    </xml>
    <token name="@HELP_HEADER@"><![CDATA[
What it does
============

Freyja is a tool to recover relative lineage abundances from mixed SARS-CoV-2 samples from a sequencing dataset (BAM aligned to the Hu-1 reference).

General information
===================

Freyja is a tool to recover relative lineage abundances from mixed SARS-CoV-2 samples from a sequencing dataset (BAM aligned to the Hu-1 reference). The method uses lineage-determining mutational "barcodes" derived from the UShER global phylogenetic tree as a basis set to solve the constrained (unit sum, non-negative) de-mixing problem.

Freyja is intended as a post-processing step after primer trimming and variant calling in iVar (Grubaugh and Gangavaparu et al., 2019). From measurements of SNV freqency and sequencing depth at each position in the genome, Freyja returns an estimate of the true lineage abundances in the sample.
]]></token>
    <xml name="citations">
        <citations>
            <citation type="doi">10.1038/s41586-022-05049-6</citation>
        </citations>
    </xml>
</macros>