GBrowse within MediaWiki?

7 views
Skip to first unread message

Dan Bolser

unread,
Apr 20, 2011, 8:46:45 PM4/20/11
to BioWiki, Gbrowse (E-mail), d...@lists.open-bio.org, Semantic MediaWiki Users
Sorry for cross posting, hopefully these lists are largely orthogonal,

At some point I remember seeing a demonstration of a GBrowse embedded
within a MediaWiki page. Can anyone point me at that work?
Unfortunately, this search http://goo.gl/kZXoU doesn't turn up
anything :-/


Cheers,
Dan.

Daniel Renfro

unread,
Apr 21, 2011, 1:29:09 AM4/21/11
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:DanielRenfro
Hu Lab Research Associate
979-862-4055

--
BioWiki mailing list:
biow...@googlegroups.com

Subscription & archives:
http://groups.google.com/group/biowiki-l

Unsubscribe:
biowiki-l+...@googlegroups.com

gbrowse_img.php
Reply all
Reply to author
Forward
0 new messages