It's hard to look at fast food in the same way again after you've seen the pictures in Colston food complaints lab. The analysts there, who do thousands of food safety tests every year, have kept a ghoulish gallery from some of their more hair-raising finds, including the banger that, when bitten into, contained an dirty blue jay cloth. Another picture features a piece of sharp rusty wire that broke off a basket from a deep frier and ended up in some chips.

Professor Brian McDonald, a chemist in the lab, has seen it all. "It would amaze you, the different things we find," he says with a smile. He reaches for a two-litre bottle of what's labelled lemonade and opens the cap. "What do you think that smells of?" he asks. A chemical aroma rises from it. It's vodka, guesses our photographer, Jim. "It is," confirms Professor McDonald, news that came as a shock to the person who poured a glass of it expecting lemonade. Then there is the bottle of ordinary bottled water that was kept on a sunny shelf and developed a bright green silt of algae: there was nothing wrong with the water, Prof McDonald explains, but it had been kept past its use-by date. The result looks alarming.

Many of the samples that come into the lab have been contaminated accidentally, but not all. Over on another bench, there are two bottles of "rose wine" that were bought by a customer over the internet. But up close, the colour is not quite right. That's because it's diluting juice. The bottle was found to have glue inside the cork.

Food fraud is a growing area of work for the UK's largest local authority public analyst laboratory. At Colston, a converted high school, the staff of Glasgow Scientific Services test all kinds of samples. The lab serves 16 of Scotland's 32 local authorities, including all the members of the old Strathclyde Region plus four others, with Glasgow as the lead authority. Their aim? Protecting the public from hidden dangers in their food, water, air supply, consumer goods and environment.

The range is bewildering. Scientists, working with environmental health and trading standards officers, make sure the milk we drink contains no antibiotic residues, monitor our water supplies for traces of salmonella, test branded drinks to make sure we're not being hoodwinked with cheap imitations, verify toy safety, check environmental radiation levels and investigate hazardous substances, to name just a few of their responsibilities.

To the outside observer, there's a whiff of Q's workshop about the place. On a given day, the 50 white-coated scientists can be found firing toy guns in a special firing range, setting fire to teddy bears and examining the chemical profile of prestigious whiskies. Some of their work is responding to specific concerns, some is routine monitoring, but it rarely lets up: half a million analyses are done on 30,000 samples every year. Though there are now 33 practising analysts UK-wide compared with 150 in the 1950s, and eight of them, nearly one-quarter, are in Scotland, where a higher level of sampling is, therefore, possible.

Food fraud, says Gary Walker, scientific services manager and public analyst at the lab, is going up the political agenda. "It's really quite amazing what you can buy over the internet - you don't necessarily have the same controls over it," he says. The pressure of rising food prices is prompting more people to take advantage of cheaper prices from obscure online providers, and some are falling foul of the fraudsters.

The other big concern is the contamination of food either deliberately to cause harm or cynically to bulk it up or enhance it. The use of the chemical melamine to bulk up milk has been high in the public consciousness recently because of baby milk contamination in China.

Protecting consumers not only from potentially dangerous additives, but also from the substitution of inferior products, is all part of Colston's work. "If you buy a beef curry, is it beef, or are you being served lamb or some other species of animal? If you go into a pub and ask for a Bell's whisky, have you actually been given a Bell's or an inferior brand? These are things we've been involved in checking," says Walker.

Fortunately, deliberate contamination is rare, but there are occasional incidents. Some years ago, Walker and colleagues received a tip-off about a poisonous weedkiller used to contaminate bagels in a local supermarket. They looked at 60 bags of bagels and the second last one was discoloured. "We opened it up and there were these blue capsules that had been pushed in," he says. Had it been consumed, it could have killed someone.

After September 11, there were a number of so-called "white powder" incidents, sparked by anthrax threats in the US. "It's generally a malicious attempt to disrupt," says Walker. "It invariably doesn't turn out to be something that would kill you, but the disruption it causes is incredible. People, quite rightly, get anxious about it."

To find out how the public analysts with their partners in the fire service and police handle such events, we go outside to look at the technical support unit, a bright red van that houses a mobile lab. For the past 30 years, Colston scientists have been working with Strathclyde Fire and Rescue dealing with incidents which involve hazardous substances. The technical support unit, which operates out of Govan fire station, is permanently manned by a crew member and driver, and attends 80 to 120 incidents a year. Colston officers attended the site of the Stockline factory explosion and Glasgow airport following the terrorism incident there.

The unit is the only one of its kind in Scotland and contains nearly everything you could need to assess a substance. Walker opens a door and draws out a sturdy case. This, he explains, is the HazMatID, a portable infrared spectrometer. Now we're really getting into Bond territory: this £40,000 device can assess the chemical nature of a substance from just a couple of grains of solid or a tiny drop of liquid. Infrared radiation is passed through the substance and different chemical formulae absorb different amounts.

It can identify warfare agents and organic compounds. But the unit's typical call-outs include investigating dumped drums of chemicals, asbestos and carbon monoxide contamination. Another relatively common call-out is for a mercury spillage, for instance from broken barometers. People sometimes try hoovering up the liquid, which only spreads it. Thorough cleaning is essential as long-term exposure to mercury vapours can be harmful. For this reason, Walker advises calling the experts immediately.

And it doesn't end there. A Colston officer has a seat on any control team formed to deal with a food poisoning outbeak, such as the Paisley E-coli 0157 incident last year. The microbiology lab also tests for water quality in public and private water supplies, and swimming pools.

In the microbiology lab, three technicians are busily pippetting samples on to petri dishes of agar. It's run by John Waddell, who explains how potential pathogens are isolated from water by using a membrane with holes in it of less than half a micron - enough to catch a single bacterium. Food samples, meanwhile, are mixed with a special liquid and put in a "stomacher" - a crushing machine - and the resulting liquid is diluted down. As any pathogens have been deliberately thinned out, any colonies that grow on the agar can be counted, allowing for an accurate estimate of the bug's prevalence.

And then there's consumer safety. "This is an area we're really quite proud of in here," says Walker. Toys are tested for things such as sharp points, detachable components or high levels of lead. Duncan Scott, an operation chemist, has enough toys on his desk to fill a demanding child's toy box and he's been attacking them with just as much vigour. One of the guns is an imitation firearm that fires its tiny pellets at 50m a second.

He also tests textiles, cosmetics and even fuel. Radiation levels, sick building syndrome and food labelling are other areas of investigation.

So, for the staff, does the daily examination of environmental dangers put them off their dinner? "It makes you think," says lab technician Lynn Gibb. "But we also see the action being taken to make people safe," says John Waddell. And that never stops.

A healthy outlook

One of Colston's key functions is to test the nutritional content of foods, such as the levels of fat, protein and salt, as well as additives to ensure they are within permitted levels. An important area of research relates to food eaten by children. The West of Scotland Food Liaison Group carried out surveys of "alternative" school meals - those bought in local shops and takeaways - in 2005 and 2007; the analysis was done at Colston lab. The 2007 report had some worrying findings. Compared to the recommended sodium content, 36 of the 66 samples exceeded it. Eight contained between two and three times the recommended amount, and four contained more than three times.

When compared to the recommended maximum fat, 37 of the 66 samples exceeded it. Nine contained between two and three times the recommended limit, and six contained between three and four times. Environmental health officers, in conjunction with the laboratory, worked with schools and food businesses to improve the situation.