A new method for analysing biological samples based on their chemical makeup is set to transform the way medical scientists examine diseased tissue.

When tests are carried out on a patient's tissue today, such as to look for cancer, the test has to be interpreted by a histology specialist, and can take weeks to obtain a full result.

Mass spectrometry imaging (MSI) uses technologies that reveal how hundreds or thousands of chemical components are distributed in a tissue sample. Scientists have proposed using MSI to identify tissue types for many years, but until now, no method has been devised to apply such technology to any type of tissue.

In this week's Proceedings of the National Academy of Sciences, researchers at Imperial College London have outlined a recipe for processing MSI data and building a database of tissue types.

In MSI, a beam moves across the surface of a sample, producing a pixelated image. Each pixel contains data on thousands of chemicals present in that part of the sample. By analysing many samples and comparing them to the results of traditional histological analysis, a computer can learn to identify different types of tissue.

A single test taking a few hours can provide much more detailed information than standard histological tests, for example showing not just if a tissue is cancerous, what the type and sub-type of cancer, which can be important for choosing the best treatment. The technology can also be applied in research to offer new insights into cancer biology.

Dr Kirill Veselkov, corresponding author of the study from the Department of Surgery and Cancer at Imperial College London, said: "MSI is an extremely promising technology, but the analysis required to provide information that doctors or scientists can interpret easily is very complex. This work overcomes some of the obstacles to translating MSI's potential into the clinic. It's the first step towards creating the next generation of fully automated histological analysis."

Dr Zoltan Takats, from the Department of Surgery and Cancer at Imperial College London, said: "This technology can change the fundamental paradigm of histology. Instead of defining tissue types by their structure, we can define them by their chemical composition. This method is independent of the user - it's based on numerical data, rather than a specialist's eyes - and it can tell you much more in one test than histology can show in many tests."

Professor Jeremy Nicholson, Head of the Department of Surgery and Cancer at Imperial College London, said: "There have been relatively few major changes in the way we study tissue sample pathology since the late 19th century, when staining techniques were used to show tissue structure. Such staining methods are still the mainstay of hospital histopathology; they have become much more sophisticated but they are slow and expensive to do and require considerable expertise to interpret.

"Multivariate chemical imaging that can sense abnormal tissue chemistry in one clean sweep offers a transformative opportunity in terms of diagnostic range, speed and cost, which is likely to impact on future pathology services and to improve patient safety."

The technology will also be useful in drug development. To study where a new drug is absorbed in the body, pharmaceutical scientists attach a radioactive label to the drug molecule, then look at where the radiation can be detected in a laboratory animal. If the label is detached when the drug is processed in the body, it is impossible to determine how and where the drug has been metabolised. MSI would allow researchers to look for the drug and any metabolic products in the body, without using radioactive labels.