Wednesday, June 11, 2008

Another thing I wish I would have known about six years ago

NOAA Coastline Extractor

This is a page that will generate a line drawing of a section of coast that you're interested in. Very handy for making maps and figures. You just specify the lat-lon area you're interested in, and it will return a data file for use in Matlab or ArcGIS etc, and a line drawing that you can save and use.

I found this through a page at Wood's Hole/USGS with a number of handy scripts for Matlab
Main page
including
the air-sea toolbox in particular.

An alternative option is this whole package:
M_map by Rich Pawlowicz

Sunday, May 04, 2008

Making EndNote X1 work again, sort of...

While trying to format the bibliography of my thesis recently, EndNote managed to hang and crash Word 2007. When I restarted Word, the EndNote tab was nowhere to be seen. The EndNote Cite While You Write Add-in had been disabled by Word due to its malfunction. Re-enabling the CWYW Add-in takes just a few steps. This only applies to Word 2007 for Windows, not earlier versions.

Start by clicking on the "Office" button in the top left corner of the Word2007 window (The fact that Microsoft elected to make that thing act as a button, with no label of any sort, is a topic for another rant). Under the Office button menu, click on "Word Options" at the bottom of the menu. That opens up the Word Options window. Click on "Add-ins" to get the following window:


At the bottom of the list of Add-Ins, under "Disabled Application Add-Ins", you can see the Cite While You Write add-in. To re-enable this, go to the Manage: menu just below. Change the menu from "COM Add-ins" to "Disabled Items"



Click Go, and you'll get a new little window like below:

Click on the "Add-in: cite while you write (endnote cwyw.dll)" and then hit Enable.

After doing that, shut down Word 2007 and restart. The EndNote tab should re-appear and work like normal.

____________________________________________________________________________

One other note. EndNoteX1 (or the patched X1.0.1) simply does not work with Word 2007 if you're running a 64-bit Vista install. This issue is buried deep in the EndNote help pages somewhere and isn't really described well. The simple answer is that you cannot format a bibliography in Word 2007 with EndNote X1 on 64-bit Vista. EndNote will hang, Word will crash, and you won't get your bibliography. EndNote seems to work inside Word 2007 on any other operating system version (XP, Vista x32 etc), just not x64 Vista. In essence, there's no reason to even enable the Cite While You Write functionality if you're running the X1,Word2007,Vista x64 combination. You can probably get away with saving your Word 2007 document with temporary citations as a .rtf Rich Text File, and then generate the bibliography from inside EndNote (under the Tools>Format Paper>Format Paper menu item).

Thomson Scientific says that EndNote will have full functionality with Word 2007 on 64-bit operating systems when they release EndNote X2 in six weeks. It remains to be seen how much Thomson will be charging me to upgrade my non-functional X1 install to X2.

Saturday, April 26, 2008

Plastic calipers: close but no cigar


There are certain situations in life where a set of digital calipers or dial calipers just won't cut it. With the advent of cheap digital calipers, it has become more reasonable to take these instruments into conditions where they may get splashed, knowing that they can be easily replaced should you accidentally drop them in a tidepool. Still, in some cases it's nice to be able to use a set of vernier calipers sometimes, especially when you know you'll be getting splashed or submerging the calipers.

It used to be the case that you could find relatively affordable, high quality plastic vernier calipers. Plastic is nice since it won't rust, and you're less likely to shove the tips of the jaws through your arm accidentally, like you might with metal calipers. Unfortunately, you're hard-pressed to find a vendor for quality plastic vernier calipers these days. You can get stainless steel verniers, for a price, and they're still a danger to you when you're slipping and sliding around in the field.

As with so many other products, the Chinese have stepped up to the plate and started making plastic vernier calipers, such as those pictured above. These calipers are available from Harbor Freight, in this case they are part number 7914, and they cost about $2. They're dirt cheap, but are they any good? I ordered two sets to find out.

First off, the build quality is as you would expect: abysmal. They're light and flimsy, and there is a ton of play between the main body and the sliding jaw. That's acceptable though, as long as they're somewhat accurate. Unfortunately, they're even a bit lacking in that department.

I started by measuring an iButton I had laying on my desk, using a Mitutoyo digital micrometer, with a resolution of 0.001 mm. The diameter of the iButton was 16.282 mm. I then measured the iButton with a pair of cheap 6" digital calipers from Harbor Freight (part number 47257 on their website). These calipers, which retail for about $20, measured the diameter of the iButton at 16.28 mm, as close as you can get given their resolution of 0.01 mm.


The digital calipers do a perfectly acceptable job of measuring the iButton accurately and repeatably. Next I dug out my trusty set of plastic vernier calipers (that you can no longer buy). These vernier calipers only have a resolution of +/- 0.05 mm, which is the typical standard for vernier calipers. They returned a diameter of 16.25 mm, as accurate as you can expect to be with these calipers (a reading of 16.25 or 16.30 would be acceptable).


Lastly, the new "Cen-Tech" plastic vernier calipers come out. They have a resolution of 0.05 mm just like the vernier calipers above. They produced a measurement of 16.20 mm, and this measurement wasn't particularly repeatable. Sometimes it was as low as 16.15 mm.


In use, these calipers have two glaring problems. 1. They're not particularly accurate, or repeatable. 2. They're a pain to read because of poor design. In the picture below, I've put a blue arrow on the marks that look the most lined up to my eye. It's a bit of a chore to decide this though, because of the large gap between the ends of the vernier markings, which I've illustrated with the red lines.


If you look back at my old set of plastic calipers above, you can see that the marks on the main body and sliding jaw meet up, making it easy to decide which pair of marks is most in line. The Cen-Tech calipers are poorly made in this respect. The additional problem of the sloppy fit between the main caliper body and the sliding jaw exacerbates the reading difficulties.

Ultimately, the points I've raised here only matter if you're trying to be very accurate with your measurements. If you only want to get within 1 mm of the true dimension, these calipers will work fine. Even if you can get away with an accuracy of +/- 0.5 mm, these will be fine. But if you're hoping for accuracy at the 0.1 mm or 0.05 mm scale, these won't cut it.

Saturday, April 19, 2008

Rolling your own thermocouples


One of the common tools that researchers use to measure temperatures of objects or organisms is the electronic thermocouple. For a few hundred dollars you can have a handheld electronic thermocouple reader and flexible thermocouple leads. The thermocouple readers are quite durable and last for years. On the other hand, the thermocouple wires eventually break after lots of usage. Most people purchase pre-made thermocouples from a source such as Omega Engineering primarily for the convenience/cost tradeoff. However, it is fairly easy, if somewhat time consuming, to make and repair your own thermocouple leads using supplies from Omega, which can save money in the long run compared to purchasing new thermocouple leads every time you break one. This tutorial is based around the assumption that you have one of the typical Omega handheld thermometers (pictured above) and use T-type thermocouples with “miniature” connectors.


If you or your lab have standardized on some other type of thermocouple, maybe K or J type, perhaps using “standard” round-pin connectors, you can still use the same principles described here, but the part numbers will differ.

When I aim to measure temperatures of inverts and algae, rock temperature, or the air temperature in the field, I use T-type thermocouples with wire of a few sizes. For now we’ll consider fine-gauge wire as it is the most versatile (but least robust) form for measuring temperatures of small things. It’s always desirable to be able to say that the thermal mass of your measurement instrument doesn’t influence the temperature of the object you’re measuring (i.e. placing a large stainless steel temperature probe at 20°C on a small snail at 40°C might cool the snail during the measurement process), so using small diameter thermocouples is good.

It can make sense financially to purchase thermocouple wire in bulk so that you can make and repair thermocouples for years to come. For instance, you can purchase 40-gauge T-type insulated wire from this page on Omega’s web site. The particular wire I would order is part number TT-T-40-SLE-100. This part number would get you 100 feet of 40-gauge T-type thermocouple wire with a "Neoflon" insulation. Note my recommendation for getting the “Special Limits of Error” wire rather than regular wire. It costs a bit more, but Omega specs this wire to a higher standard, so that it should be within 0.5C of the actual temperature, rather than the 1C of the regular cheaper wire, even before you calibrate.

To go with the wire, you’ll need to purchase the connectors that allow you to plug the wire into your handheld thermometer, and in this case I recommend connectors from this page, using this part number combination in particular: HMPW-T-M. For starters you only need the male plugs to plug into your handheld thermometer, but you can use the female plugs to make "extension cords" by placing a female plug at one end and male plug at the other end of a length of thermocouple wire. If you have a pile of old non-functional thermocouple leads sitting around, you can reuse the connectors.

With the wire and connectors in hand, you can now start making your own thermocouple leads. To put things together, you’ll need the following equipment:
Soldering iron and regular solder for electronics
Dissecting scope or magnifying glass so you can see
Razor blade or scalpel
Small screw driver, such as a jeweler’s screwdriver
Fine forceps
Some tape

Assembling the thermocouple:
Start by cutting off a length of thermocouple wire to the desired length. I usually make my leads a few feet long (3-4’). We’ll start by attaching the leads to the plastic connector.


Unscrew the cover on the connector. Underneath you should see two screw terminals.


On a T-type connector, one terminal will be copper colored and the other will be silver colored. They each have a screw in them, which is how you will attach the thermocouple wires. Unscrew the terminal screws. Sometimes your connectors will have little Teflon washers under the terminal screws, or maybe a metal flange to help hold the wire down against the terminal. You can use these during reassembly, or discard them.

Take your thermocouple wire and place one end under the dissecting scope. I like to use a bit of scotch tape to hold the wire in place so that I can work on it with both hands. While looking through the scope, take a sharp razor blade and scrape off some of the insulation from the wire.

With the thermocouple wire I recommended above, there is a clear outer jacket, and then separate red and blue insulation around the copper and constantan wires. Place the razor blade at a shallow angle to the wire (i.e. nearly horizontal) about 1” from the end, and scrape towards the end of the wire. Do this gently to avoid cutting through the metal wire itself. You just want to take off the clear insulation and the colored insulation, leaving the bare wires intact. The 1” length gives you plenty of bare wire to wrap around the terminals in the next step. Cut away the excess insulation so that things are neat and tidy.


Once you have your wires bared, bring in the connector. Again, this is probably best done under the scope. With your wire still taped down, position the connector so that the bared portion of the wire will sit completely inside the connector when closed.


Then use your forceps to wind the bare wires around their respective terminal screws.


The wire color matters here: the copper colored wire needs to be screwed onto the copper-colored terminal, while the silver constantan wire needs to be screwed onto the silver terminal (again, this assumes you’re using T-type thermocouple wire). Follow this up by carefully screwing down the terminal screws. It is fairly easy to accidentally break the wire at this step, especially if the wire catches on the terminal screw and starts tugging as you screw down. Use your forceps to keep everything in place. The goal here is to get the bare wire of the thermocouple lead in direct contact with the terminal, using the screw to push the wire down onto the terminal. Also note that your two bare wires should not touch each other inside the connector housing, so keep them separate!


With the wires screwed down, it’s time to add in a strain relief before replacing the plastic cover on the connector. The connectors from Omega sometimes come with square brass or copper pieces that sit in a depression at the distal end of the connector housing to act as a strain relief. Typically these pieces simply sever the fragile wire as you screw the connector cover back on. Alternatively, the connector may come with a round brown silicone rubber piece with a hole through its middle. This hole is too large to grip the very fine 40 ga wire, but works fine on larger diameter wire. You can make use of the silicone rubber piece by slipping the wire underneath the rubber so that it is pressed between the rubber and the plastic of the connector case. In either case, I always just replace the square metal pieces or round rubber piece with a similarly sized square piece of rubber that sits in the depression.

The rubber grips the thermocouple lead without cutting it, providing a measure of strain relief for the terminal connections inside the housing. I cut out little pieces of neoprene rubber purchased from McMaster-Carr, such as the rubber in this assortment: part number 9455K666 found on this page.


At this point the thermocouple is half finished. You now need to complete the junction at the far end of the thermocouple lead, where you’ll be measuring your temperature. We typically use solder to make this connection, as it is easy and fairly durable. The pre-made connectors you buy from Omega use a welded junction at the sensing end, which is more durable than solder, and will not melt at high temperatures. Soldered connections are fine for the full range of biologically-relevant temperatures you’ll find in the field, but you couldn’t use a soldered joint to measure the temperature in your muffle furnace for example, as the solder would melt.

As before, you need to bare the thermocouple wires to make the connection. Tape your wire down to the dissecting scope platform, and use your razor blade once again. I recommend only baring ~1/4” or so. In special cases you might want a long bare wire lead, but for most purposes a short bare section at the sensing end is desirable from a durability standpoint.


With the two wires bared, use your forceps to twist the two leads together.


This provides a bit of mechanical strength to the joint, and makes the soldering easier. For the soldering step, fire up your iron, clean the tip (wipe it on a wet sponge), and melt a bit of solder onto the tip. Again, this next step is best done under the scope. Take your soldering iron and touch it to the twisted wire pair. If you have enough solder on the tip of the iron, the wire pair should be “submerged” in solder.


I then draw the iron tip out towards the end of the twisted wire pair, dragging the solder pool along the twisted wires. Solder doesn’t stick well to the wire pair, so ideally the twisted joint will retain a bit of solder on the two wires via surface tension. Do this quickly (touch iron tip to wires, draw iron tip towards end of wires) until a bit of solder remains.


It doesn’t take much to hold the wires together. Once you have some solder on the joint, you can test the thermocouple by plugging it into your handheld thermometer. You should get a temperature reading, and it should quickly approach air temperature if the tip of the thermocouple is sitting free in the air. Assuming the thermocouple gives you a reading, you can now trim off any excess bare wire from the tip that you don’t think you’ll need, using the razor blade or wire clippers. Occasionally you’ll end up with a big blob of solder on the tip, and I like to cut that off to keep the tip low-profile.
You should now have a working thermocouple.


It would be prudent to calibrate your thermocouple lead. At the very least, dip your thermocouple tip in a stirred ice water bath to get a 0 degree C reading, and go find a water bath or some other warm water of a known temperature (a calibrated alcohol thermometer would be useful here) and check your thermocouple against the water temperature. Each thermocouple lead that you make may have a slightly different calibration, so it’s worth checking them and writing the calibration on a piece of tape that you stick on the thermocouple lead. Most of the time your thermocouples will all read within 0.1°C of each other, but some may be further off.

Now that you can make your own thermocouples, you can also repair broken thermocouples using the same methods. You might occasionally rip the wire out of the connector, or the sensing tip might get flexed too many times and break, or you might wind the wire too tightly and break it somewhere within the insulation. In every case you can just cut off the offending end of the wire and make a new, shorter thermocouple. Be sure to recalibrate it!

Wednesday, March 19, 2008

Where do they find this stuff?

I guess I'm proud to see that I managed to get the only invertebrate on some VH1 blog about animals with drinking problems (number 37):

Best Week Ever's list of 50 animals with drinking problems


The original picture:


And here are the others from the set:





These were originally shot during the invertebrate zoology summer course offered at the University of Washington's Friday Harbor Laboratories with the assistance of J. Matt Hoch. I also have to thank Bruno Pernet and Mike Hart for turning a blind eye while we were doing this.

Sunday, October 21, 2007

Typing common words automatically with Microsoft Word 2007

Microsoft Word can be easily set up to type in words that you use over and over again automatically. This might be especially useful for things like species names or obscure measurements that require greek characters or other special formatting. The process takes advantage of Word's autocorrect functions. This example uses Word 2007.

I have a species name that I need to type quite often, and it also needs to be italicized to conform to convention. Now I could hit Ctrl+i to enter italics mode and type the whole name out, then hit Ctrl+i again to exit italics mode, or I can use this method.

We'll start by putting Word's autocorrect menu item in an easy-to-reach spot. In Word 2007, click on the Microsoft Office logo button at the top left of the Word document. Then click on the Word Options button at the bottom of the menu.


In the new window that pops up, click on Customize. Then in the "choose commands from" menu, pick "All commands". Scroll down the list on the left until you find AutoCorrect Options. Click it, and then hit the Add>> button.


This inserts the AutoCorrect menu at the very top of every Word window so you can access it quickly.


Now go back to your Word document, and type in the word you want to automate. In this case I want to simplify the process of typing "L. digitalis" in italics. I type it out properly, and then highlight the word. Make sure you don't highlight any extra spaces around the word, or those will be included as well.


Now click on the AutoCorrect menu item you inserted at the top of the document. A new window will pop up.

It should have your highlighted word in the box in the middle of the window. I want to preserve the italics formatting so that L. digitalis is italicized every time I type it, so I click on the "Formatted text" button.

In the box under "Replace:", you type in the code you're going to use to tell Word that it should autocorrect to your chosen word(s). One system you can use is to make up short abbreviations for your word, preceded by two periods. In day to day typing you will rarely ever need to type two periods immediately followed by characters, so this method shouldn't interfere with your normal typing. I've used the code "..ldig" in this case.
Click the Add button to add your new code and associated word(s) to the list, and click OK to go back to your document.

Now you should be able to type your code, and as soon as you press the space bar (or the return key), Word should autocorrect your code to the appropriate word. In this case, I can type ..ldig without entering italics mode, and the resulting L. digitalis will appear, already italicized.

As I mentioned above, you can use this trick for special characters as well. Just get the special character on the page (usually via the Insert>Symbol menu), highlight it, and go through the steps above. You'll note in the AutoCorrect window above that I already have a ..ul code that changes to the greek letter mu and l to represent "microliters".

Monday, August 27, 2007

Mirror files with robocopy

Robocopy is a built-in function in Vista that allows copying of the contents of one folder to another folder, either within the same computer or over a network. In my case I use it to mirror the contents of my Matlab work folder to a second hard drive. The second hard drive is then backed up to an external server once a day. You can run robocopy as a scheduled task to automate the backup process as often as you like with minimal effort on your part.

To start with, you create a new text file. In it, enter the following text:

@Echo off
robocopy c:\MATLAB701\work\ f:\Luke_stuff\Miller_projects\Matlab_work_copy /MIR /XD c:\MATLAB701\work\Littorine_heat_budget\Run_output_files\

Then save the text file, and change its extension from .txt to .bat (You may need to go to Tools>Folder Options and click the View tab, then unclick "Hide extension for known file types" so that you can alter the .txt to .bat). This lets Windows recognize it as a batch file.


The basic syntax is:
robocopy source destination switches

In the case above, my source directory is c:\MATLAB701\work\ (put quotes " " around it if you use folder names with spaces in them), the destination directory is on my F: drive f:\Luke_stuff\Miller_projects\Matlab_work_copy. The switches used are /MIR, which mirrors the contents of the source directory to the destination directory, including copying all the subfolders and their contents. This will also erase files in the destination directory that are no longer in the source directory. The /XD switch tells robocopy to ignore the contents of the specified directory, in this case c:\MATLAB701\work\Littorine_heat_budget\Run_output_files\ since I don't want the contents of that directory copied over (for space-saving reasons).

To automate the copying process, you can use the Task Scheduler to launch your batch file at specified times. The Task Scheduler is normally found in the Start menu under Programs>Admnistrative Tools>Task Scheduler. Once open, you create a new task, and give it a name, a time to run etc. Under Action, choose "start a program", and under "Program/script:" choose the browse button and find the .bat file that you wrote earlier. You won't need to add any arguments or "start in" stuff, just hit next and finish.

Tuesday, August 21, 2007

Matlab text file precision

This was a fun one to figure out. Maybe it will help someone else.

The background: I'm running a heat budget model which steps through seven years of weather data in 10-minute time steps, so there's a bit over 368,000 time steps. One of the outputs is a text file with the elapsed time since the start, and associated temperature predictions at each time step, totaling 368,208 lines.

The problem: I open old timeseries text files to plot up some data, and discover that my time points are screwy. Once I get past the 99,999th time point, instead of incrementing in 10 minute steps, I get data like this:

100,000
100,000
100,000
100,000
100,000
100,100
100,100
100,100
100,100
etc.

I was writing these text files using dlmwrite('filename.txt', big_huge_array, ' '). Unfortunately, it turns out that the default precision using this method is 5 digits. The fix is simple enough, just increase the precision when writing the text file:

dlmwrite('filename.txt', big_huge_array, 'delimiter', ' ', 'precision', 8)

Wednesday, August 01, 2007

Quantifying western blots without expensive commercial quantification software.

Comparing the intensity of bands on a Western blot can be done in a number of ways using software that is commonly found on lab computers or freely available for download. The following document outlines some of those methods.

For a long time, the de-facto standard for analysis in labs that didn't want to spring for multi-thousand $$ commercial densitometry software was Adobe Photoshop or one of the competing photo editing programs. All you really need in a program is a freehand selection tool and a way to measure the mean gray value inside the selection. We'll start with Adobe Photoshop as an example (you can find many references in the literature that include phrases such as "densitometry was carried out in Photoshop" in the methods section).

To start with, you'll need to scan in your xray film on a flat-bed scanner. This can be a cheap consumer unit, or a more expensive transparency scanner if you have access to such a beast. You can scan the film as a grayscale image, and set the resolution to a medium value (300-400dpi).

1.
Open the scanned image in Photoshop.


2.
Under Image>Mode, check the grayscale option if it's not already selected. We don't care about color information, only grayscale information, so we can discard the color information.


3.
Under Image>Adjustments, select Invert (or press Ctrl+I). Now the dark parts of the film are light, and the light parts are dark. This is useful later, as the high-expression bands, which are dark on the film, will have high numerical values when we measure them. When photo programs report darkness/lightness values, the dark points have values near zero, and the light points have values that max out at 255.



The inverted scan

4. Choose the lasso tool from the tool palette.


5. On the first band, use the lasso tool to draw a line all the way around the edges of the first band. This is where your judgement comes in to play, determining where the edges of the band are, and what is simply background.


6. For Photoshop CS2/3: If the histogram window is not open by default, go to Window>Histogram to open the histogram. In newer versions of Photoshop (CS2, CS3) there is a small arrow in a circle in the upper right corner of the histogram window. Click on this and choose 'expanded view' to show the values for your selection.
For Photoshop v.5+6: Go to Image>Histogram to display the histogram for the current selection.


7. The histogram information includes a "Mean" value and a "Pixels" value. Record these two numbers for your selection. The Mean value is the average gray value (from 0 to 255) for the area inside your selection. The Pixels value is the number of pixels contained in your selection area. Bands with high expression are typically darker, but also often larger in size, so we want to know both of these attributes for our comparison later.


8. On your picture, use the lasso tool to draw around the next band. Record the Mean and Pixel values for this selection. Repeat for the rest of your bands, including your standard.

___________________________________________________________________________

The ImageJ method (version 1)

The good news is that even if you don't have access to a photo editing program such as Photoshop, you can now do all the same analyses using free programs. My favorite option is the freely available ImageJ from the National Institutes of Health.

The homepage for ImageJ is here: http://rsb.info.nih.gov/ij/index.html wherein you can find links to the download, documentation, additional plugins and so on.

Once ImageJ is installed, open it up and open your scanned film file. We'll start the ImageJ section by duplicating the method outlined above for Photoshop.

1. Open your file.

2. Under Image>Type click on 8-bit to convert the image to grayscale.

3.
Go to the menu Process>Subtract Background. Try a rolling ball radius of 50. This removes some of the background coloration from your image.

4. Go to Analyze>Set Measurements, and click the boxes for Area, Mean Gray Value, and Integrated Density.

5. Go to Analyze>Set Scale, and enter "pixels" in the box next to Unit of length.

6. Go to Edit>Invert (or hit Ctrl+Shift+I) to invert the colors on the image. Now the dark areas are light, and the light areas are dark. As outlined above, this has the benefit of making the measured values for bands increase with increasing protein expression.

7. Choose the Freehand Selection tool from the tool palette.


8.
Draw a line around the boundary of your first band. As above, you need to use your own judgement about where the edges of the band are, and what is simply background noise.


9. Hit the m key to take a measurement of the enclose area that you selected. The Results window should pop up, and each of the measurements you selected in step 4 should appear. Note that the Integrated Density column is simply the Area and Mean Gray Value columns multiplied together.


10.
Use the Freehand Selection tool to select the next band, and press m to take the measurement. Repeat this for each of you bands, including the standard.

11.
When you are finished, you can go to the Edit menu in the Results window, and choose Copy All. You can then paste the results into a spreadsheet for later use.

_____________________________________________________________________________

The ImageJ method (version 2)

This method is the Gel Analysis method outlined in the ImageJ documentation: Gel Analysis . You may prefer to use it instead of the methods outlined below. There will likely be very little difference in the results between the various methods.

1.
Open your file.

2.
Go to Analyze>Gels>Gel Analyzer Options and click the boxes for Label With Percentages, Outline Lanes and Invert Peaks.

3.
Choose the Rectangular Selection tool. Draw a rectangle around your first lane. Encompass some area of the lane above and below the band of interest.

4. Press the 1 button (or go to Analyze>Gels>Select First Lane). A new window will pop up with a copy of your image and a label over your first rectangular selection.


5.
Use the arrow keys to move the rectangle over the next lane. Press 2 (or go to Analyze>Gels>Select Next Lane) to place a selection around the lane. Repeat this for each lane on the membrane, moving the box and pressing 2 to place the selection.


6.
When finished, press 3 (or go to Analyze>Gels>Plot Lanes), which pops up a new window with a profile plot of each lane.


7.
Now choose the Straight Line selection tool. At the base of each peak, draw a line from one side of the peak to the other. This encloses the area of the peak. The tails to either side of the peak are the background signal. Note that if you have many lanes, the later lanes will be hidden at the bottom of the profile plot. To see these lanes, press and hold the space bar, and use the mouse to drag the profile plot upwards.

8. When each peak has been closed off at the base with the Straight Line tool, choose the Magic Wand (Wand tracing tool) from the tool palette.


9.
Using the spacebar and mouse, drag the profile plot back down until you are at the top peak. With the wand, click inside the peak. Repeat this for each peak as you go down the profile plot.


10. When each peak has been selected, go to Analyze>Gels>Label Peaks. This labels each peak with its size expressed as a percentange of the total size of all the measured peaks. You can go to the Results window and choose Edit>Copy All to copy the results for placing in a spreadsheet.


Note: If you accidentally click in the wrong place with the Magic Wand, the program still records that clicked area, and it will factor into the total area used to calculate the percentages. Obviously this would skew your results if you click in areas that aren't peaks. Therefore, if you should click in the wrong place, simply go to Analyze>Gels>Label Peaks to plot the current results, which displays these incorrect values, but more importantly resets the counter for the Results window. If you now go back to the Profile Plot and click in the peaks with the Magic Wand, the Results window clears and starts over. When you're sure you've clicked in the correct peaks without accidentally clicking in any wrong areas, you can go back to Analyze>Gels>Label Peaks and get the correct results.






__________________________________________________________________________

Data analysis

1.
Once you have measured the values for all of your bands, enter your numbers in a spreadsheet. Make a list of your samples on the blot, and then two adjacent columns of the Mean and Pixel values for each sample's band. (Note, if you used Image J's Gel Analysis routine, simply paste in the percent values for each sample)

2.
Multiply the Mean value by the Pixel value for each band. This gives us an integrated measure of the intensity and size of the band. I'll refer to this as the absolute intensity. (Note: if you used ImageJ's Gel Analysis routine, this step does not apply)


3.
Next we'll calculate a Relative Intensity, using our standard as the common point of comparison. Divide the absolute intensity of each sample band by the absolute intensity of your standard to come up with a Relative Intensity for each sample band. Some bands will have a Relative Intensity lower than 1 (they have less protein than the standard), and some bands might have a Relative Intensity larger than 1 (they have more protein than the standard). The Relative Intensity is a unitless value. (Note: if you used ImageJ's Gel Analysis routine, divide the percent value for each sample by the percent value for the standard from that membrane to get a value equivalent to Relative Intensity)

4. If you have the same sample standard on multiple membranes, you can compare intensity values across multiple membranes, even if you had to expose them for different times. By calculating a relative intensity that is tied to the same sample standard on every membrane (10ng of Human Hsp70 for example), we can make up for variations in the length of film exposure or variations in the efficiency of the antibodies or other reagents.

5.
In order to test for significant differences between treatments, all of your membranes will need to be scanned and quantified, then expressed in terms of Relative Intensity. If you are going to test for treatment effects using a standard analysis of variance, you will need to ensure that your Relative Intensity values are normally distributed and that there is homogeneity of variances within each treatment. A log transformation is often needed to make Relative Intensity values approximately normally distributed, but this may vary depending on your data. The complete statistical analysis of the data is outside the scope of this article, please consult a statistics textbook for more information.

6.
For making figures, your data can be plotted as Relative Intensity versus the treatments, and most papers typically use the standard error of the mean for the error bars. It should be noted here that some researchers make the extra effort to include a set of serial dilutions of a known standard on each Western Blot. Using the serial dilution curve and the quantification techniques outlined above, it should be possible to express your sample bands in terms of picograms or nanograms of protein.


An example figure showing increased expression of a protein at high temperatures

Wednesday, May 30, 2007

We're in trouble now...

Someone came along and attached a tsunami warning sign to the existing sign outside our building. Our lab is unfortunately situated below the shore height that has now been deemed unsuitable for surviving a tsunami.