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