Daniel Renfro
unread,Apr 21, 2011, 1:29:09 AM4/21/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dan Bolser, BioWiki, Gbrowse (E-mail), d...@lists.open-bio.org, Semantic MediaWiki Users
Dan,
Last year I wrote a MediaWiki extension for EcoliWiki that does just that: creates an image from gbrowse in a wiki page. Essentially it is a PHP wrapper for the gbrowse_img script that comes packaged with gbrowse. (
gbrowse_img documentation at EcoliWiki )
Attached is the gbrowse_img.php script. This extension requires that the Mediawiki setting
$wgAllowExternalImages be turned on. In LocalSettings.php you can add:
# Allow linking images (hot-linking)
$wgAllowExternalImages = true;
Then you can display an image by putting an HTML-like tag in the wikitext of a page. Most (if not all) of the parameters are named the same thing in gbrowse_img (for consistency.) The parameters are simple key=value pairs within the <tags>. See the script for all the available parameters. Example:
<gbrowseImage>
name=NC_010473:430647..432578
source=ecoli_DH10B
preset=GeneLocation
</gbrowseImage>
Also, a word about the script: there are some constants set (around lines 54-63) that will need changing. At EcoliWiki we wanted to show +/-1000bp on either side of the gene/feature, this is set by the
PADDING_LENGTH constant. It can be set to 0. There are two other constants that need changing...URLs to gbrowse and gbrowse_img, respectively.
I have added a section (lines ~224-333) for creating presets (sets of options that always go together.) If anyone is interested or wants more information feel free to email me off-list.
-Daniel
http://ecoliwiki.net/User:DanielRenfroHu Lab Research Associate
979-862-4055