view elink.xml @ 8:c75419361087 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit 41f5eb8e0aee5b779d618b5178098c4be89a9ef1
author iuc
date Mon, 23 Jan 2023 10:37:25 +0000
parents e4f8623b8b9b
children bb5af69cf3f7
line wrap: on
line source

<?xml version="1.0"?>
<tool id="ncbi_eutils_elink" name="NCBI ELink" version="@WRAPPER_VERSION@" profile="@PROFILE@">
  <description>link UIDs from one database to another</description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements"/>
  <version_command>python elink.py --version</version_command>
  <command detect_errors="aggressive"><![CDATA[
python '$__tool_directory__/elink.py'

@LINK_TOKEN@

@EMAIL_ARGUMENTS@

@LIST_OR_HIST@

> $default]]></command>
  <inputs>
    <expand macro="list_or_hist"/>
    <expand macro="linkmacro"/>
  </inputs>
  <outputs>
    <data format="xml" name="default" label="NCBI ${cmd.cmd_select} Links From ${cmd.db_from_link.db_select_from_link} To ${cmd.db_from_link.db_to.db_select_to} Via ${cmd.db_from_link.db_to.linkname}">
      <change_format>
        <when input="cmd.output_format" value="xml" format="xml" />
        <when input="cmd.output_format" value="json" format="json" />
        <when input="cmd.output_format" value="text" format="tabular" />
      </change_format>
      <filter>query_source['qss'] != 'history_json' and query_source['qss'] != 'history_xml'</filter>
    </data>
    <collection name="linksets" type="list" label="NCBI ${cmd.cmd_select} Links From ${cmd.db_from_link.db_select_from_link} To ${cmd.db_from_link.db_to.db_select_to} Via All">
      <discover_datasets pattern="__designation_and_ext__" directory="downloads"/>
      <filter>query_source['qss'] == 'history_json' or query_source['qss'] == 'history_xml'</filter>
    </collection>
  </outputs>
  <tests>
    <test expect_num_outputs="1">
      <param name="cmd_select" value="neighbor"/>
      <param name="db_select_to" value="pubmed"/>
      <param name="db_select_from_link" value="taxonomy"/>
      <param name="qss" value="id_list"/>
      <param name="id_list" value="510899"/>
      <param name="output_format" value="xml"/>
      <param name="linkname" value="None"/>
      <output name="default" file="pm-tax-neighbor.xml" ftype="xml"/>
    </test>
    <test expect_num_outputs="1">
      <param name="cmd_select" value="neighbor"/>
      <param name="db_select_to" value="nuccore"/>
      <param name="db_select_from_link" value="gene"/>
      <param name="qss" value="id_xml"/>
      <param name="id_xml" value="elink.esearch_in_xmlid.xml"/>
      <param name="output_format" value="text"/>
      <param name="linkname" value="gene_nuccore"/>
      <output name="default" ftype="tabular">
        <assert_contents>
          <has_line line="1899688395"/>
          <has_line line="1896832511"/>
        </assert_contents>
      </output>
    </test>
    <test expect_num_outputs="1">
      <param name="cmd_select" value="neighbor"/>
      <param name="db_select_to" value="nuccore"/>
      <param name="db_select_from_link" value="gene"/>
      <param name="qss" value="id_json"/>
      <param name="id_json" value="elink.esearchin_id.json"/>
      <param name="output_format" value="json"/>
      <param name="linkname" value="None"/>
      <output name="default" ftype="json">
        <assert_contents>
          <has_text text="gene_nuccore_refseqrna"/>
          <has_text text="gene_nuccore"/>
          <has_text text="1899688395"/>
        </assert_contents>
      </output>
    </test>
    <test expect_num_outputs="1">
      <param name="cmd_select" value="neighbor"/>
      <param name="db_select_to" value="nuccore"/>
      <param name="db_select_from_link" value="gene"/>
      <param name="qss" value="id_file"/>
      <param name="id_file" value="elink.esearchin_id.tabular"/>
      <param name="output_format" value="xml"/>
      <param name="linkname" value="gene_nuccore_refseqrna"/>
      <output name="default" file="elink.esearchin_id_1link.xml" ftype="xml"/>
    </test>
    <test expect_num_outputs="1">
      <param name="cmd_select" value="neighbor_history"/>
      <param name="db_select_to" value="gene"/>
      <param name="db_select_from_link" value="nuccore"/>
      <param name="qss" value="id_json"/>
      <param name="id_json" value="elink.elinkin_1link.json"/>
      <param name="output_format" value="json"/>
      <param name="linkname" value="nuccore_gene"/>
      <output name="default" file="elink.elinkin_1link_hist.json" ftype="json" lines_diff="2"/>
    </test>
    <test expect_num_outputs="1">
      <param name="cmd_select" value="neighbor_history"/>
      <param name="db_select_to" value="gene"/>
      <param name="db_select_from_link" value="nuccore"/>
      <param name="qss" value="id_xml"/>
      <param name="id_xml" value="elink.elinkin_alllinks_id.xml"/>
      <param name="output_format" value="xml"/>
      <param name="linkname" value="nuccore_gene"/>
      <output name="default" file="elink.elinkin_allalllinks_id.xml" ftype="xml" lines_diff="2"/>
    </test>
    <test expect_num_outputs="1">
      <param name="cmd_select" value="neighbor_score"/>
      <param name="db_select_to" value="gene"/>
      <param name="db_select_from_link" value="nuccore"/>
      <param name="qss" value="id_list"/>
      <param name="id_list" value="1899688395"/>
      <param name="output_format" value="text"/>
      <param name="linkname" value="nuccore_gene"/>
      <output name="default" file="elink.elinkin_1link_id.tabular" ftype="tabular"/>
    </test>
  </tests>
  <help><![CDATA[
NCBI Entrez ELink
=================

Responds to a list of UIDs in a given database with either a list of related
UIDs (and relevancy scores) in the same database or a list of linked UIDs in
another Entrez database; checks for the existence of a specified link from a
list of one or more UIDs; creates a hyperlink to the primary LinkOut provider
for a specific UID and database, or lists LinkOut URLs and attributes for
multiple UIDs.

Commands
--------

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

Link from protein to gene

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| From NCBI Database   | Protein                              |
+----------------------+--------------------------------------+
| Elink Command        | Neighbor                             |
+----------------------+--------------------------------------+
| To NCBI Database     | Gene                                 |
+----------------------+--------------------------------------+
| ID List              | 15718680 157427902                   |
+----------------------+--------------------------------------+

Find related articles to PMID 20210808 with scores

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| From NCBI Database   | PubMed                               |
+----------------------+--------------------------------------+
| Elink Command        | Scored Neighbors                     |
+----------------------+--------------------------------------+
| To NCBI Database     | PubMed                               |
+----------------------+--------------------------------------+
| ID List              | 20210808                             |
+----------------------+--------------------------------------+

List all possible links from two protein GIs

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| From NCBI Database   | Protein                              |
+----------------------+--------------------------------------+
| Elink Command        | ACheck                               |
+----------------------+--------------------------------------+
| ID List              | 15718680 157427902                   |
+----------------------+--------------------------------------+

List all possible links from two protein GIs to PubMed

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| From NCBI Database   | Protein                              |
+----------------------+--------------------------------------+
| Elink Command        | ACheck                               |
+----------------------+--------------------------------------+
| To NCBI Database     | PubMed                               |
+----------------------+--------------------------------------+
| ID List              | 15718680 157427902                   |
+----------------------+--------------------------------------+

Check whether two nuccore sequences have "related sequences" links.

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| From NCBI Database   | Nuccore                              |
+----------------------+--------------------------------------+
| Elink Command        | NCheck                               |
+----------------------+--------------------------------------+
| ID List              | 21614549 219152114                   |
+----------------------+--------------------------------------+

List the LinkOut URLs for non-library providers for two pubmed abstracts.

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| From NCBI Database   | Pubmed                               |
+----------------------+--------------------------------------+
| Elink Command        | Links                                |
+----------------------+--------------------------------------+
| ID List              | 19880848 19822630                    |
+----------------------+--------------------------------------+

Find links to full text providers for two PubMed abstracts.

+----------------------+--------------------------------------+
| Parameter            | Value                                |
+======================+======================================+
| From NCBI Database   | Pubmed                               |
+----------------------+--------------------------------------+
| Elink Command        | Provider Links                       |
+----------------------+--------------------------------------+
| ID List              | 19880848 19822630                    |
+----------------------+--------------------------------------+

@REFERENCES@

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