view macros.xml @ 10:a3395b1d871b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_datasets commit 3d012f702b54172f30a49543bf7e5fff2dd71f30
author iuc
date Mon, 21 Nov 2022 11:40:05 +0000
parents 18eed8fa7f23
children ac24fff14f23
line wrap: on
line source

<macros>
    <token name="@TOOL_VERSION@">14.3</token>
    <token name="@VERSION_SUFFIX@">0</token>
    <token name="@PROFILE@">21.01</token>
    <token name="@LICENSE@">MIT</token>
    <token name="@PROFILE_AND_LICENSE@">profile="@PROFILE@" license="@LICENSE@"</token>
    <token name="@SETUP_CERTIFICATES@"><![CDATA[
## If running in container use certificate from ca-certificates instead of outdated / missing container certificates
[ -f /usr/local/ssl/cacert.pem ] && export SSL_CERT_FILE="/usr/local/ssl/cacert.pem";
        ]]></token>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@TOOL_VERSION@">ncbi-datasets-cli</requirement>
            <requirement type="package" version="2022.9.24">ca-certificates</requirement>
            <requirement type="package" version="16.02">p7zip</requirement>
        </requirements>
    </xml>
    <xml name="annotation">
        <param argument="--annotated" type="boolean" truevalue="--annotated" falsevalue="" label="Only include genomes with annotation ?"/>
    </xml>
    <xml name="assembly_level">
        <param argument="--assembly-level" type="select" label="Restrict assemblies to a comma-separated list of one or more of these" multiple="true" optional="true">
            <option value="chromosome">Chromosome</option>
            <option value="complete">Complete Genome</option>
            <option value="contig">Contig</option>
            <option value="scaffold">Scaffold</option>
        </param>
    </xml>
    <xml name="assembly_source">
        <param argument="--assembly-source" type="select" optional="true" label="Assembly source" help="Default (nothing selected) is both " >
            <option value="refseq">RefSeq</option>
            <option value="genbank">GenBank</option>
        </param>
    </xml>
    <xml name="text_or_file" token_what="accession" token_what_extended="NCBI Assembly accession" token_help="Can be NCBI Assembly or BioProject accession">
        <conditional name="text_or_file" label="How do you want to specify the @WHAT@(s) to download">
            <param name="text_or_file" type="select" label="Enter @WHAT@ or read from file ?">
                <option value="text">Enter @WHAT@s</option>
                <option value="file">Read a list of @WHAT_EXTENDED@s from a dataset</option>
            </param>
            <when value="text">
                <param name="accession" type="text" label="Enter space separated list of @WHAT@s" help="@HELP@">
                    <yield/>
                </param>
            </when>
            <when value="file">
                <param argument="--inputfile" type="data" format="txt" label="Select dataset with list of @WHAT_EXTENDED@s" help="@HELP@"/>
            </when>
        </conditional>
    </xml>
    <xml name="chromosomes">
        <param argument="--chromosomes" type="text" label="Limit chromosomes to a comma-delimited list of chromosomes">
            <sanitizer invalid_char="">
                <valid initial="string.letters,string.digits">
                    <add value="_" />
                    <add value="." />
                    <add value="," />
                </valid>
            </sanitizer>
        </param>
    </xml>
    <xml name="include">
        <param argument="--include" type="select" multiple="true" optional="true">
            <option value="genome" selected="true">genomic sequence (genome)</option>
            <option value="rna">transcript (rna)</option>
            <option value="protein">amnio acid sequences (protein)</option>
            <option value="cds">nucleotide coding sequences (cds)</option>
            <option value="gff3">general feature file (gff3)</option>
            <option value="gtf">gene transfer format (gtf)</option>
            <option value="gbff">GenBank flat file (gbff)</option>
            <option value="seq-report">sequence report file (seq-report)</option>
        </param>
    </xml>
    <token name="@INCLUDE@"><![CDATA[
        --include
        #if $file_choices.include
            #echo ",".join($file_choices.include)
        #else
            none
        #end if
    ]]></token>
    <xml name="released_options" token_released_what="genomes" token_before_or_after="before">
        <param argument="--released-@BEFORE_OR_AFTER@" type="text" optional="true" label="Only include @RELEASED_WHAT@ that have been released @BEFORE_OR_AFTER@ a specified date (MM/DD/YYYY)">
            <validator type="regex" message="enter a date in the form MM/DD/YYYY">[0-9]{2}/[0-9]{2}/[0-9]{4}</validator>
        </param>
    </xml>
    <token name="@RELEASED_BEFORE@">#if $filters.released_before:
--released-before '$filters.released_before'
#end if
    </token>
    <token name="@RELEASED_AFTER@">#if $filters.released_after:
--released-after '$filters.released_after'
#end if
    </token>

    <xml name="genome_fasta_assert" tokens="el1,el2,expression" token_expression_n="1">
        <element name="@EL1@">
            <element name="@EL2@">
                <assert_contents>
                    <has_text_matching expression="@EXPRESSION@" n="@EXPRESSION_N@"/>
                </assert_contents>
            </element>
        </element>
    </xml>
</macros>