Extension:NCBITaxonomyLookup

This extension is professionally maintained by the WikiTeq team.
WikiTeq provides official support for MediaWiki LTS releases only. It may work with other MediaWiki releases.
MediaWiki extensions manual
NCBITaxonomyLookup
Release status: stable
Description Pulls data from the NCBI taxonomy API into wiki pages
Author(s) Vedmaka
Maintainer(s) WikiTeq team
Latest version 1.1 (2023-05-12)
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki 1.35+
Database changes No
License MIT License
Download

  • $wgNCBITaxonomyLookupApiURL
  • $wgNCBITaxonomyLookupCacheTTL
  • $wgNCBITaxonomyLookupCacheRandomizeTTL
  • $wgNCBITaxonomyApiTimeoutFallbackToCache
  • $wgNCBITaxonomyApiTimeout
  • $wgNCBITaxonomyApiKey
Quarterly downloads 1 (Ranked 148th)
Translate the NCBITaxonomyLookup extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The NCBITaxonomyLookup extension allows querying the NCBI taxonomy database and pulling the information into wiki pages.

This extension was created for WikiWorks.

Installation edit

  • Download and move the extracted NCBITaxonomyLookup folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NCBITaxonomyLookup
  • Only when installing from Git, run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory. (See task T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'NCBITaxonomyLookup' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration edit

This extension has the following configuration parameters:

  • $wgNCBITaxonomyLookupApiURL - NCBI API URL (defaults to https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi)
  • $wgNCBITaxonomyLookupCacheTTL - Query cache TTL (default: 0)
  • $wgNCBITaxonomyLookupCacheRandomizeTTL - Set to true to randomize the TTL for each cache entry to prevent server overload if all items expire simultaneously
  • $wgNCBITaxonomyApiTimeoutFallbackToCache - Fallback to cached value if the remote is unavailable or failed to be fetched
  • $wgNCBITaxonomyApiTimeout - Timeout for API queries (default: 60)
  • $wgNCBITaxonomyApiKey - API key

Usage edit

Use the #taxonomy parser function to query specific taxonomy item fields:

  • 1st parameter is the subject taxonomy ID
  • 2nd parameter is the XML path to query against
{{#taxonomy:8371|Taxon/TaxId}} <!-- fetches the TaxId of the 8371 taxonomy item -->

Other examples:

{{#taxonomy:8371|Taxon/Lineage}}
{{#taxonomy:8371|Taxon/Rank}}
{{#taxonomy:8371|Taxon/ScientificName}}
{{#taxonomy:8371|Taxon/OtherNames/GenbankCommonName}}