Extension:GbrowseImage

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
gbrowseImage

Release status: beta

px
Implementation Media, Hook
Description Creates an image from a given GBrowse in a wiki page.
Author(s) Daniel Renfro, Jim Hu (DanielRenfroTalk)
Last version 0.2 (2010-07-19)
MediaWiki 1.12+
License GPL?
Download From GitHub
Example lacZ on EcoliWiki
Tags
gbrowseImage
Hooks used
ParserFirstCallInit

Check usage (experimental)

Contents

[edit] What can this extension do?

Displays an image of a genomic region using the <gbrowseImage> tag in the wikitext of a page. Clicking the image takes the user to the underlying GBrowse instance.

[edit] Usage

Essentially, this extension is a PHP wrapper for the gbrowse_img script [1] that comes packaged with GBrowse [2].

This extension takes a set of parameters wrapped in a set of <gbrowseImage> html-style tags and create a clickable picture. Most (if not all) of the parameters are named after the equivalent gbrowse_img settings for consistency. The parameters are simple key=value pairs within the <gbrowseImage> tags.

Example:

<gbrowseImage>
name=NC_010473:430647..432578
source=ecoli_DH10B
preset=GeneLocation
</gbrowseImage>

[edit] Download instructions

Please cut and paste the code found below and place it in $IP/extensions/GBrowseImage/gbrowse_img.php. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

[edit] Installation

To install this extension, add the following to LocalSettings.php:

require_once("$IP/extensions/GBrowseImage/gbrowse_img.php");

This extension requires that the Mediawiki setting $wgAllowExternalImages be turned on. In LocalSettings.php you can add:

# Allow linking images (hot-linking)
$wgAllowExternalImages = true;


[edit] Configuration parameters

Currently none, but it would make sense for the hard-coded settings in the script to be configured via LocalSettings.php.

Note about the script: there are some constants set (around lines 54-63) that will need changing. At EcoliWiki we show 1000bp on either side of the gene. This is set by the PADDING_LENGTH constant. It can be set to 0. There are two other constants that need changing, the URLs to gbrowse and gbrowse_img, respectively.

[edit] See also

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox