Thursday 11 February 2021

System safety

 A couple of decades ago, a company was working on a new transport system that was *the future*. It offered fast, silent, and comfortable transport that had the potential to replace both rail and air.

They got millions in funding, and developed a fully-functioning record-breaking prototype.

A publicity document (1) mentioned 'safety' several times. It claimed:

"Collisions between (the) vehicles are also ruled out due to the technical layout of the system and the section-wise switching of the ”guideway motor“. The vehicle and the traveling field of the guideway motor move synchronously, i.e. with the same speed and in the same direction. Additionally, the section of the longstator linear motor in which the vehicle is moving is only switched on as the vehicle passes."

In other words, you can only have one vehicle on a track at once. This sounds brilliant, as you can only have a collision if two vehicles are on the same track, and the system does not allow two vehicles on the same section of track.

The system was the German Transrapid Maglev system. 

In September 2006 (2), a Transrapid Maglev vehicle was in a collision at Lathen (3), killing 23 people. It collided with a maintenance vehicle on the track; a maintenance vehicle that did not depend on power from the track, and therefore 'defeated' the inherent safety systems mentioned in the paragraph above. Add in an earlier-than-usual Maglev test run, and multiple staff errors, and you had a tragedy. 

No-one wanted the crash to occur; it was an accident, and yet it was totally caused by Human error, not an act of nature. The systems were not in place to prevent it.

What can we learn from this? Simply, safety is difficult. Human and technical errors compound safety issues, and therefore you require safety in depth with many fail-safes. These lessons have been learnt the hard way over a couple of centuries on the 'traditional' railway; they should not be forgotten by new systems, as the lessons are often paid for in human blood.

Most of all, safety has to be built-in to the system, not an afterthought. No system can be made safe by liberal applications of handwavium. And I fear this is a major issue with the proposed Hyperloop systems.

(1): TRI_Flug_Hoehe_e_5_021.pdf

(2): Sadly, the document is undated. However, it obviously dayes from before the crash.


Friday 30 October 2020

Pity the policymakers

Imagine you are a UK politician with power during this Covid crisis. It doesn't matter which party, or whether your power is national or local, whether you are PM or a mayor. Imagine yourself as a politician you like, or one you hate.
You need to make policy, and you need data to base that policy on. This week, two large studies have delivered some interesting and contradictory results.
According to Imperial College, there are ~96,000 cases a day in England alone. The R-rate is 1.56, and the number of cases are doubling every 9 days.
This may point to a hard lockdown - probably national - being required immediately.
Another study from Kings / ZOE points at ~44,000 cases a day in the UK as a whole (not just England). The R-rate is 1.1, and the cases are doubling every 29 days.
In this scenario, just a few changes - perhaps even targeted local ones - could push the R-value below 1. It is still not a good situation, but it paints a very different picture from the Imperial study.
The national test figures, which only pick up symptomatic cases that have been tested, point at ~23,000 new cases a day. This will be a low figure.
So you are that politician. You need to make a decision in the next few days, and cannot afford to wait for more data. What do you do?
Not easy, is it?
Pity the politicians who have to make decisions based on such contradictory data - especially where those decisions are a balance of life, death, health, wealth and happiness. I wouldn't want to do it.

Friday 8 May 2020

Why V.E. Day?

In another place, someone asked why we commemorate V.E. Day. After all, we have Remembrance Sunday every year, so why do we need another martial commemoration?

I think they are very different events. Remembrance Sunday is to remember those who fell in service of the country. This means not just the Second World War, but wars before and after, including somewhat politically-controversial conflicts such as the Falklands or the Gulf Wars. The rights and wrongs of those wars are irrelevant: we remember and honour those who served.

V.E. day is different. It commemorates the whole country, an entire generation who suffered to help free half of Europe from tyranny. An entire country who worked together in the face of evil. Not just the soldiers, sailors and airmen, but everyone. The evacuee, the ARP warden, the land girl and the codebreaker. Even the anonymous housewife who had to make do and mend and feed their families with limited rationing.

I cannot think of anything more worthy of commemoration.

Wednesday 8 April 2020

Covid-19: death stats - announced deaths versus reality.

The Department of Health release daily statistics on the Covid-19 crisis, including the number of deaths and the number of tests. These headline figures are then splashed over the media ("UK records highest daily death toll from coronavirus at 854").

Reporting-wise, the announced statistics on tests have recently improved, with both the number of tests performed and the number of people tested released. The number of people tested is always lower than the number of tests performed, for many reasons: the accuracy of the test is low, a negative result might need confirming, someone might have developed new symptoms after a test, test failures, etc, etc.

However, the deaths data released is oddly lumpy. For instance, over the last few weeks, there have generally been fewer reported deaths on Sunday and Monday, and then new highs on Tuesdays. Why is this? Is there a medical reason?

Probably not. Instead, it is much more likely to be administrative, with fewer staff on-hand to report deaths on weekends, and the unreported deaths being reported in bulk on Monday. These are then shown in Tuesday's figures, producing a slump in deaths followed by a spike.

The deaths announced are only those that occur in hospital; figures for deaths from Covid-19 in the community are harder to compile in the absence of copious numbers of tests. However, even the reduced number relating to hospital deaths can be massively useful for planning purposes, as long as it is consistently compiled.

A major issue is that deaths are not immediately reported. For instance, doctors and nurses have other things to do, autopsies may be required, relatives may have to be informed before the figures are compiled, and there might be a general lag in the system. This essentially makes the charts of deaths shown on the media useless for planning, as deaths announced today may have occurred up to a week ago.

Fortunately, the Department of Health have produced oodles of lovely data that highlight this, split down to trust level:

The figures look very different to those published in the media, and are a lot less noisy. For instance, the 'announced' number of deaths on the first of April was 569; the 'real' number of patients who died on that day was 495. Those 74 patients still died, but they died on previous days.

This is the data we should be making informed decisions from, not the charts from 'announced' deaths shown so frequently on Twitter, Facebook and the media.

It's a shame the media can't be bothered to report this correctly and actually inform the public. Heck, an educational program on the statistics would be brilliant (a TV version of 'more or less').

The media are having a very poor war.

(Apologies; I'm sounding a little tin-foil hatty here).

Thursday 2 April 2020

Who should we test for Covid-19?

In an ideal world (or country...) we would be testing everyone for Covid-19 at regular intervals. We would get a pack by post, we would do a swab or pinprick test, and get an immediate result, like a pregnancy test or breathalyser. Then, if it is a positive result, you have another, official test done and isolate yourself and others in your household.

There would be many problems with this: people may not bother to do the tests; they may not perform them correctly or frequently enough, or they may just fake the results, especially if there is a compelling reason for them to do so (e.g. being allowed to go out of the house). However, such a routine should produce enough data to massively restrict the spread of the virus (a reproduction rate of less than one, where each ill person infects less than one other person) and keep the economy and country going.

There is one problem: the technology to do this does not exist, and the technology we do have is much more complex to administer. I covered this previously.

It is not just a case of producing / obtaining enough kits at a time when virtually every country in the world is screaming out for them (and in some cases, like in Spain, obtaining worthless ones (1)). The current test requires a swab to be taken, the swab to be sent to a lab, and a complex polymerase chain reaction (PCR) test performed on it (2).

This all means we do not have the ability to perform enough tests, and we have to ration them. This is where critical choices need to be made. We do not have enough tests to do everyone, so who do we choose?

An obvious one is patients. Sadly, the telltale symptoms of Covid-19 are coughing and an elevated temperature, which can all be symptoms of common-or-garden influenza or other illnesses. If someone has bacterial pneumonia, they need treating with antibiotics, and not the same treatment as Covid-19 patients - even if the symptoms appear the same. Knowing who has Covid-19 allows doctors to prioritise and tune their treatment, which is vital with a disease that sadly seems to linger in the critically ill: even when a patient is in intensive care, the road back to health is long and arduous. But this symptoms of this illness are not specific enough, and there are too many people who are potentially symptomatic for them all to be tested: we are already having a very high negative rate (i.e. testing people who turn out not to have it).

NHS Staff and other frontline workers
Another obvious one is any front-line NHS staff who are symptomatic. Currently, doctors and nurses exhibiting symptoms are having to self-isolate for at least a week. If they are clear of Covid-19, then they could be helping patients. However what if testing a nurse means a patient remains untested, and gets incorrect treatment as a result? What if asymptomatic doctors continue to spread the illness? Do you test all of the nearly million-strong NHS frontline staff?

There are other issues. *If* the false negatives are too high, then it would cause front-line NHS workers to go back to work whilst infectious, and infect other people - especially other front-line workers. If the false negative values is that high, then it would be safer to keep any such worker who shows symptoms away from patients, the vulnerable and fellow key workers. This would depend on the false negative values of the tests - and that is generally somewhat of an unknown at the moment, and small value changes could have large consequences. A way around this is to perform two separate tests on such key workers, with two separately-taken swabs sent to two different labs. But even this does not mean perfection with a low enough false-negative value, and uses up more of the required tests.

Yet another is to test contacts of people who have already tested positive, to inform and influence personal behaviour and national policy. This 'contact tracing' is said to have worked well in South Korea.

High-risk groups
Another priority might be people in very high-risk groups: for instance care homes and prisons, where an infection could rapidly spread through a closely-congregated population.

Other uses
There are other requirements to add into this: for instance, it might be very useful from a data point of view to do a randomised sampling to see how many people have currently got Covid-19, but are asymptomatic (the current tests do not highlight if you have had it and have recovered; for that we are awaiting a reliable antibody test or similar). This data might be very useful in modelling the spread of the disease, but would use up many kits we do not have. A study in the small Italian village of VĂ² performed in early March indicated that many people are infected but asymptomatic. (4) The asymptomatic people can still spread the disease, even if they are perfectly healthy.

Also, a certain number of the kits should be tested (preferably randomised samples of batches) to ensure that each batch of kits is performing correctly. Laboratory technicians also need to be tested as part of the process, to ensure they are performing the tests correctly. Confirmatory samples should perhaps be sent between labs, to validate their work. Such tests may require small numbers of kits, but the small numbers add up.

And hence the problem
There are not enough kits for even a small part of all this. And so we get into a classic situation of a constrained critical resource.

To make matters worse, it's perfectly possible that the hurried tests that are being done are so inaccurate that they are essentially pointless: the higher the proportion of false negatives there are, the more worthless (and indeed dangerous) the test. I don't feel that's the case, but it's possible.

So who to test? I don't know, and I fear there is no clear or easy answer: and worse, the answer may change as we gain knowledge of this disease, and both our ability to test and test accuracy increase.

The good answer, obviously, is to massively increase the number of tests that can be performed: although that is much easier said than done with the existing PCR test, and has massive logisitical and practical issues.

Therefore we await newer, faster tests - especially ones that do not require a lab to analyse them.

But until such tests are widely available, I'm glad I'm not the one trying to make policy on this.

In other news:

One of the problem with this story is that it moves rapidly. Since the last couple of posts, I have come across new stories and angles.

There is hope for such tests, for instance from the US (5) and here in Cambridge (6), amongst others. As an aside, an interesting thing about the UK-made Samba-II machines is their price: £2.4 million for 100 machines means each costs £24,000 - incredibly cheap. I can only hope that the consumables such as reagents are easily available.

(1): h

Wednesday 1 April 2020

Covid-19: what tests do we need?

My previous post summarised (*) the currently-used test for Covid-19, the PCR test, including its various limitations.

So what would improve it? Any new test would have to be:

*) Accurate. This means it would have as few false negatives and false positives as possible. Greater than 85% accuracy would be good. Chasing higher values (e.g. >95%) might delay the availability of tests, and allow the best to be the enemy of the good.

*) Sensitive. Sensitivity is the percentage of people with the disease that test positive. A patient may only have low amounts of virus in their system, especially early on, and therefore a test needs to be able to detect these low levels.

*) Selective. Selectivity is how well the test can separate the target disease (in this case Covid-19) from other, similar diseases.

*) Timely. Ideally, a patient or doctor would take a swab, and the result would come immediately, as it does with a pregnancy test or breathalyser. Any positives could then be taken through the existing PCR process for validation. Ideally, it would err towards false positives over false negatives.

*) Portable. Ideally it would be portable; the test can be conducted in hospitals, doctor's surgeries, or even in the home.

Various companies claim to be near this holy grail, and I hope they are correct. Ideally it would be multiple companies, allowing countries and organisations to choose which test - or tests - they believe are the best. South Korea have a rapid test that appears to be based on a speedier PCR process, but details on it appear to be sparse. However any PCR-based test will, by its very nature, be complex to administer.

Serological tests

Whilst PCR-style tests are useful, we also need other tests. The current PCR test only indicates if you have the disease; if you have had it, been symptomatic and beaten it, it will show up as a negative. Therefore we also need a serological test as well. This would show whether an individual has developed antibodies against this virus. Such a test could give us information on how prevalent Covid-19 has become in the community.

Serological tests are being developed by various groups. It appears that most will require a pinprick sample of blood, and the tests will be able to be performed in larger batches than PCR tests, easing restraints on laboratories. However the tests only work seven to fourteen days after the onset of symptoms, so there is still a need for PCR tests.

Many of the requirements for a PCR test are also required for a serological test: it will need to be sensitive, selective and timely.

For this reason, care needs taking that any newly-developed tests are actually fit for purpose, particularly in relation to false positives (in the case of antibody tests, false positives are more dangerous than false negatives. This is the opposite to PCR tests, where false negatives are the bigger problem).

There are other tests that might be useful, but the big two are the 'have-you-got-it-now' and the 'have-you-had-it' tests. Once we have these available in massive volumes, then we can start planning how to get back to normality. Without them, normality is a much rockier road.

Beware, the hustlers

Vast amounts of money will be available to anyone who manages to make a 'Holy Grail' test, and this will attract not only genuine actors, but charlatans. Some of these will be unknowing charlatans - people who genuinely believe 'their' solution is the Holy Grail when it isn't, whilst there will be genuine charlatans - snake-oil salesmen looking to make a quick buck. They will get discovered, but they could do massive damage in the meantime.

And before anyone thinks this doesn't happen, just remember James McCormick and the hideous ADE bomb-sniffer scandal (2). If people want something badly enough, others will sell them it - even if the item sold is worthless.

In addition, newly-developed tests would usually be run through trials to try to gauge accuracy, sensitivity and other values. The understandable hurry to get new tests out and used may lead to less understanding of the test itself, its limitations, and how it is to be administered.

A happier thought

It feels somewhat wrong - frivolous, perhaps - to say so, but this hideous disease has struck us at the best time in our history. We are not prepared, but we have the science and technology to fight it. We have a few decades of experience with genetic assaying as an invaluable tool in the battle, and we have had a few near misses in which we have developed basic tools. It can - and will be - argued that we should have done more after those near misses, but we're closer to winning the battle then we were.

Then there is another aspect: the Internet. Fifty years ago, the idea of essentially quarantining the entire country would have been unthinkable, from both an economic and social point of view. Now, the Internet allows us to communicate, order food, and in many cases even work from home. The Internet provides us with an invaluable tool in the battle - both economic and social.

(*) hopefully with a modicum of accuracy.


Tuesday 31 March 2020

How do we test for Covid-19 ?

(Yet again, IANAE. Below is information I have gleaned from various sources for my own interest. Any mistakes are my own.)

In all the information being written about Covid-19, there seem to be few resources that highlight the test's methodology and its limitations. It has become a black box 'the test', and many - sadly including journalists - seem to be treating it as an all-conquering miracle.

In reality, whilst it's the best we've got, it's awkward.

The current Covid-19 tests have been produced very rapidly, and is a tribute to the companies and organisations that have developed them. They were aided by the fact there have been several close calls over the last couple of decades - for instance SARS in 2002 and MERS from 2012. These earlier diseases proved to be less susceptible to spreading between humans, and gave investigators a target to concentrate on. The Covid-19 tests are built on that earlier work, which is why we got test for Covid-19 within a couple of weeks of the outbreak starting.

The current commonly-used Covid-19 test are variants of a PCR test.

So (deep breath), what is a PCR test?

A polymerase chain reaction (PCR) test detects viral particles in bodily fluids, such as blood. It is essentially molecular photocopying: small amounts of a pathogen's DNA or RNA are copied many times (amplified) to a level where they can be detected. Without a PCR test, the virus's RNA would be at too low a level for detection. I like to think of it as a gigantic magnifying glass, although perhaps not wielded by Sherlock Holmes.

PCR's inventor, Kary B. Mullis, won a Nobel Prize for Chemistry it in 1993, and it initially proved useful for the Human Genone Mapping Project, although is also used for purposes such as DNA fingerprinting and genetic research (1).

So, what is the testing procedure?

  1. A swab is taken from the patient, or a sample taken from the back of the throat.
  2. The sample is sealed into a tube and sent to a lab for processing.
  3. In the lab, the sample's RNA is extracted.
  4. Chemicals are mixed with the sample in different combinations.
  5. These mixtures are tested in a PCR machine.
  6. The result is given as positive, negative, or uncertain (a catch-all for various errors and problems, for instance the presence of similar viruses).

There are many issues with the test:

  • The PCR tests can only tell if you currently have the disease; not if you have had it and have recovered. For that, we need an antibody test.
  • The test is not instant; samples have to be sent to labs (often distant) for testing.
  • It is not just a case of having enough testing kits: you also need the downstream laboratory to process the samples. It is pointless having a test that you do not get a result from for weeks or months. Tales of countries or organisations ordering tens of thousands of kits seem to neglect the downstream processing. This processing means it is perfectly possible for (say) 10,000 tests to be performed in a day, but for results of only 8,000 to come through, as there is a lag between tests and results - especially if the labs are inundated with tests.
  • The test takes time. Getting samples to a lab takes time. Extracting the RNA takes time. Mixing it with the chemicals takes time. Performing the PCR test itself takes time. Even when samples are batched up, it can tale many hours for a sample to be tested, and that does not include transport from patient to lab.
  • The tests require consumables: from reagents to protective equipment for the lab workers. These consumables and workers are in short supply at a time when every country in the world is demanding them.
  • The tests may be inaccurate. False positives (a patient reported to have the disease when they do not), is less important, as the patient will then be treated with caution, e.g. self-isolation. The big problem is with false negatives: where a patient is reported to be clear of the disease when, in fact, they have it. Some reports give the current test an accuracy of about 70%: in other words, it will only detect Covid-19 within a patient 70% of the time.

Why might false negatives be reported? (2)

  1. In the early stages of the illness, the patient may have too low a viral load to be detected.
  2. The swabs are taken from the nose and/or the back of the throat, and if the patient's respiratory illness is not too severe, not much of the virus may not make it up the respiratory tract.
  3. The sample may be simply incorrectly taken.
  4. The samples may have been poorly handled.
  5. There might be technical issues in the test.

PCR is a tool, and as with any tool, it needs using with care, and with a deep understanding of the tool's limitations.

As an aside, PCR tests are used in Low Copy Number (LCN) DNA fingerprinting techniques, which allow tiny amounts of DNA to be fingerprinted in criminal cases. This is particularly useful in cold cases, where DNA might have degraded over time. The LCN technique proved somewhat controversial a little over a decade ago (3).

Hopefully we will get better, more immediate tests that do not require such a complex process. But in the meantime, thanks to all the companies, organisations and people who are working their socks off to increase the availability of testing kits and increase the testing capability.