Cheap, LED gel-doc using a webcam - updated
Fri, 16, 12, 2011
Alan Huett in DIY, LED, SYBR, cheap, gel-doc, webcam

A gel-doc is an essential item in any molecular biology laboratory, however a ready-made gel doc can cost a lot and will likely use UV lamps.  UV lamps are bigger and heavier than available LED technology and also may induce damage to your DNA samples, especially when using long exposures for band cutting.  Cheap blue LEDs are now widely available emitting in the 450-490 nm range and arrays of small LEDs are bright enough for gel imaging.  The blue light emitted is safe to view and does not risk DNA photodamage.

I bought a new Syngene Ultraslim LED transilluminator which has two 54 diode arrays of 470nm LEDs - this illuminates the central area very evenly.  Whilst not super-cheap, at £300 it still beats a UV transilluminator by some margin.  If you wanted to go really cheap you could get a blue LED grow light (check hydroponic suppliers) or do a full DIY installation of LEDs from an electronics supplier.

SYBR-Safe stained gel image taken with cellphone camera - note reflection due to high ambient light and original shiny base surface. Gel courtesy of Dr Bill Wickstead.The LEDs easily illuminate gels stained with SYBR-Safe or similar dyes - see the photo taken with my phone camera.  The dark orange lid filters out all the blue light, giving a really "constrasty" picture.  You can partially replicate this effect with LEE 12 (yellow) or 15 (dark yellow) filters, but you might have to stack them to get the best effect.

The built-in filter allows you to use any unfiltered camera for image capture and so we purchased a cheap webcam and fitted it into an insulated shipping box.  The white interior of the box gave us problems with stray light, leading to strong reflections of the camera on the filter glass.  Also the base of the trans was a sheet of clear acrylic over black, the shiny acrylic was also too reflective.  Gel doc showing black lining and webcam, the orange filter lid is raised.

 Both of these problems were solved by the application of matte black surfaces - black plastic card to the base of the trans (cheap, waterproof and replaceable), and matte self-adhesive vinyl to the box interior (Avery vinyl is used for sign-making and is widely available on e-Bay or at model/craft shops).  The resultant enclosure is very black and reflections are absent.

Since the webcam is a tiny, cheap sensor images are quite noisy.  However it is possible to collect images at 10 fps or higher, therefore we collect 20+ images and average them together to generate low-noise final images. This is currently accomplished using ImageJ, Virtual-Dub and the ImageJ Video capture macro.

Gel images from the final setup to follow.

Update on Fri, 5, 10, 2012 by Registered CommenterAlan Huett

Update on LED gel-doc - now with slightly easier set-up and macro goodness.

Some have expressed interest in duplicating the gel-doc system, so I thought I would give a few more details about how we get it to work in practice. Since lining the box with matte black sign writer's vinyl, we have found the black liner for the bed where the gel lies is not required (originally we used matt black plastic card).  As long as no stray light enters the box, the reflection from the base or orange lid is nearly absent.

We find that lifting the gel slightly from the base seems to give better illumination - this can be useful for band-cutting of faint bands, but doesn't matter too much for imaging. As a result you might consider keeping the gel on the tray for band cutting. However, this might mean you can't close the lid, so you may struggle to get good images like this. It might be worth getting some clear 5mm acrylic or similar cut to fit the unit if you feel this improves things for you, especially if you use lantern-slide gels or similar very thin gels.

We have customised an ImageJ plugin (the Video Capture Macro Tool) to get the best images from our webcam. This uses the same image averaging scheme as amateur astronomers have used for some time to reduce noise and artifacts from cheap sensors. The plugin opens VirtualDub and captures a stream of approximately 50 images (capture time and rate are configurable). ImageJ then imports these as a stack, drops the first 10 frames and averages the rest to a single image. As long as the gel doesn't slide, the final image is sharp and largely noise-free. The first 10 frames are discarded, since we found that our camera has a "warm-up" or dim capture phase when first initialised, so rather than try and fix this, we just cut these out.

Our modified macro is here, the instructions for use and VirtualDub installation remain the same as the non-modified version and are given in the first section of the macro text. Macro modifications were performed by renowned script wizard Bill Wickstead.

In use this is very simple, just click the icon in ImageJ and away it goes. It takes about 30 seconds to capture and process to the final image. The one slightly tricky thing is adjusting for very bright and dim bands/objects in the same capture, but this is similar on most gel-docs I have used.

Article originally appeared on The Huett Laboratory (
See website for complete article licensing information.