Análisis con mezcla de muestras usando hipercubos

Pooled testing using hypercubes

Tarea

Task

Analizar muestras de N individuos, cuando la prevalencia es baja, en el menor tiempo posible sin recurrir a instrumentos de diagnóstico adicionales.

To test samples from N individuals, at low prevalence, in the shortest possible time without extra test equipment.

Estrategia

Strategy

We summarize the algorithm as follows:
  1. For a given initial estimate of the prevalence p, select the group size N to be the optimal power of 3, discussed below. Test the whole sample to see whether one or more infected individuals are present. A negative test indicates everyone in the group is clear of infection.
  2. If the test is positive, run one round of testing according to the hypercube algorithm with L = 3. The distribution of results for the LD slices should, for large N, accurately indicate the number m of infected individuals, with many consistency checks including a new estimate of the prevalence. If m=1, the infected individual is immediately identified.
  3. If m = 2, select a principal direction in which two slices are positive. Take one of these, itself a hypercube of dimension D − 1, and run the hypercube algorithm again. The coordinates of the corresponding infected individual are then uniquely identified, and those of the second infected individual are inferred by elimination.
  4. If m > 2, select a principal direction in which all three slices are positive. Taking one of these, run the hypercube algorithm again. If that slice contains one infected individual, it is immediately identified. If the slice contains 2 or 3 infected individuals, their coordinates are discovered in 1 or 2 additional hypercube runs. The last infected individual is found by elimination. So, for m = 1, 2 or 3, only m runs are needed.
  5. For m > 3, it is an exercise in combinatorics to work out the expected number of runs. This turns out to be a number slightly higher than m. The corrections to m for m = 4, 5, 6 are given in Appendix B. For reasons given there, these corrections turn out to be relatively unimportant.
Resumimos el algoritmo de la manera siguiente:
  1. Dada una estimación inicial de la prevalencia p, seleccionar el tamaño del grupo N para que sea la potencia de 3 óptima, según se discute más abajo. Analizar el grupo entero para ver si hay algún individuo infectado. Un resultado negativo indica que ningún individuo del grupo está infectado.
  2. Si el resultado es positivo, hacer una ronda de ensayos o análisis de acuerdo al algoritmo del hipercubo con L = 3. La distribución de resultados de las LD tajadas debería, para N grande, indicar con exactitud la cantidad m de individuos infectados, con muchas pruebas de consistencia incluyendo una nueva estimación de la prevalencia. Si m = 1, el individuo infectado es identificado inmediatamente.
  3. Si m = 2, elegir una dirección principal en la cual dos tajadas son positivas. Tomar una de estas, que es a su vez un hipercubo de D - 1 dimensiones, y ejecutar el algoritmo del hipercubo nuevamente. Las coordenadas del individuo infectado son entonces identificadas unívocamente, y las del otro individuo infectado se infieren por eliminación.
  4. Si m > 2, elegir una dirección principal en la cual las tres tajadas son positivas. Tomando una de estas, ejecutar el algoritmo del hipercubo nuevamente. Si la tajada contiene solo un individuo infectado, es identificado inmediatamente. Si contiene 2 o 3 individuos infectados, sus coordenadas se descubren en 1 o 2 ejecuciones adicionales del algoritmo del hipercubo. El último individuo infectado se halla por eliminación. Entonces, para m = 1, 2 o 3, solo hace falta ejecutar el algoritmo m veces.
  5. Para m > 3, la cantidad de veces que hay que ejecutar el algoritmo es un ejercicio de combinatoria. Esta cantidad resulta un número levemente mayor que m. Las correcciones para m = 4, 5, 6 se dan en el apéndice B. Por las razones dadas allí, estas correcciones resultan relativamente insignificantes.

Observaciones

Notes

La estrategia es útil cuando p es cercana a 0.01 (1 %). Para valores mayores de p, la cantidad de individuos que minimiza la cantidad de análisis, Nopt, es muy baja. Por ejemplo si p = 0.04 (4 %), es Nopt = 8.75, y un algoritmo del hipercubo implementado con N = 9, D = 2 y L = 3, requiere realizar 6 análisis (⅔ de N). En cambio, cuando p = 0.01 (1 %), es Nopt = 35, y el algoritmo del hipercubo con N = 27, D = 3 y L = 3, requiere solamente 9 análisis (⅓ de N). La ventaja aumenta a medida que p disminuye. Por ejemplo, si se estima que 1 ‰ de la población está infectada (p = 0.001), se la puede analizar de a grupos de 243 individuos, con solo 15 análisis por grupo, con muy baja probabilidad de que haga falta algún análisis extra para identificar los infectados.

La cantidad de análisis se minimiza, para cualquier valor de N, cuando L = 3.

The strategy is useful when p is near 0.01 (1 %). For greater p values, the number of individuals that minimizes the number of tests per individual, Nopt, is very low. For example, if p = 0.04 (4 %), Nopt = 8.75, and a hypercube algorithm using N = 9, D = 2 and L = 3, requires 6 tests (⅔ of N). In contrast, when p = 0.01 (1 %), Nopt = 35, and a hypercube algorithm with N = 27, D = 3 and L = 3, requires only 9 tests (⅓ of N). The advantage gets even greater as p decreases. For example, if it is estimated that 1 ‰ of the population is infected (p = 0.001), it can be tested in groups of 243 individuals, with only 15 tests per group, with a very low probability that extra tests will be required to identify the infected individuals.

The number of tests reaches its minimum, for every N value, when L = 3.

Algoritmo del hipercubo

Hypercube algorithm

Cantidades y símbolos

Quantities and symbols

Ecuaciones

Equations

N = L D n S = N L N opt 0.35 p

Implementación

Implementation

Cada individuo es representado por un número de D cifras en base L. Cada cifra, junto con su posición, determina un análisis que contiene una submuestra del individuo. Tanto los individuos como los análisis se numeran a partir de 1. En cada dirección principal del hipercubo hay L análisis numerados en forma consecutiva hasta un múltiplo de L (por ejemplo si L = 3, los análisis 4, 5 y 6 están en una dirección principal del hipercubo).

Each individual is represented by a number of D digits in base L. Each digit, together with its position, determines a test that includes a subsample of the individual. Individuals and tests are numbered from 1. In each principal direction of the hypercube, there are L tests numbered consecutively up to a multiple of L (e. g., for L = 3, tests 4, 5 and 6 lie on a principal direction.)

p [0-1]: Nopt:

N:

D:

L:

Análisis que incluyen submuestras de un individuo dado
Tests that include subsamples of a given individual

IndividuoIndividual:

AnálisisTests:

Individuos cuyas submuestras componen un análisis dado
Individuals whose subsamples go into a given test

AnálisisTest:

Individuo correspondiente a un conjunto dado de análisis
Individual corresponding to a given set of tests
IndividuoIndividual:

When Person and Other interact in a situation in which there are several possible outcomes, not all equally favorable to both, Person may prefer an outcome in which the relative advantage of his welfare over Other's is the greatest (competition), or an outcome in which the sum of his welfare and that of Other is the greatest (cooperation), or simply that outcome in which his own welfare is the greatest, irrespective of Other's (individualism).
Cuando Persona y Otro interactúan en una situación de la que se pueden seguir varios resultados, no todos ellos igualmente favorables a ambos, Persona puede preferir un resultado en el cual la ventaja relativa de su bienestar con respecto al de Otro es la mayor (competencia), o un resultado en el cual la suma de su bienestar y el de Otro es la mayor (cooperación), o simplemente aquel resultado en el cual su propio bienestar es el mayor, independientemente del de Otro (individualismo).

Licencia / License

pooled-testing-with-hypercubes.html - Pooled testing using hypercubes

Written in 2020 by Esteban Lucchesi

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.