view macros.xml @ 5:6c829a430475 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_datasets commit a58a3198ea1b60b6aa9567c6c65f00f8361794f6"
author iuc
date Wed, 04 May 2022 13:15:43 +0000
parents c47a0a93ffd2
children 5a2656cc84cb
line wrap: on
line source

<macros>
    <token name="@TOOL_VERSION@">13.14.0</token>
    <token name="@PROFILE@">20.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="2021.10.8">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="dehydrated">
        <param argument="--dehydrated" type="boolean" truevalue="--dehydrated" falsevalue="" label="Download a dehydrated zip archive including the data report and locations of data files ?" help="Use the rehydrate tools to retrieve data files"/>
    </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_genome">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">
            <option value="refseq">RefSeq</option>
            <option value="genabnk">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" token_include_what="gbff" token_include_label="Include GenBank flat file sequence and annotation, if available">
        <param argument="--include-@INCLUDE_WHAT@" type="boolean" truevalue="--include-@INCLUDE_WHAT@" falsevalue="" label="@INCLUDE_LABEL@" />
    </xml>
    <xml name="includes_genome">
        <expand macro="include" include_what="gbff" include_label="Include GenBank flat file sequence and annotation, if available"/>
        <expand macro="include" include_what="gtf" include_label="Include gtf annotation file, if available"/>
    </xml>
    <xml name="exclude" token_exclude_what="gff3" token_exclude_label="Exclude gff3 annotation file" token_checked="false">
        <param argument="--exclude-@EXCLUDE_WHAT@" type="boolean" truevalue="--exclude-@EXCLUDE_WHAT@" falsevalue="" label="@EXCLUDE_LABEL@" checked="@CHECKED@"/>
    </xml>
    <xml name="excludes_genome">
        <expand macro="exclude" exclude_what="seq" exclude_label="Exclude genomic sequence file"/>
        <expand macro="exclude" exclude_what="gff3" exclude_label="Exclude gff3 annotation file"/>
        <expand macro="exclude" exclude_what="genomic-cds" exclude_label="Exclude cds from genomic sequence file"/>
        <expand macro="exclude" exclude_what="protein" exclude_label="Exclude protein sequence file"/>
        <expand macro="exclude" exclude_what="rna" exclude_label="Exclude transcript sequence file"/>
    </xml>
    <xml name="excludes_gene">
        <expand macro="exclude" exclude_what="gene" exclude_label="Exclude gene sequence file"/>
        <expand macro="exclude" exclude_what="protein" exclude_label="Exclude protein sequence file"/>
        <expand macro="exclude" exclude_what="rna" exclude_label="Exclude transcript sequence file"/>
    </xml>
    <xml name="excludes_virus_protein">
        <yield/>
        <expand macro="exclude" exclude_what="protein" exclude_label="Exclude protein sequence file"/>
        <expand macro="exclude" exclude_what="pdb" exclude_label="Exclude protein structure files (pdb)"/>
        <expand macro="exclude" exclude_what="gpff" exclude_label="Exclude protein sequence and annotation in GenPept flat file"/>
        <expand macro="exclude" exclude_what="cds" exclude_label="Exclude CDS sequence file"/>
    </xml>
    <xml name="excludes_virus_genome">
        <expand macro="excludes_virus_protein">
            <expand macro="exclude" exclude_what="seq" exclude_label="Exclude genomic sequence file"/>
        </expand>
    </xml>
    <token name="@EXCLUDES_GENOME@">$file_choices.exclude_gff3 $file_choices.exclude_genomic_cds $file_choices.exclude_protein $file_choices.exclude_rna $file_choices.exclude_seq</token>
    <token name="@EXCLUDES_GENE@">$exclude_gene $exclude_protein $exclude_rna</token>
    <token name="@EXCLUDES_VIRUS_PROTEIN@">$exclude_protein $exclude_pdb $exclude_gpff $exclude_cds</token>
    <token name="@EXCLUDES_VIRUS_GENOME@">$exclude_seq @EXCLUDES_VIRUS_PROTEIN@</token>
    <xml name="includes_virus_genome">
        <expand macro="include" include_what="gbff" include_label="Include GenBank flat file sequence and annotation"/>
    </xml>
    <token name="@INCLUDES_GENOME@">$file_choices.include_gbff $file_choices.include_gtf</token>
    <token name="@INCLUDES_VIRUS_GENOME@">$include_gbff</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)"></param>
    </xml>
    <token name="@RELEASED_BEFORE@">#if $filters.released_before:
--released-before '$filters.released_before'
#end if
    </token>
    <token name="@RELEASED_SINCE@">#if $filters.released_since:
--released-since '$filters.released_since'
#end if
    </token>
</macros>