When it comes to cancer, spotting the disease earlier can quite literally mean the difference between life and death, and now researchers in Denmark have announced a new computer diagnostics algorithm that's able to identify several types of cancers in just two days.

Right now, doctors can correctly diagnose the majority of cancers at the same time as identifying the site of cancer itself, so they know right away if it's affecting the lungs, brain, or another part of the body. However, in a small number of cases - around 1 in 20 - they have to refer the patient elsewhere before the type of cancer can be established, and that leads to an extended delay before treatment can begin.

It's this 5 percent of patients that the system developed by researchers at the Technical University of Denmark (DTU) is intended to help. In fact, in some cases the cancer is never properly identified at all, so patients are given a cocktail of chemotherapy drugs that might not actually be properly targeting the right cells.

The new computer program has achieved an 85 percent success rate so far, and the team behind it hopes to produce even quicker diagnosis results in the future. The set of algorithms, dubbed TumorTracer, is based on DNA analysis of cancers found in other patients. It's a self-learning system - by comparing thousands of samples, the software is able to come up with a number of possible primary localisations of the cancer.

Finding and targeting the cancer earlier could not only improve the chances of a full recovery, it can also help doctors prescribe more targeted treatments that are less painful for the patient.

"We are very pleased that we can now use the same sequencing data together with our new algorithms to provide a much faster diagnosis for cancer cases that are difficult to diagnose, and to provide a useful diagnosis in cases which are currently impossible to diagnose," said DTU's Aaron Eklund. "At the moment, it takes researchers two days to obtain a biopsy result, but we expect this time to be reduced as it becomes possible to do the sequencing increasingly faster. And it will be straightforward to integrate the method with the methods already being used by doctors."

It sounds promising, but the scientists aren't stopping there: they eventually want to adapt and develop the system to be able to spot the onset of cancer in a blood sample - that would make monitoring high-risk individuals much easier, enabling the disease to be spotted even earlier.