view esearch.xml @ 4:95b5c34650b6 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_direct commit 1f7b04db717bd82f93519fdc3f34f589bb671e48
author iuc
date Mon, 29 Jul 2024 07:07:19 +0000
parents f6046ed1f915
children
line wrap: on
line source

<tool id="ncbi_entrez_direct_esearch" name="NCBI ESearch" version="@TOOL_VERSION@">
    <description>search NCBI Databases by text query</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <version_command>esearch -version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        @ECONTACT@
        esearch
        -db '${db.db}'
        -sort '${db.sort}'
        -query '${query}'
        ${spell}
        #if $date.constraint:
            -datetype $date.datetype
            #if str( $date.days ):
                -days '${date.days}'
            #end if
            #if str( $date.mindate ):
                -mindate '${date.mindate}'
            #end if
            #if str( $date.maxdate ):
                -maxdate '${date.maxdate}'
            #end if
        #end if
        > '$output_xml'
  ]]>
  </command>
    <inputs>
        <conditional name="db">
            <param argument="-db" type="select" label="Choose your DB">
                <option value="annotinfo">annotinfo</option>
                <option value="assembly">assembly</option>
                <option value="bioproject">bioproject</option>
                <option value="biosample">biosample</option>
                <option value="biosystems">biosystems</option>
                <option value="blastdbinfo">blastdbinfo</option>
                <option value="books">books</option>
                <option value="cdd">cdd</option>
                <option value="clinvar">clinvar</option>
                <option value="clone">clone</option>
                <option value="dbvar">dbvar</option>
                <option value="gap">gap</option>
                <option value="gapplus">gapplus</option>
                <option value="gds">gds</option>
                <option value="gencoll">gencoll</option>
                <option value="gene">gene</option>
                <option value="genome">genome</option>
                <option value="geoprofiles">geoprofiles</option>
                <option value="grasp">grasp</option>
                <option value="gtr">gtr</option>
                <option value="homologene">homologene</option>
                <option value="medgen">medgen</option>
                <option value="mesh">mesh</option>
                <option value="ncbisearch">ncbisearch</option>
                <option value="nlmcatalog">nlmcatalog</option>
                <option value="nuccore">nuccore</option>
                <option value="nucest">nucest</option>
                <option value="nucgss">nucgss</option>
                <option value="nucleotide">nucleotide</option>
                <option value="omim">omim</option>
                <option value="orgtrack">orgtrack</option>
                <option value="pcassay">pcassay</option>
                <option value="pccompound">pccompound</option>
                <option value="pcsubstance">pcsubstance</option>
                <option value="pmc">pmc</option>
                <option value="popset">popset</option>
                <option value="probe">probe</option>
                <option value="protein">protein</option>
                <option value="proteinclusters">proteinclusters</option>
                <option value="pubmed">pubmed</option>
                <option value="pubmedhealth">pubmedhealth</option>
                <option value="seqannot">seqannot</option>
                <option value="snp">snp</option>
                <option value="sra">sra</option>
                <option value="structure">structure</option>
                <option value="taxonomy">taxonomy</option>
                <option value="unigene">unigene</option>
            </param>
            <when value="annotinfo">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="assembly">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="bioproject">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="biosample">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="biosystems">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="blastdbinfo">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="books">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="cdd">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="clinvar">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="clone">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="dbvar">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="gap">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="gapplus">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="gds">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="gencoll">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="gene">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="genome">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="geoprofiles">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="grasp">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="gtr">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="homologene">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="medgen">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="mesh">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="ncbisearch">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="nlmcatalog">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="nuccore">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="nucest">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="nucgss">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="nucleotide">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="omim">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="orgtrack">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="pcassay">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="pccompound">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="pcsubstance">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="pmc">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="popset">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="probe">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="protein">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="proteinclusters">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="pubmed">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="pubmedhealth">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="seqannot">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="snp">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="sra">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="structure">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="taxonomy">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
            <when value="unigene">
                <param argument="-sort" type="select" label="Sort results by">
                    <option value="Default Order">Default Order</option>
                </param>
            </when>
        </conditional>
        <param argument="-query" type="text" label="Search Term">
            <sanitizer>
                <valid>
                    <add value="'"/>
                    <add value="["/>
                    <add value="]"/>
                </valid>
            </sanitizer>
        </param>
        <param argument="-spell" type="boolean" truevalue="-spell" falsevalue="" checked="false" label="Correct misspellings in query"/>
        <conditional name="date">
            <param name="constraint" type="select" label="Filter By Date">
                <option value="True">Filter by date</option>
                <option value="False">Don't filter</option>
            </param>
            <when value="True">
                <param name="datetype" type="select" label="Date type">
                    <option value="PDAT">Publish Date</option>
                    <option value="EDAT">Entrez Date</option>
                    <option value="MDAT">Modification Date</option>
                </param>
                <param name="days" type="integer" min="1" value="" optional="True" label="Number of days in the past"/>
                <param name="mindate" type="text" label="Minimum date" help="YYYY, YYYY/MM, or YYYY/MM/DD"/>
                <param name="maxdate" type="text" label="Maximum date" help="YYYY, YYYY/MM, or YYYY/MM/DD"/>
            </when>
            <when value="False"/>
        </conditional>
    </inputs>
    <outputs>
        <data format="xml" name="output_xml" label="ESearch Results for $query"/>
    </outputs>
    <tests>
        <test>
            <param name="db" value="sra"/>
            <param name="query" value="SRP000007"/>
            <output name="output_xml">
                <assert_contents>
                    <has_text_matching expression="ENTREZ_DIRECT"/>
                    <has_text_matching expression="sra"/>
                    <has_text_matching expression="WebEnv"/>
                    <has_text_matching expression="QueryKey"/>
                    <has_text_matching expression="Count"/>
                    <has_text_matching expression="Step"/>
                    <has_text_matching expression="WebEnv"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
NCBI Entrez ESearch
===================

Responds to a text query with the list of matching UIDs in a given database
(for later use in ESummary, EFetch or ELink), along with the term translations
of the query.

Example Queries
---------------

Search in PubMed with the term cancer for abstracts that have an Entrez date
within the last 60 days:

+----------------------+-------------+
| Parameter            | Value       |
+======================+=============+
| NCBI Database to Use | PubMed      |
+----------------------+-------------+
| Term                 | Cancer      |
+----------------------+-------------+
| Datetype             | Entrez Date |
+----------------------+-------------+
| In past N Days       | 60          |
+----------------------+-------------+

Search PubMed Central for free full text articles containing the query stem cells:

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| NCBI Database to Use | PubMedCentral                        |
+----------------------+--------------------------------------+
| Term                 | Stem Cells AND free fulltext[filter] |
+----------------------+--------------------------------------+

Search in Nucleotide for all tRNAs:

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| NCBI Database to Use | Nucleotide                           |
+----------------------+--------------------------------------+
| Term                 | biomol trna[prop]                    |
+----------------------+--------------------------------------+

Search in Protein for a molecular weight range:

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| NCBI Database to Use | Protein                              |
+----------------------+--------------------------------------+
| Term                 | 70000:90000[molecular weight]        |
+----------------------+--------------------------------------+

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