view nextclade.xml @ 3:3b75d5285aff draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/nextclade commit 7a13866c45dba2337fc37d66c45c77ac73915690"
author iuc
date Mon, 07 Jun 2021 12:39:36 +0000
parents 6cd62b6d2b5c
children b74b9a7b3e3b
line wrap: on
line source

<tool id="nextclade" name="Nextclade" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
    <description></description>
    <macros>
        <import>macros.xml</import>
        <token name="@TOOL_VERSION@">0.14.4</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">nextclade_js</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        nextclade
        --input-fasta '${input_fasta}'
        #if $outputs and "report_tsv" in $outputs
            #if $include_header
                --output-tsv '$report_tsv'
            #else
                --output-tsv report.tsv
            #end if
        #end if 
        #if $outputs and "report_json" in $outputs
            --output-json '${report_json}'
        #end if 
        #if $outputs and "output_tree" in $outputs
            --output-tree '${output_tree}'
        #end if
        #if str($adv.advanced_options) == "yes"
            #if $adv.input_qc_config
                --input-qc-config '${adv.input_qc_config}'
            #end if
            #if $adv.input_root_seq
                --input-root-seq '${adv.input_root_seq}'
            #end if
            #if $adv.input_tree
                --input-tree '${adv.input_tree}'
            #end if
            #if $adv.input_gene_map
                --input-gene-map '${adv.input_gene_map}'
            #end if 
            #if $adv.input_pcr_primers
                --input-pcr-primers '${adv.input_pcr_primers}'
            #end if
        #end if
        #if $outputs and "report_tsv" in $outputs and not $include_header
            && tail -n+2 report.tsv >'$report_tsv'
        #end if 
    ]]></command>
    <inputs>
        <param argument="--input-fasta" name="input_fasta" type="data" format="fasta" label="SARS-CoV-2 consensus sequences (FASTA)" />
        <param name="outputs" type="select" label="Output options" help="Output reports and optionally tree" multiple="true">
            <option value="report_json">JSON format report</option>
            <option value="report_tsv" selected="true">Tabular format report</option>
            <option value="output_tree">Auspice v2 tree file (JSON format)</option>
        </param>
        <param name="include_header" type="boolean" label="Include header line in output file" 
            truevalue="true" falsevalue="false" />        
        <conditional name="adv">
            <param name="advanced_options" type="select" label="Use advanced options" >
                <option value="yes">Yes</option>
                <option value="no" selected="true">No</option>
            </param>
            <when value="yes">
                <param argument="--input-qc-config" name="input_qc_config" type="data" label="Quality Control (QC) Config file" format="json" optional="true" help="QC config json file containing custom QC configuration" />
                <param argument="--input-root-seq" name="input_root_seq" type="data" label="Custom root sequence" format="txt" optional="true" help="Text file containing custom root sequence" />
                <param argument="--input-tree" name="input_tree" type="data" label="Custom reference tree" format="json" optional="true" help="Auspice JSON v2 file containing custom reference tree" />
                <param argument="--input-gene-map" name="input_gene_map" type="data" label="Custom gene map" format="json" optional="true" help="JSON file containing custom gene map. Gene map (sometimes also called 'gene annotations') is used to resolve aminoacid changes in genes" />
                <param argument="--input-pcr-primers" name="input_pcr_primers" type="data" label="Custom PCR primer sites" format="json" optional="true" help="CSV file containing a list of custom PCR primer sites. These are used to report mutations in these sites" />
            </when>
            <when value="no">
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="report_tsv" format="tabular" label="${tool.name} on ${on_string} (TSV report)">            
            <filter>outputs and "report_tsv" in outputs</filter>
            <actions>
                <action name="column_names" type="metadata" default="seqName,clade,qc.overallScore,qc.overallStatus,totalGaps,totalInsertions,totalMissing,totalMutations,totalNonACGTNs,totalPcrPrimerChanges,substitutions,deletions,insertions,missing,nonACGTNs,pcrPrimerChanges,aaSubstitutions,totalAminoacidSubstitutions,aaDeletions,totalAminoacidDeletions,alignmentEnd,alignmentScore,alignmentStart,qc.missingData.miss
                ingDataThreshold,qc.missingData.score,qc.missingData.status,qc.missingData.totalMissing,qc.mixedSites.mixedSitesThreshold,qc.mixedSites.score,qc.mixedSites.status,qc.mixedSit
                es.totalMixedSites,qc.privateMutations.cutoff,qc.privateMutations.excess,qc.privateMutations.score,qc.privateMutations.status,qc.privateMutations.total,qc.snpClusters.clus
                teredSNPs,qc.snpClusters.score,qc.snpClusters.status,qc.snpClusters.totalSNPs,errors" />
            </actions>
        </data>
        <data name="report_json" format="json" label="${tool.name} on ${on_string} (JSON report)">
            <filter>outputs and "report_json" in outputs</filter>
        </data>
        <data name="output_tree" format="json" label="${tool.name} on ${on_string} (Auspice v2 tree)">
            <filter>outputs and "output_tree" in outputs</filter>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input_fasta" value="sarscov2_1.fasta" ftype="fasta" />
            <param name="outputs" value="report_tsv" />
            <output name="report_tsv">
                <assert_contents>
                    <has_n_columns n="41" />
                    <has_text text="20A" />
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="3">
            <param name="input_fasta" value="sarscov2_1.fasta" ftype="fasta" />
            <param name="outputs" value="report_tsv,report_json,output_tree" />
            <output name="report_tsv">
                <assert_contents>
                    <has_n_columns n="41" />
                    <has_text text="20A" />
                </assert_contents>
            </output>
            <output name="report_json">
                <assert_contents>
                    <has_text text='"pos": 240,' />
                </assert_contents>
            </output>
            <output name="output_tree">
                <assert_contents>
                    <has_text text='"build_url": "https://github.com/nextstrain/nextclade"' />
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <param name="input_fasta" value="sarscov2_1.fasta" ftype="fasta" />
            <param name="outputs" value="report_tsv" />
            <conditional name="adv">
                <param name="advanced_options" value="yes" />
                <param name="input_qc_config" value="strict_qc.json" ftype="json" />
            </conditional>
            <output name="report_tsv">
                <assert_contents>
                    <has_n_columns n="41" />
                    <has_text text="mediocre" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

.. class:: infomark

**What it does**

Nextclade_ assigns clades, calls mutations and performs sequence quality checks on SARS-CoV-2 genomes.

**Input**

Input is a FASTA file containing one or more SARS-CoV-2 consensus genomes.

**Output**

Outputs can include:

* A tabular format file with a report, one line per input sequence

* A JSON format file with the same information as is present in the tabular report

* An Auspice v2 tree file in JSON format

.. _Nextclade: https://github.com/nextstrain/nextclade

    ]]></help>
    <expand macro="citations" />
</tool>