Ensemble analysis of adaptive compressed genome sequencing strategies
 Zeinab Taghavi^{1}Email author
https://doi.org/10.1186/1471210515S9S13
© Taghavi; licensee BioMed Central Ltd. 2014
Published: 10 September 2014
Abstract
Background
Acquiring genomes at singlecell resolution has many applications such as in the study of microbiota. However, deep sequencing and assembly of all of millions of cells in a sample is prohibitively costly. A property that can come to rescue is that deep sequencing of every cell should not be necessary to capture all distinct genomes, as the majority of cells are biological replicates. Biologically important samples are often sparse in that sense. In this paper, we propose an adaptive compressed method, also known as distilled sensing, to capture all distinct genomes in a sparse microbial community with reduced sequencing effort. As opposed to group testing in which the number of distinct events is often constant and sparsity is equivalent to rarity of an event, sparsity in our case means scarcity of distinct events in comparison to the data size. Previously, we introduced the problem and proposed a distilled sensing solution based on the breadth first search strategy. We simulated the whole process which constrained our ability to study the behavior of the algorithm for the entire ensemble due to its computational intensity.
Results
In this paper, we modify our previous breadth first search strategy and introduce the depth first search strategy. Instead of simulating the entire process, which is intractable for a large number of experiments, we provide a dynamic programming algorithm to analyze the behavior of the method for the entire ensemble. The ensemble analysis algorithm recursively calculates the probability of capturing every distinct genome and also the expected total sequenced nucleotides for a given population profile. Our results suggest that the expected total sequenced nucleotides grows proportional to log of the number of cells and proportional linearly with the number of distinct genomes. The probability of missing a genome depends on its abundance and the ratio of its size over the maximum genome size in the sample. The modified resource allocation method accommodates a parameter to control that probability.
Availability
The squeezambler 2.0 C++ source code is available at http://sourceforge.net/projects/hyda/.
The ensemble analysis MATLAB code is available at
Keywords
Introduction
Progress in DNA amplification techniques [1] and high throughput cell cultivation methods [2, 3] allow capturing of genomes at singlecell resolution. However, deep sequencing and assembly of all of the cells in a sample is prohibitively costly since there are millions sometimes billions of cells. The good news is that, to capture all distinct genomes, deep sequencing of every cell should not be necessary as the majority of cells are biological replicates. For instance, the number of detected distinct species in the human gut was estimated to be in the order of 1,000, while the number of microbial cells in a human body, most of which reside in the gut, is in the order of 100 trillion [4]. We call this effect the sparsity of distinct genomes in a sizeable microbial population. Biologically important samples are often sparse in that sense. We use sparsity to capture all of the genomes in a sample.
During the last decade, the rich field of compressed sensing in nonadaptive [5–7] and adaptive (distilled sensing and refinements) forms [8, 9] has been developed to reduce the cost of sampling and reconstruction of sparse signals [10, 11]. In the general form of the problem, both adaptive and nonadaptive methods reduce the number of sensing in comparison to the nonadaptive naive sensing, and make it proportional to the number of distinct events times log of the data size [12]. However while adaptive compressed methods may seem more cumbersome than their non adaptive counterparts, adaptive methods often improve detection and estimation performance [12].
Our problem is an instance of a larger class of problems called element distinctness, which is a popular problem in massive data analysis with numerous applications and different variants including (i) finding if there are duplicates in a list, (ii) calculating the number of distinct elements (support size), and (iii) estimating the distribution of distinct element populations [13]. In the vast majority of element distinctness problems, the complexity of deciding if two elements are identical is of O(element size). We distinguish between different classes of the problem based on the size of an element in comparison with the size of the entire population.
In some of the problems such as estimation of the number of distinct words an author knows (e.g. Shakespeare) [14], the size of an element is very small in comparison with the size of the problem. In some others, hash functions are used to reduce the element size. Such variants of the problem have been investigated deeply to find optimal algorithms both in time and space. For data stream analysis, if n is the size of the language of elements, then the space complexity of optimal probabilistic (1 ± ∈)approximation algorithm is O(∈^{−2} + log n) and its time complexity is O(n) [13]. In such algorithms, each element is either completely sensed or not sensed at all, i.e., no partial sensing of an element. However, there are important variants of the problem in which each element is complex, such as the case of whole genome sequences. The contributions of this paper and its predecessor [15] is (i) introduction of this other class of problems with large element size with respect to the sample size, and (ii) the first adaptive compressed method to the best of our knowledge to solve an instance of this problem in the form of finding all distinct genomes with reduced sequencing effort in a sparse microbial sample.
Assume that the distinction of two cells is based on the differences between their genomes. Therefore, the complexity of pairwise distinction is a function of the lengths of the DNA sequences, each in the order of 1,000,000 − 10,000,000 basepairs for a bacterial cell and 3,300,000,000 basepairs for a human cell, with an average size of m. A sample contains n cells, for instance 10,000,000 cells, where n and m are in the same order. In this problem, there are two types of cost: (i) wetlab cost related to sequencing, i.e., reading the DNA sequence digitally, and (ii) computational cost of genome assembly and comparison, i.e., digital reconstruction of the whole genome sequences from the sequencer output. The output reads of a sequencer are short randomly sampled subsequences of the genomic sequence which cover the genome multiple times. The number of reads that contain a genomic location is called the coverage. In the assembly, the reads are concatenated to reconstruct the whole genome. Sequence assembly is a challenging task due to sequencing errors and repetitive elements. To compare a number of sequenced read data sets, a coassembly software such as HyDA [16] is used. The output of HyDA provides us with measures to compare the extent of similarity between the underlying genomes from which the read data sets are derived.
Wetlab cost includes the monetary cost which is linearly proportional to the total number of basepairs sequenced. If m is the average genome size and c is the necessary coverage, then the cost is O(nmc) for the exhaustive sequencing of all cells. Computational cost includes the space complexity and time complexity of assembly and comparison. If the assembly is done using the de Bruijn graph [17], the time complexity is O(nmc log m) and space complexity is O(nm). For instance, a typical realworld scenario involves c = 20, m = 5,000,000 bps, and n = 10,000, 000 for which the exhaustive wetlab, time, and space cost complexities would be respectively O(10^{15}), O(10^{16}), and O(10^{13}). The exhaustive approach is not tractable even for a small population. Hence, sublinear algorithms are needed to solve the problem.
We propose an adaptive compressed method, also known as distilled sensing. Our ultimate goal is to reduce the nm factor in wetlab, time, and space complexities to sm log n in which s is the number of distinct genomes in the community. We cannot use the algorithms and analyses given for the classical compressive sensing approach since our sparsity is unordered set sparsity rather than ordered sparsity by time or space. As opposed to group testing in which the number of distinct events is often constant and sparsity is equivalent to rarity of an event, sparsity in our case means scarcity of distinct events in comparison to the data size. It is also important to note that we do not have positional access (a.k.a. random access in the computer science literature) to the DNA sequence, which limits the use of many dimensionality reduction techniques [18].
We previously defined the problem and proposed a distilled sensing solution based on the breadth first search strategy [15]. To evaluate the performance of our algorithm, we simulated the whole process including genome amplification by MDA [19], sequencing by Illumina, (co)assembly by HyDA [16], and comparison. We proposed an adaptive resource allocation method to determine the amount of sampling of each genome in each round, which is related to the one proposed by [8, 9]. Due to the computational intensity of each of those processes, we were able to demonstrate the power of our approach for a few instances of the problem, but the behavior of the algorithm for the entire ensemble is yet to be studied.
In this paper, we give a new algorithm based on the depth first search strategy and modify our previous breadth first search resource allocation and set selection. Since simulating the entire process is timeconsuming, we provide a dynamic programming algorithm to analyze the behavior of the method over the entire ensemble. Our algorithm recursively calculates the probability of capturing every distinct genome and also the expected total sequenced nucleotides for a given population profile. It is important to note that even though the population is known for the ensemble analysis algorithm, the actual sensing algorithm works without that knowledge. That is our sensing algorithm can be applied to any population, even without knowing the profile. To have a clear view of the effect of each parameter on the expected cost, we assume that our model is error free at this stage. The results in this paper may lead to theoretical solutions and analysis with more complete model assumptions in the near future.
Method
Our method consists of two parts: (i) wetlab process, and (ii) computational process. On the wetlab side, we are assuming to have a high throughput device which is capable of isolating each cell in the sample, cultivate it, then extract the DNAs of each cultivated cell and amplify them. This device should also be capable of sampling customized amount from selected amplified DNAs, pool them, and prepare them for sequencing. If we would like to sequence more than one pool of samples in the same run, the device should uniquely barcode each pool before sending the samples for sequencing. Although there is currently no such device, one can envision automated microfluidic devices in near future based on the technologies already developed for separation, cultivation, DNA extraction, amplification, and barcoding [2, 3].
The output of sequencing is a library of reads which will be demultiplexed based on the barcodes. Therefore, for each pool of sampled amplicons which is sent for sequencing, a read data set is obtained. All the read data sets at each round are coassembled (with HyDA [16]). In the coassembler, to each read data set a unique color is assigned. All the colors are assembled on a single de Bruijn graph. The output is a list of contigs and their colored average coverages. This provides us with a measure to compare the similarities between the assembly of different colors. Based on those similarities, we decide if any two assemblies could potentially be from the same genome.
In the naïve exhaustive approach, each isolated cell is sampled and deeply sequenced. Based on the similarity measures provided by the coassembler, distinct genomes are then identified. In the adaptive method, at each round a number of collections of cells are selected. For each collection, the amount to be sampled from each cell is computed based on the analysis in the previous rounds. The output read data sets are analysed and the next round of sampling is calculated. We describe the details of the sampling collections and size in this section. First, let's clarify the assumptions for our model.
Model assumptions
The definition of distinct genomes may vary in different applications. We, instead of phenotypic notions like species or strains, use a quantifiable genomic measure to determine the distinction of genomes. We define two genome sequences to be distinct if the ratio of their differences over the whole genome size is above a threshold, called τ. That threshold is input by the user and controls a tradeoff between sensitivity and specificity [15].
Let C = {C_{1}, C_{2}, . . . , C_{ n }} comprise the input community of cells. As described earlier, we are given a device that can sense each cell C_{ i } partially at random, and the cost of a sensing is proportional to the sensing size, i.e., the number of nucleotides sampled. As the sensing size increases, the reconstructed genome of C_{ i } after the assembly converges to completion. To introduce appropriate notations, let I ⊆C be a subset of the community. Let be the sensing of the aggregated cells in I, which is the superposition of all sensing taken from the cells in I, i.e., the aggregated read data set or equivalently the resulting assembly. The key observation is that if there are enough replicates of a particular distinct genome in I, then that distinct genome can be completely captured from the superposition of partial sensing of the replicates provided that the partial sensing are random and unbiased.
Comparison of assemblies of two sets
in which A_{1}\A_{2} = {b ∈ A_{1}b ∉ A_{2}},  ·  denotes the total assembly size. In other words, τ is the maximum differences tolerated between two genomes which are considered similar. Parameter τ is user defined and τ gives a tradeoff between specificity and sensitivity of the algorithm to distinguish between two distinct genomes [15].
Search strategies
Our algorithm aims to assemble all of the distinct genomes represented in C and identify at least one cell per distinct genome. The objective is to minimize the total number of bases required to be sequenced. To reach this goal a search tree is created and explored iteratively to find the leaves which are the sequenced and assembled species. In the first iteration, the set of deeply sequenced and completely assembled distinct genomes, I, and its aggregated sensing, A, is empty. The algorithm divides the n cells C_{1}, . . . , C_{n} into two sets I_{1,1} = {C_{1}, . . . , C_{[n/2]}} and I_{1,2} = {C_{[n/2⌋+1}, . . . , _{ C }n}. Denote ${\overline{I}}^{1}=\left\{{I}_{1,1},{I}_{1,2}\right\}$. In each iteration i, I_{ i,j }'s are subsets of C and are chosen based on the results in the iteration i − 1. The search tree of I_{ i,j } to find leaves can be traversed by different methods. Here we choose two methods, breadth first search (BFS) and depth first search (DFS). In the BFS strategy, in each iteration i, all I_{ i,j }'s are explored at the same time, while in DFS, nodes (I_{ i,j }'s) are explored sequentially in time and analyzed one after the other.
In the recursive call on ${\overline{I}}^{i}=\left\{{I}_{i,1},...,{I}_{i,mi}\right\}$, the set of cells is sensed according to the resource allocation policy. Then, the aggregated sensing, A_{ i,j }, for each I_{ i,j } is obtained by sequencing and assembly. Those I_{ i,j }'s that contain a single cell, i.e., I_{ i,j } = 1, are leaves, and if they are fully assembled, they will be added to the list of deeply sequenced cells. In other words, if the corresponding assembly is reliable, i.e., c_{ i,j } ≥ M_{ l }, for a given constant M_{ l }, I_{ i,j } will be popped from ${\overline{I}}^{i}$ and pushed to I. In addition, A_{ i,j } will be added to A.
Second line can be derived from the first line because $\left({\overline{A}}_{cover}\cup A\right)\subseteq \left(\overline{A}\cup A\right)$. In these notions ${\overline{A}}_{cover}$ and $\overline{A}$ are the the resulting superposition of partial sensing and equivalently the corresponding assemblies of all cells represented in ${\overline{I}}_{cover}$ and ${\overline{I}}^{i}$, respectively. The search of the subtrees rooted at ${I}_{i,j}\notin {\overline{I}}_{cover}$ are terminated, and the next level set ${\overline{I}}^{i+1}:={\overline{I}}_{cover}.$
For the DFS strategy, the minimum set cover is calculated gradually during several iterations. Since in the DFS, in each iteration ${\overline{I}}^{i}$ only includes two subsets, and the number of cells in both subsets are (almost) equal, the minimum set cover can be calculated based on the greedy algorithm. The I_{ i,j } with maximum assembly size has the highest priority to be in the minimum set cover. Therefore, ${\overline{I}}_{cover}:=\left\{{I}_{i,j}\right\}$, and the second I_{ i,j }′ will be pushed to the stack $\overline{W}$, which is the waiting list of the untraversed nodes in the tree. If A_{ cover } is subsumed in A, then A_{ cover } will be emptied and the last element will be popped from $\overline{W}$ and pushed to${\overline{I}}_{cover}$. This will continue until A_{ cover } is not subsumed in A. In the end, the next level set ${\overline{I}}^{i+1}:={\overline{I}}_{cover}$.
Resource allocation
Resource allocation policy determines the size of partial sensing from each cell in each step. This is done with two objectives: (i) the amount of sensing from each element is such that with a given probability all of the distinct genomes present in I_{ i,j } can be reconstructed almost completely from the superposition of partial sensing, and (ii) the total sensing size in the whole algorithm is minimized.
In this equation a′ should be estimated from c_{ parent } and a_{ parent } and may differ from the actual value a obtained after sequencing and assembly. If I_{ i,j } is a leaf, i.e., I_{ i,j }  = 1, then the algorithm does a deep sequencing of the single cell in I_{ i,j }. In that case, the algorithm repeats the resource allocation and sequencing until a sufficient actual coverage is reached, i.e., ${c}_{i,j}\ge {M}_{u}$.
DFS versus BFS
Although the two search strategies are similar, they have differences in several aspects:

In DFS, the number of cell subcollections to be explored in each round is fixed. For instance, it is two in the current implementation. In BFS, this number is dynamic. For instance, in the first round of the example in Figure 2, it is two and in the third round is four. From another point of view, the number of rounds in BFS is fixed, [log_{2}n], whereas that in DFS is variable depending on the setup. The number of rounds and the number of subcollections are both desired to be minimum because each incurs a cost: each round incurs a setup cost for sample preparation and runningandstopping the sequencer and each subcollection requires a unique barcode and incurs the cost of barcoding and sequencing the base pairs in the barcode. Hence, there is a tradeoff between the two costs that determines the most suitable algorithm. The optimal algorithm should consider both costs.

In the process of choosing the minimum set cover, sets are compared to determine the subsumption relationships. In DFS, one side of the comparison is always A in which each single cell is deeply sequenced and completely assembled. Therefore, our information about that side is almost complete and has minimal error. The resource allocation of the algorithm is applied such that A_{ i,j }'s for all i and j are completely sequenced on average to reduce unwanted missing of some distinct genomes. If the resulting coverage of A_{ i,j }is low, i.e., ${c}_{i,j}\le {M}_{i}$ for a constant M_{ i }, then the data is considered unreliable and I_{ i,j }is treated as if it contains a new distinct genome. In that case, I_{ i,j }would be divided into two groups and explored further in the following rounds with increased requested resources. Although A_{ i,j }'s have deep coverage on average, there is a nonzero probability of missing small and less abundant distinct genomes. We explore these probabilities in the Results section. In BFS, the missing probability is more since on both sides of the ≤ relation, cells are deeply sequenced not individually but on average, which increases the error and intrinsic noise in comparisons.
The mentioned differences between the two strategies, do not result in considerable performance priority of one over the other method. Each are proper for a specific condition. In this paper, we compare the two methods using casebycase setups. We show that the total nucleotides required is almost the same in both methods. We could not do the ensemble analysis for BFS using dynamic programming since the exploration of different subcollections in one round are coupled. For instance, the four subcollections to be compared in the third round of Figure 2 come from two parent subcollections in the second round. That creates an inevitable coupling between the parents in the second round. Without dynamic programming, exploring all of the permutations of cells to provide ensemble analysis is intractable. Therefore, we provide the ensemble analysis only for the DFS algorithm.
Implementation
The pseudocode of the algorithm is given in 1, 2, and 3. COMPRESSEDSEARCH is the main function and SELECTNEXTLEVELSETS and Subsumed are two subfunctions of the algorithm. This algorithm has been implemented in the tool squeezambler 2.0.
squeezambler 2.0 versus squeezambler 1.0
The tool squeezambler 1.0 has been implemented based on the BFS algorithm given in [19]. There are three main differences between the BFS algorithm implemented in squeezambler 1.0 and the one in squeezambler 2.0:

In the recursion, the method to choose subsets passed to the next level is different in the two implementations. In squeezambler 1.0, every subset that is subsumed in another one is eliminated from further analysis. However, this is not the optimum method to choose next level sets. In squeezambler 2.0, a collection of subsets is chosen, which will cover the whole assembly with minimum number of cells.

The resource allocation in squeezambler 1.0 was design for those sequencing technologies that have nonuniform coverage. That resource allocation results in assembly gaps and in some cases causes missing some of the distinct genomes. The resource allocation in squeezambler 2.0 is modified such that it reduces the random missing of the distinct genomes and let us predict the probability of missing genomes. This probability is analysed in the Results section. We have added the resource allocation described in this paper to squeezambler 1.0. The new version is called squeezambler 1.1.

The parameter τ in squeezambler 1.0 is variable and is dependent on the number of cells involved in each round. As the number of cells increases, τ decreases. Reduced τ increases the number of base pairs required to be sequenced when error appears in the reads. In squeezambler 2.0 τ is set to be fixed in the whole algorithm.
Ensemble analysis
We provide the ensemble analysis on the DFS algorithm to calculate the expected total number of sequenced base pairs and the probability of capturing every distinct genome over the entire ensemble of n! permutations of C. To reduce the complexity, instead of exhaustively trying multiple permutations we developed a dynamic programming algorithm to calculate the results. In this analysis, the simulation of the entire process is replaced by black boxes which are mathematical models of the behaviors of the process. To ease finding decoupled effects of different parameters in the algorithm, we do not consider the sequencing and assembly errors in our model. Another assumption, again in the interest of other important sparsityrelated parameters, is to consider uniformity of coverage. This assumption is not far from reality. With the advancement of automated microfluidic cell separation and cultivation devices [2, 3], the genome can be captured from cultivated cells and sequenced with close to uniform coverage. This is different from the assumption we made in [15] for which a genome was amplified from a single cell using multiple displacement amplification and suffered from highly uneven coverage after sequencing. Although we are assuming uniform coverage distribution in this work as opposed to in [15], this is only a convenient choice that does not change the algorithm. This assumption is reflected only in (5).
which is twice the lower bound as a safe margin.
Dynamic programming algorithm
The dynamic programming algorithm can be divided into three main functions Cost (Algorithm 4), ALLOCATESEQUENCEASSEMBLEORACLE (Algorithm 5), and Subsumed (Algorithm 6). Algorithm 4 is the main dynamic programming, and its subroutines are presented in Algorithms 5 and 3. Let s be the number of distinct genomes in C. A distinct genome profile p = (p_{1}, p_{2}, . . . , p_{ s }) ∈ (N ∪ {0}) ^{ s } is a population vector. In the root of the search tree, $\sum _{j=1}^{s}{p}_{j}=n$, where n is the total number of cells. The vector of deeply sequenced and assembled distinct genomes before exploration of the current node is denoted by I = (I_{1}, I_{2}, . . . , I_{s}) where I_{ j } ∈ {0, 1} and I_{ j } = 1 means that the distinct genome j has been sequenced and completely assembled. Throughout the algorithms, $\overline{a}=\left({a}_{1},\phantom{\rule{2.77695pt}{0ex}}{a}_{2},\phantom{\rule{2.77695pt}{0ex}}...,\phantom{\rule{2.77695pt}{0ex}}{a}_{s}\right)$ is the assembly size profile per distinct genome in the current node, and $\left\right\overline{a}{}_{1}$ is the total assembly size. Denote the assembly size of the parent search node by a_{ parent }, total sequenced nucleotides by t, and the expected total sequenced nucleotides by E[t]. We denote the probabilities of capturing distinct genomes by P = (q_{1}, q_{2}, . . . , q_{2s}), in which q_{ j } is the probability of the vector of deeply sequenced and assembled distinct genomes I ∈ {0, 1} ^{ s } where $j=I\u27e8\left({2}^{0},{2}^{1},....,{2}^{s1}\right)\u27e9+1$, upon complete exploration of the current node in the search tree. Above, j is the decimal representation of I treated as binary (in reverse order) plus one. For example, for s = 3 and I = (0, 1, 1) (in short I = 011), j is the decimal representation of reverse of 011 plus one which is equal to 7. Therefore, q_{7} (or in another notation q_{011}) is the probability that after exploration of the current node the distinct genomes 2 and 3 are recognized by the algorithm, while distinct genome 1 is missed.
The COST function requires the genome population profile for the current node, p, the set of distinct genomes already deeply sequenced and assembled, I, and the result of the assembly of the parent node a_{ parent } as input parameters. The output of this function is the estimated cost E[t] and the probabilities of capturing genomes P after exploring the current node. At first (line 5), an oracle will decide on the sampling size of the current node and the resulting coverage and assembly size based on the formulations given in (4) and (5). In line 7, using the function SUBSUMED, the node is then compared with I to see if it includes any new distinct genome. If there is no new distinct genome (line 41), the probability of capturing the corresponding genomes is set to 1 and the function exits. Otherwise, the node will be explored further.
If the node includes only one cell, then that node is a leaf, and it will be sequenced and assembled deeply (line 9) and the corresponding capturing probability is set to 1. In the case of a node with more than one cell, the collection of cells will be divided into two groups. The expected cost and capturing probability, starting from the current node, is calculated over the ensemble of all of the possible divisions of the node into v and w between lines 19 and 39. The ensemble parameters are averaged over all divisions (v, w) by calculating their probability of occurrence (line 36). For a given division, v is explored followed by w. For each u ∈ {v, w} (line 24) and each combination of already captured distinct genomes with nonzero probability (lines 2628), the expected cost t′ and capturing probability profile P′′′ are recursively calculated using the COST function (line 29). These parameters are averaged over all nonzero probability profiles (lines 30, 31).
Results
DFS versus BFS
6 distinct genomes (species) used in simulation.
NCBI ID  Name  Ref. Status  Size (bps) 

NC 004663.1  Bacteroides thetaiotaomicron VPI5482 chromosome  complete  6.29 M 
NC 009614.1  Bacteroides vulgatus ATCC 8482 chromosome  complete  5.16 M 
NC 009615.1  Parabacteroides distasonis ATCC 8503 chromosome  complete  4.81 M 
NC 008532.1  Streptococcus thermophilus LMD9  complete  1.86 M 
NC 016776.1  Bacteroides fragilis 638R  complete  5.37 M 
FP929051.1  Ruminococcus bromii L263  draft  2.25 M 
Our simulation setups: (i) 31 cells; 6 distinct genomes, (ii) 59 cells; 4 distinct genomes, and (iii) 140 cells; 4 distinct genomes.
NCBI ID  Abundance (%)  

31 cells; 6 distinct genomes  59 cells; 4 distinct genomes  140 cells; 4 distinct genomes  
NC 004663.1  11  35.50%  22  37%  35  25% 
NC 009614.1  4  13%  7  12%  35  25% 
NC 009615.1  3  10%  8  14%  35  25% 
NC 008532.1  1  3%  0  0%  0  0% 
NC 016776.1  1  3%  0  0%  0  0% 
FP929051.1  11  35.50%  22  37%  35  25% 
squeezambler results for the three setups summarized in Table 2.
Setup  Method  Total Sequencing (Gbps)  Max Barcodes  No. of Predicted distinct genomes  Iterations 

31 cells; 6 distinct genomes  Naïve  4  31  6  1 
squeezambler 1.1, BFS  13.8  10  6  5  
squeezambler 2.0, BFS  11.2  8  5  5  
squeezambler 2.0, DFS  11  2  6  12  
59 cells; 4 distinct genomes  naïve  8  59  4  1 
squeezambler 1.1, BFS  10  4  4  6  
squeezambler 2.0, BFS  8.7  4  4  6  
squeezambler 2.0, DFS  8.8  2  4  9  
140 cells; 4 distinct genomes  naïve  18.5  140  4  1 
squeezambler 2.0, DFS  10.3  2  4  10 
Ensemble analysis
Effect of population profile.
p/5  Genome size (Mbps)  E[t] (Gbps)  P = (q000, q100, q010, q110, q001, q101, q011, q111) 

(3, 2, 3)  (4, 12, 2)  1.066  (0, 0, 0, 0.0062, 0, 0, 0, 0.9938) 
P =(q0000, q1000, q0100, q1100, q0010, q1010, q0110, q1110, q0001, q1001, q0101, q1101, q0011, q1011, q0111, q1111 )  
(1, 1, 1, 5)  (4, 12, 2, 1)  1.383  (0, 0, 0, 0, 0, 0, 0, 0.0020, 0, 0, 0, 0.0271, 0, 0, 0, 0.9709) 
(1, 1, 2, 4)  (4, 12, 2, 1)  1.407  (0, 0, 0, 0, 0, 0, 0, 0.0123, 0, 0, 0, 0.0001, 0, 0, 0, 0.9876) 
(1, 2, 3, 2)  (4, 12, 2, 1)  1.535  (0, 0, 0, ∈, 0, 0, 0, 0.1687, 0, 0, 0, 0.0135, 0, 0, 0, 0.8179) 
Effect of threshold τ .
p/5  τ  E[t] (Gbps)  P= (q0000, q1000, q0100, q1100, q0010, q1010, q0110, q1110, q0001, q1001, q0101, q1101, q0011, q1011, q0111, q1111 ) 

(1, 1, 2, 4)  0  1.428  (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) 
(1, 1, 2, 4)  0.1  1.423  (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) 
(1, 1, 2, 4)  0.2  1.407  (0, 0, 0, 0, 0, 0, 0, 0.0123, 0, 0, 0, 0.0001, 0, 0, 0, 0.9876) 
(1, 1, 2, 4)  0.4  1.266  (0, 0, 0, 0.0002, 0, 0, 0.0008, 0.0411, 0, 0, ∈, 0.0794, 0, 0, 0.1621, 0.7165) 
(1, 1, 1, 5)  0  1.418  (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) 
(1, 1, 1, 5)  0.1  1.414  (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) 
(1, 1, 1, 5)  0.2  1.383  (0, 0, 0, 0, 0, 0, 0, 0.0020, 0, 0, 0, 0.0271, 0, 0, 0, 0.9709) 
(1, 1, 1, 5)  0.4  1.214  (0, 0, 0, 0.0013, 0, 0, ∈, 0.0078, 0, 0, ∈, 0.2308, 0, 0, 0.1369, 0.6231) 
Expected cost
Capturing probability
We ran our program for a number of setups with 3 and 4 distinct genomes. The number of cells n was fixed at 40 in all experiments. Genome sizes varied between 1 and 12 Mbps. The total naïve singlecell sequencing is the minimum coverage M_{ u } times the number of cells, which is 40, times the maximum genome size. In this case, the naïve total cost is 2.4 Gbps. Tables 4 and 5 show the setups and their expected sequenced nucleotides E[t] and P, the capturing probability. Recall P = (q_{00···0}, q_{10···0}, . . . , q_{11···1}), in which q_{ I } for I ∈ {0, 1}^{ s } is the joint probability of capturing distinct genome j if I_{ j } = 1 and missing it if I_{ j } = 0 for j = 1, 2, . . . , s.
In Table 4 with constant τ = 0.2, that genome whose length is 2 Mbps in the first row may not be captured with probability 0.62% because 2/12 < 0.2 = τ. We see a similar effect in the subsequent rows. Those genomes whose lengths are 1 and 2 Mbps may not be captured with nonzero probability. As the abundances of short genomes increase, the probabilities of missing them decrease. This suggests that those genomes whose lengths are shorter than τ times the largest genome size may not be captured with nonzero probability.
To further investigate, we ran our program on other setups with varying τ, which are presented in Table 5. For the profile (1, 1, 2, 4) and τ = 0, 0.1, all of the genomes are captured with probability 1. For τ = 0.2, there is a nonzero probability of missing the genomes of length 1 and 2 Mbps. For τ = 0.4, the genome of size 4 Mbps joins the other two short genomes, and the probability of missing it becomes nonzero. Comparing the profiles (1, 1, 2, 4) and (1, 1, 1, 5) for τ = 0.4, the probability of missing the genome of size 2 Mbps, i.e., q_{1101}, increases significantly from 0.8% to 23% as a result of decrease in its abundance, whereas the probability of not capturing the genome of size 1 Mbps, i.e., q1110, decreases from 4.1% to 0.8% as its abundance increases. This suggests that the missing probability depends on abundance, potentially relative to the abundance of the largest genome in the population.
Conclusion
We presented an adaptive compressed algorithm for sequencing and de novo assembly of distinct genomes in a bacterial community. We used the characteristics of sparsity of distinct genomes in a community of cells to decrease the amount of nucleotides needed to be sequenced. Using a dynamic programming algorithm to analyze the ensemble behavior of the algorithm, we showed that the expected cost is O(log(number of cells in the community)) for fixed genome population pro files and O(number of distinct genomes) for fixed number of cells. Furthermore, we showed that for a nonzero threshold τ, those genomes whose sizes relative to the maximum genome size in the community is less than τ may go undetected with a nonzero probability. This probability depends on the abundance of the corresponding genome. These results shed light on our future path towards theoretical analysis of our algorithm and further tree exploration strategies.
Declarations
This work and publication has been supported by Wayne State University.
Algorithms
Algorithm 1 Compressed Sequencing
1: Input: C = {C_{1}, C_{2} , . . . , C_{ n }}
2: Output: A, I
3: I_{1,1} ← {C_{1} , . . . , C[n/2]}
4: I_{1,2} ← {C[n/2]+1 , . . . , C_{ n }}
5: $\overline{I}$ ← {I_{1,1}, I_{1,2}} ▷ $\overline{I}$ is the list of the subsets to be analysed in the subsequent round
6: $\overline{W}$ ← {} ▷ $\overline{W}$ is the waiting list of the subsets assembled but not ready to be analysed immediately
7: i ← 1 ▷ i is the sequencing round index
8: while EITHER $\overline{I}$ OR $\overline{W}$ IS NOT EMPTY do
9: $\overline{t}$ ← RESOURCEALLOCATE ($\overline{I}$, a_{ parent }, c_{ parent }, M_{ u }) ▷$\u0100$ $\overline{t}=\left\{{t}_{i,1},....,{t}_{i,\leftI\right}\right\}$; based on Equ 4
10: $\overline{A},\phantom{\rule{2.77695pt}{0ex}}\overline{a},\overline{c}$ ← SEQUENCEANDASSEMBLE ($\overline{t}$, C) ▷ $\overline{A}=\left\{{A}_{i,1},...,{A}_{i,\leftI\right}\right\}$; $\overline{c}=\left\{{c}_{i,1},...,{c}_{i,\leftI\right}\right\}$; A_{ i,j }, c_{ i,j } are the assembly set and the average coverage of I_{ i,j }, respectively.
11: $\overline{I},\overline{W}$ ← SELECTNEXTLEVELSETS($\overline{I}$, $\overline{W}$, $\overline{A}$, $\overline{c}$, F ) ▷ F : DFS or BFS flag
12: i ← i + 1
13: end while
Algorithm 2 selectNextLevelSets
1: Input: $\overline{I}$, $\overline{W}$, $\overline{A}$, $\overline{c}$, F
2: Output: ${\overline{I}}_{new},{\overline{W}}_{new}$
3: $\overline{L}$ = {} ▷ list of subsets with low quality assemblies
4: A_{ L } = {} ▷ assemblies of subsets in $\overline{L}$
5: for j = 1 . . . $\left\overline{I}\right$ do
6: if c_{ i,j } < M_{ l } then
7: MOVE I_{ i,j } FROM $\overline{I}$ TO $\overline{L}$ ▷ move all low coverage assembled I_{ i,j } TO $\overline{L}$
8: MOVE A_{ i,j } FROM $\overline{A}$ TO A_{ L }
9: else
10: if I_{ i,j } = 1 then
11: MOVE I_{ i,j } FROM $\overline{I}$ TO I ▷ move all single cell assembled I_{ i,j } TO I
12: MOVE A_{ i,j } FROM $\overline{A}$ TO A
13: end if
14: end if
15: end for
16: if F is BFS then
17: FIND THE MINIMUM SET COVER A_{ new } CORRESPONDING TO ${\overline{I}}_{new}\subseteq \overline{I}$ FOR WHICH Dτ ((A ∪ A_{ L } ∪ A), (${\overline{A}}_{new}$∪ A_{ L } ∪ A)) ≥ AND $\left{\overline{I}}_{new}\right$ IS MINIMUM ▷ Equ. 3
18: ${\overline{I}}_{new}\leftarrow {\overline{I}}_{new}\cup \overline{L}$
19: ${\overline{W}}_{new}=\left\{\right\}$
20: else
21: if F is DFS then
22: ${\overline{W}}_{new}=\overline{W}$
23: POP ALL I_{ i,j }'s FROM ${\overline{I}}_{new}$ AND PUSH TO ${\overline{W}}_{new}$ EXCEPT ONE SUBSET WITH THE MAXIMUM ASSEMBLY SIZE
24: while $\left{\u012a}_{new}\right=0$ AND $\left{\overline{W}}_{new}\right>0$ do
25: I_{ new } ← POP LAST SUBSET IN ${\overline{W}}_{new}$
26: A_{ new } ← ASSEMBLY OF I_{ new }
27: if NOT SUBSUMED (A_{ new }, A) then
28: PUSH I_{ new } TO ${\overline{I}}_{new}$
29: end if
30: end while
31: end if
32: end if
33: DIVIDE ALL I_{ i,j }'s IN ${\overline{I}}_{new}$ TO TWO SETS
Algorithm 3 SUBSUMED
1: Input: A_{ new }, A
2: Output: r ∈ { true, false }
3: ▷ low quality assembly; explore the node further.
4: if c ≤ M_{ l } then
5: r ← false
6: else
7: D ← τ − A_{ new } \A/A_{ new } ▷ Equ 2
8: if D < 0 then ▷Equ 1
9: r ← false
10: else
11: r ← true
12: end if
13: end if
Algorithm 4 COST  ensemble analysis main function
1: Input: p, I, a_{ parent }
2: Output: E[t] and $\mathbb{\text{P}}$
3:
4: $\mathbb{\text{P}}$ = (q_{1}, q_{2}, . . . , q_{2s}) ← 0
5: t, $\overline{a}$, c ← ALLOCATESEQUENCEASSEMBLEORACLE(p, a_{ parent }) ▷ t total nt, $\overline{a}=\left({a}_{1},...,{a}_{s}\right),c$ coverage
6: E[t] ← t
7: if not SUBSUMEDENSEMBLE($\overline{a}$, c, I) then
8: if p_{1} = 1 then ▷ leaf base case
9: while c < 2M_{ u } do ▷ ensures the complete assembly for leaves
10: t, $\overline{a}$, c ← ALLOCATESEQUENCEASSEMBLEORACLE(p, $\left\right\overline{\alpha}{}_{1}$)
11: E[t] ← E[t] + t
12: end while
13: k ← arg max p_{ j }
14: I^{ new } ← I
15: ${I}_{k}^{new}\leftarrow 1$
16: j ← 〈I^{ new }, (2^{0}, 2^{1}, . . . , 2^{s−1})〉 + 1
17: q_{ j } = 1 ▷ updating $\mathbb{\text{P}}$
18: else ▷ recursion
19: for v + w = p, v, w ∈ (N ∪ {0})^{ s } do
20: t ← 0
21: $\mathbb{\text{P}}$′ ← $\mathbb{\text{P}}$ ▷ $\mathbb{\text{P}}$′ = $\left({q}_{1}^{\prime},\phantom{\rule{2.77695pt}{0ex}}{q}_{2}^{\prime},...,{q}_{2s}^{\prime}\right)$
22: j ← 〈I, (2^{0} , 2^{1} , . . . , 2^{s−1})〉 + 1
23: ${q}_{j}^{\prime}\leftarrow 1$
24: for u ∈ {v, w} do ▷ v is explored followed by w
25: $\mathbb{\text{P}}$′′ ← 0
26: for b A BINARY VECTOR OF LENGTH s do
27: j ← 〈b, (2^{0}, 2^{1}, . . . , 2^{s−1})〉 + 1
28: if ${q}_{j}^{\prime}>0$ then ▷ average over all already captured distinct genome profile with nonzero probability
29: t′, $\mathbb{\text{P}}$′′′ ← COST(u, b, $\left\right\overline{a}{}_{1}$)
30: $t\leftarrow t+t\prime {q}_{j}^{\prime}$
31: $\mathbb{P}\prime \leftarrow \mathbb{P}\prime \prime +{q}_{j}^{\prime}\mathbb{P}\prime \prime \prime $
32: end if
33: end for
34: ℙ′ ← ℙ′′ ▷ for w, q′'s are updated
35: end for
36: $\pi \leftarrow \prod _{j=1}^{s}\left(\begin{array}{c}\hfill \begin{array}{c}\hfill {p}_{j}\hfill \\ \hfill {v}_{j}\hfill \end{array}\hfill \end{array}\right)/\left(\begin{array}{c}\hfill \left\rightp{}_{1}\hfill \\ \hfill \left\rightv{}_{1}\hfill \end{array}\right)$ ▷ probability of (v, w)
37: $\mathbb{\text{E}}\left[t\right]\leftarrow \mathbb{\text{E}}\left[t\right]+\pi t$▷ average over all possible (v, w)
38: $\mathbb{\text{P}}\leftarrow \mathbb{\text{P}}+\mathbb{\text{P}}\prime $ ▷ average over all possible (v, w)
39: end for
40: end if
41: else ▷ all distinct genomes represented in p have already been sequenced
42: j ← 〈I, (2^{0}, 2^{1}, . . . , 2^{s−1})〉 + 1
43: q_{ j } = 1 ▷ updating $\mathbb{\text{P}}$
44: end if
Algorithm 5 ALLOCATESEQUENCEASSEMBLEORACLE  ensemble analysis
1: Input: p, a_{ parent }
2: Output: t, $\overline{a}$, and c
3:
4: t ← 2M_{ uaparent } ▷ Equ 6
5: t_{ pc } ← t/p_{1} ▷ total sequenced nt per cell
6: ${\overline{t}}_{pdg}\leftarrow {t}_{pc}\cdot p$ ▷ total sequenced nt per distinct genome
7: $\overline{a}$, c ← ORACLE(${\overline{t}}_{pdg}$) ▷ oracle decides on the assembly size and coverage based on Equ 5
Algorithm 6 SUBSUMEDENSEMBLE  ensemble analysis
1: Input: $\overline{a}$, c, I
2: Output: r ∈ { true, false }
3:
4: if c ≤ Ml then ▷ low quality assembly; explore the node further.
5: r ← false
6: else
7: x ← (¬I, $\overline{a}$) ▷ exclusive part of assemblies, ¬ is bitwise not, based on Equ 2
8: if τ − x/$\tau x/\left\right\overline{a}\left\right<0$ then ▷ Equ 1
9: r ← false
10: else
11: r ← true
12: end if
13: end if
Declarations
Authors’ Affiliations
References
 Chitsaz H, YeeGreenbaum JL, Tesler G, Lombardo MJ, Dupont CL, Badger JH, Novotny M, Rusch DB, Fraser LJ, Gormley NA, SchulzTrieglaff O, Smith GP, Evers DJ, Pevzner PA, Lasken RS: Efficient de novo assembly of singlecell bacterial genomes from shortread data sets. Nature Biotech. 2011, 29 (10): 915921. 10.1038/nbt.1966.View ArticleGoogle Scholar
 Zengler K, Toledo G, Rapp´e M, Elkins J, Mathur EJ, Short JM, Keller M: Cultivating the uncultured. Proc Nat Acad Sci. 2002, 99 (24): 1568115686. 10.1073/pnas.252630999.PubMed CentralView ArticlePubMedGoogle Scholar
 Fitzsimons MS, Novotny M, Lo CC, Dichosa AE, YeeGreenbaum JL, Snook JP, Gu W, Chertkov O, Davenport KW, McMurry K: Nearly finished genomes produced using gel microdroplet culturing reveal substantial intraspecies genomic diversity within the human microbiome. Genome research. 2013, 23 (5): 878888. 10.1101/gr.142208.112.PubMed CentralView ArticlePubMedGoogle Scholar
 Qin J, Li R, Raes J, Arumugam M, Burgdorf KS, Manichanh C, Nielsen T, Pons N, Levenez F, Yamada T, Mende DR, Li J, Xu J, Li S, Li D, Cao J, Wang B, Liang H, Zheng H, Xie Y, Tap J, Lepage P, Bertalan M, Batto JM, Hansen T, Le Paslier D, Linneberg A, Nielsen HB, Pelletier E, Renault P, SicheritzPonten T, Turner K, Zhu H, Yu C, Li S, Jian M, Zhou Y, Li Y, Zhang X, Li S, Qin N, Yang H, Wang J, Brunak S, Dore J, Guarner F, Kristiansen K, Pedersen O, Parkhill J, Weissenbach J, Bork P, Ehrlich SD, Wang J, Antolin M, Artiguenave F, Blottiere H, Borruel N, Bruls T, Casellas F, Chervaux C, Cultrone A, Delorme C, Denariaz G, Dervyn R, Forte M, Friss C, van de Guchte M, Guedon E, Haimet F, Jamet A, Juste C, Kaci G, Kleerebezem M, Knol J, Kristensen M, Layec S, Le Roux K, Leclerc M, Maguin E, Minardi RM, Oozeer R, Rescigno M, Sanchez N, Tims S, Torrejon T, Varela E, de Vos W, Winogradsky Y, Zoetendal E: A human gut microbial gene catalogue established by metagenomic sequencing. Nature. 2010, 464 (7285): 5965. 10.1038/nature08821.PubMed CentralView ArticlePubMedGoogle Scholar
 Candès EJ, Tao T: Decoding by linear programming. IEEE Transactions on Information Theory. 2005, 51 (12): 42034215. 10.1109/TIT.2005.858979.View ArticleGoogle Scholar
 Candès EJ, Tao T: Nearoptimal signal recovery from random projections: Universal encoding strategies?. IEEE Transactions on Information Theory. 2006, 52 (12): 54065425.View ArticleGoogle Scholar
 Donoho DL: Compressed sensing. Information Theory. IEEE Transactions. 2006, 52 (4): 12891306.Google Scholar
 Haupt J, Castro RM, Nowak R: Distilled sensing: Adaptive sampling for sparse detection and estimation. IEEE Transactions on Information Theory. 2011, 57 (9): 62226235.View ArticleGoogle Scholar
 Wei D, Hero AO: Multistage adaptive estimation of sparse signals. IEEE Statistical Signal Processing Workshop (SSP). 2012, 153156.Google Scholar
 Erlich Y, Gordon A, Brand M, Hannon GJ, Mitra PP: Compressed genotyping. Information Theory. IEEE Transactions. 2010, 56 (2): 706723.Google Scholar
 Stobbe P, Krause A: Learning fourier sparse set functions. Journal of Machine Learning Research  Proceedings Track. 2012, 22: 11251133.Google Scholar
 Malloy ML, Nowak RD: Nearoptimal adaptive compressed sensing. Signals, Systems and Computers (ASILOMAR). 2012, 19351939. 2012 Conference Record of the Forty Sixth Asilomar Conference On IEEEGoogle Scholar
 Kane DM, Nelson J, Woodruff DP: Proceedings of the Twentyninth ACM SIGMODSIGACTSIGART Symposium on Principles of Database Systems. An optimal algorithm for the distinct elements problem. 2010, 4152. ACMGoogle Scholar
 Efron B, Thisted R: Estimating the number of unseen species: How many words did shakespeare know?. 1976, 63 (3): 435447.Google Scholar
 Taghavi Z, Movahedi NS, Drăghici S, Chitsaz H: Distilled singlecell genome sequencing and de novo assembly for sparse microbial communities. Bioinformatics. 2013, 29 (19): 23952401. 10.1093/bioinformatics/btt420.PubMed CentralView ArticlePubMedGoogle Scholar
 Movahedi NS, Forouzmand E, Chitsaz H: De novo coassembly of bacterial genomes from multiple single cells. IEEE Conference on Bioinformatics and Biomedicine. 2012, 561565.Google Scholar
 Compeau PEC, Pevzner PA, Tesler G: How to apply de bruijn graphs to genome assembly. Nature biotechnology. 2011, 29 (11): 987991. 10.1038/nbt.2023.View ArticlePubMedGoogle Scholar
 Johnson WB, Lindenstrauss J: Extensions of lipschitz mappings into a hilbert space. Contemporary mathematics. 1984, 26 (189206): 1Google Scholar
 Taghavi Z, Draghici S: MDAsim:A multiple displacement amplification simulator. IEEE Conference on Bioinformatics and Biomedicine. 2012, 575578.Google Scholar
 Motahari AS, Bresler G, Tse DNC: Information theory of DNA shotgun sequencing. Information Theory IEEE Transactions on. 2013, 59 (10): 62736289.View ArticleGoogle Scholar
 Huang W, Li L, Myers JR, Marth GT: ART: a nextgeneration sequencing read simulator. Bioinformatics. 2012, 28 (4): 593594. 10.1093/bioinformatics/btr708.PubMed CentralView ArticlePubMedGoogle Scholar
Copyright
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.