view data_manager/data_manager_diamond_database_builder.xml @ 2:5558f74bd296 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_diamond_database_builder commit 75abf7d4b23ed7ae8abce80609d81b20bc882863"
author iuc
date Sun, 21 Mar 2021 12:07:34 +0000
parents 5a0d0bee4f8d
children 431198ad8a09
line wrap: on
line source

<tool id="diamond_database_builder" name="Diamond" tool_type="manage_data" version="0.0.3" profile="19.05">
    <description> Database builder</description>
    <requirements>
        <requirement type="package" version="2.0.8">diamond</requirement>
        <requirement type="package" version="3.7">python</requirement>
    </requirements>
    <command><![CDATA[
        python '$__tool_directory__/data_manager_diamond_database_builder.py' '${out_file}'
        #if $tax_cond.tax_select == "ncbi"
            '$tax_cond.ncbi_tax.fields.path'
        #end if
    ]]></command>
    <inputs>
        <param type="text" name="database_name" value="" label="Database name or description"
            help="This will be shown to the user in the database selectbox."/>
        <param type="text" name="database_id" value="" label="Database ID" help="This needs to be unique. No whitespaces allowed. Use underscores." />
        <conditional name="reference_source">
            <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
                <option value="ncbi">NCBI</option>
                <option value="url">URL</option>
                <option value="history" selected="true" help="Recommended to archive the original FASTA file as well.">History</option>
                <option value="directory">Directory on Server</option>
            </param>
            <when value="ncbi">
                <param type="text" name="requested_identifier" value="" label="NCBI identifier" help="e.g. nr" optional="false" />
            </when>
            <when value="url">
                <param type="text" name="user_url" value="http://" label="URLs" optional="false" />
            </when>
            <when value="history">
                <param name="input_fasta" type="data" format="fasta" label="FASTA File" multiple="false" optional="false" />
            </when>
            <when value="directory">
                <param type="text" name="fasta_filename" value="" label="Full path to FASTA File on disk" optional="false" />
                <param type="boolean" name="create_symlink" truevalue="create_symlink" falsevalue="copy_file" label="Create symlink to orignal data instead of copying" checked="false" />
            </when>
        </conditional>
        <conditional name="tax_cond">
            <param name="tax_select" type="select" label="Add taxonomic information">
                <option value="no">Do not add taxonomic information</option>
                <option value="ncbi">Use cached NCBI taxonomy</option>
                <option value="history">Use data from history</option>
            </param>
            <when value="no"/>
            <when value="ncbi">
                <param name="ncbi_tax" type="select" label="Select NCBI taxonomy">
                    <options from_data_table="ncbi_accession2taxid">
                        <filter type="sort_by" column="2"/>
                        <validator type="no_options" message="No taxonomy available"/>
                    </options>
                </param>
            </when>
            <when value="history">
                <param argument="--taxonmap" type="data" format="tabular" label="protein accession to taxid mapping file" help="" />
                <param argument="--taxonnodes" type="data" format="tabular" label="taxonomy nodes.dmp from NCBI" help="" />
                <param argument="--taxonnames" type="data" format="tabular" label="taxonomy names.dmp from NCBI" help="" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="out_file" format="data_manager_json"/>
    </outputs>
    <tests>
        <test>
            <param name="database_name" value="PhiX174"/>
            <param name="database_id" value="sequence_id"/>
            <conditional name="reference_source">
                <param name="reference_source_selector" value="history"/>
                <param name="input_fasta" value="phiX174.fasta"/>
            </conditional>
            <conditional name="tax_cond">
                <param name="tax_select" value="history"/>
                <param name="taxonmap" ftype="tabular" value="taxonomy/prot.accession2taxid" />
                <param name="taxonnodes" ftype="tabular" value="taxonomy/nodes.dmp" />
                <param name="taxonnames" ftype="tabular" value="taxonomy/names.dmp" />
            </conditional>
            <output name="out_file" value="diamond_data_manager.json"/>
        </test>
        <test>
            <param name="database_name" value="pdbaa"/>
            <param name="database_id" value="pdbaa"/>
            <conditional name="reference_source">
                <param name="reference_source_selector" value="ncbi"/>
                <param name="requested_identifier" value="pdbaa"/>
            </conditional>
            <conditional name="tax_cond">
                <param name="tax_select" value="ncbi"/>
                <param name="ncbi_tax" value="2021-03-19"/>
            </conditional>
            <output name="out_file" value="diamond_data_manager_ncbi.json"/>
        </test>
    </tests>
    <help>

.. class:: infomark

NCBI databases can be downloaded from ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/
For example the NR database can be downloaded from ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/nr.gz


- taxonmap: Path to mapping file that maps NCBI protein accession numbers to taxon ids (gzip compressed). This parameter is optional and needs to be supplied in order to provide taxonomy features. The file can be downloaded from NCBI: ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.FULL.gz

- taxonnames: Path to the names.dmp file from the NCBI taxonomy. This parameter is optional and needs to be supplied in order to provide taxonomy features. The file is contained within this archive downloadable at NCBI: ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip

- taxonnodes: Path to the nodes.dmp file from the NCBI taxonomy. This parameter is optional and needs to be supplied in order to provide taxonomy features. The file is contained within this archive downloadable at NCBI: ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdmp.zip
    </help>
    <citations>
        <citation type="doi">10.1038/nmeth.3176</citation>
    </citations>
</tool>