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.
Category:Extensions by WikiTeq Category:Extensions without an imageCategory:Extensions with invalid or missing typeCategory:MIT licensed extensions
MediaWiki extensions manual
NCBITaxonomyLookup
Release status: stableCategory:Stable extensions
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.Category:Extensions with long-term support release branches compatibility policy
MediaWiki 1.35+Category:Extensions with manual MediaWiki version
Database changes No
License MIT License
Download Category:Extensions in Wikimedia version control
  • $wgNCBITaxonomyLookupApiURL
  • $wgNCBITaxonomyLookupCacheTTL
  • $wgNCBITaxonomyLookupCacheRandomizeTTL
  • $wgNCBITaxonomyApiTimeoutFallbackToCache
  • $wgNCBITaxonomyApiTimeout
  • $wgNCBITaxonomyApiKey
Quarterly downloads 0
Translate the NCBITaxonomyLookup extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions

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

This extension was created for WikiWorks.

Installation

  • 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 T173141 for potential complications.)Category:Extensions requiring Composer with git
  • 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.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

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

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}}
Category:All extensions Category:Extensions by WikiTeq Category:Extensions in Wikimedia version control Category:Extensions requiring Composer with git Category:Extensions with invalid or missing type Category:Extensions with long-term support release branches compatibility policy Category:Extensions with manual MediaWiki version Category:Extensions without an image Category:MIT licensed extensions Category:ParserFirstCallInit extensions Category:Stable extensions