 Software
 Open access
 Published:
Schmutzi: estimation of contamination and endogenous mitochondrial consensus calling for ancient DNA
Genome Biology volumeÂ 16, ArticleÂ number:Â 224 (2015)
Abstract
Ancient DNA is typically highly degraded with appreciable cytosine deamination, and contamination with presentday DNA often complicates the identification of endogenous molecules. Together, these factors impede accurate assembly of the endogenous ancient mitochondrial genome. We present schmutzi, an iterative approach to jointly estimate presentday human contamination in ancient human DNA datasets and reconstruct the endogenous mitochondrial genome. By using sequence deamination patterns and fragment length distributions, schmutzi accurately reconstructs the endogenous mitochondrial genome sequence even when contamination exceeds 50 %. Given sufficient coverage, schmutzi also produces reliable estimates of contamination across a range of contamination rates. Availability: https://bioinf.eva.mpg.de/schmutzi/ license:GPLv3.
Introduction
Advances in sequencing and improved methods for the extraction of ancient DNA (aDNA) have enabled the study of ancient genomes. However, many computational hurdles remain in the analysis of aDNA. After the death of an organism, the endogenous DNA begins to degrade and accumulates chemical damage. aDNA molecules, therefore, tend to be quite short, typically less than 60 bases in length [1], and carry uracils as a result of cytosine deamination. Deaminated cytosines are misread as thymines during sequencing and lead to the characteristic increase in frequency of cytosine to thymine transitions near the ends of ancient molecules [2]. Further, when extracting DNA from ancient human remains, microbial DNA often forms the bulk of all recoverable fragments [3], which, together with contaminating DNA from individuals who handled the ancient sample, is sequenced along with the endogenous DNA [4]. While bacterial sequences do not typically align to the human reference genome, presentday human contaminants will align together with the endogenous DNA fragments. The presence of contaminant fragments affects both consensus calling and genotyping, and the resulting errors may influence comparisons to presentday humans including the calculations of genotype likelihoods, divergence times, population genetics parameters and phylogenetic reconstructions [5, 6].
Previous approaches to reconstructing ancient mitochondrial genomes include the mapping iterative assembler (MIA), which iteratively calls a consensus from the DNA fragments [7]. When contamination is high (e.g., >30 %), calling the consensus sequence of the endogenous mitochondrial genome without removing contaminant fragments is likely to result in an incorrect sequence (see Fig. 1). Because ancient endogenous DNA is more likely to be deaminated than the contaminant DNA from presentday humans [8], some studies have restricted the analyses to fragments carrying deaminated cytosines [9, 10]. However, using only deaminated fragments reduces the amount of data available for many ancient samples.
Due to these issues, research groups have generally prioritized samples with low levels of presentday human contamination. To date, methods to quantify presentday human mitochondrial contamination have relied on the presence of fixed differences between the mitochondrial genomes of archaic and modern humans [11, 12]. This works well when analyzing the genomes of Neanderthals and Denisovans, but early modern human genomes typically carry too few fixed differences to permit a robust estimate of contamination. For early modern humans, various groups have, therefore, relied on sites in the ancient sample that differ from a large dataset of presentday human mitochondrial sequences [13]. Additionally, a maximumlikelihood approach, which coestimates sequencing error rates and contamination, has been applied to sequences originating from both early modern humans and archaic humans [14]. Deamination patterns have also been used to estimate contamination from presentday humans in mitochondrial DNA [10]. Software tools are available to measure overall deamination [15], identify the endogenous template [16], isolate deaminated fragments [9] and perform nuclear contamination estimates based on the Xchromosome [17]. However, there is currently no software for estimating mitochondrial contamination, which has been thoroughly tested to ascertain its accuracy, available for download for the aDNA research community.
We developed schmutzi, an iterative approach to assembling the endogenous mitochondrial genome while simultaneously estimating presentday human mitochondrial contamination in archaic and early modern human aDNA datasets. Our approach to determining the endogenous mitochondrial genome sequence relies on distinguishing the endogenous and the contaminant nucleotides, given a prior on: contamination, deamination frequency and length distribution of the fragments. Contamination is estimated using single nucleotide differences between the endogenous mtDNA sequence and a database of potential contaminant mitochondrial genomes. The consensus calling and contamination estimation are run iteratively until a stable contamination rate estimate is reached.
Schmutzi was tested on both simulated and empirical data. Our results show that schmutzi outperforms currently available methods in terms of accuracy of the endogenous call and contamination estimate, particularly at high levels of contamination. An opensource implementation of schmutzi in C++ has been released under the GPLv3.0 and is freely available together with the test datasets that were used [18]. On a desktop computer, schmutzi requires between 1 and 3 hours to reach convergence for approximately 1 million fragments aligned to the mitochondrial reference genome. Faster run times (âˆ¼30 minutes) can be achieved using multicore systems.
Results
Schmutzi iteratively calls (i) the endogenous mitochondrial consensus sequence and (ii) a contamination estimate using two linked software programs (Fig. 2). The input for endoCaller, the consensus caller, is a set of aDNA sequences aligned to a mitochondrial genome reference, a contamination prior and deamination rates for the potentially endogenous and potentially contaminating DNA fragments. In the first iteration, the deamination rates and the prior for contamination are obtained using contDeam, a third subprogram of the schmutzi package (Fig. 2). contDeam implements a methodology described in previous studies [10], but incorporates some additional information including base quality and mapping quality into a Bayesian framework. An underlying assumption is that the base qualities are reasonably representative of the sequencing error probability. Recent versions of the default Illumina base caller, Bustard, provide such accuracy. The inputs for the contamination estimator, mtCont, are the same set of aligned fragments (in BAM format) that were used as input for contDeam, the endogenous consensus sequence determined by endoCaller, and a database of potential contaminant mitochondrial genomes. endoCaller, contDeam and mtCont can also be used as standalone applications. Each component program uses a Bayesian maximum a posteriori algorithm to estimate the most probable model parameters given the data. A list of the inputs and outputs for each of the three main programs, which are described in more detail in the sections below, is presented in Table 1.
We tested the performance of each of the component programs and of the iterative function, using both simulated and empirical data. For simulations, we used mitochondrial sequences from an early modern human, a Neanderthal and a Denisovan as the endogenous genomes and a presentday human as the contaminant genome. We also tested the performance on a number of previously published aDNA datasets [12, 19â€“21]. Further details about the test data can be found in â€˜Methodsâ€™.
Endogenous consensus calling
Simulated data
We ran schmutzi on simulated datasets created for three archaic genomes, each with increasing levels of presentday human contamination, and compared the endogenous and the contaminant genome sequences inferred by schmutzi to the published mitochondrial genome sequences for each individual (see Fig. 3). We also compared the endogenous consensus produced by (i) schmutzi, (ii) simply calling a consensus from all fragments using htslib and (iii) calling a consensus from fragments identified as deaminated by PMDtools. A Neanderthal was used as the endogenous mitochondrion and various levels of presentday human contamination were simulated. The mitochondrial sequences obtained using all three approaches to call the consensus were not considerably different (<1 %) at low levels of contamination (see Table 2). In contrast, at higher levels of contamination (>20 %), using only the deaminated reads reduces false calls by bases from presentday human contamination. However, schmutzi, which uses all the reads and includes additional sources of information such as fragment length and a contamination prior, prevents false calls that are due to the presence of presentday human contamination. For the remaining simulations, a Denisovan, Neanderthal or early modern human was used as the endogenous genome, with either single or doublestranded deamination patterns. The accuracy of the consensus sequences generated by schmutzi and by other computational methods to the published reference sequences is presented in Additional file 1: Tables S9â€“S14.
Schmutzi produced a consensus for both the endogenous and contaminant genomes that is very robust to high levels of contamination. Our results show that the endogenous consensus is accurately reconstructed for up to 50 % presentday human contamination for the doublestranded simulations and up to 70 % for the singlestranded ones. This is due to higher levels of deamination in the singlestranded simulations resulting in better ascertainment of the endogenous base.
We also called mitochondrial consensus sequences for each sample after processing the data using PMDtools (using the parameter a to adjust quality scores and the recommended PMD score threshold of 3) to identify deaminated reads and then calling the consensus with htslib (default parameters and haploid model). The sequence similarity to the published ancient genomes was computed as for schmutzi. At higher levels of contamination, schmutzi is able to infer the endogenous genome more accurately than is possible using only htslib on the deaminated reads. It also performs better at higher levels of contamination than the approach of calling a consensus solely from deaminated reads using samtools mpileup (see Additional file 1: Results, Section 2.3.1). All three approaches provide a more accurate sequence than mitochondrial consensus genome obtained using MIA (see Additional file 1: Results, Section 2.3.1).
The improvement obtained by schmutzi over approaches that use only deaminated reads from highly contaminated samples results from the inclusion of length and observed ratio of endogenous and contaminant bases. Iteration increases the accuracy of the endogenous consensus call. We found that the initial call for the m dataset with a simulated contamination rate of 58 % had seven mismatches to its original reference while only a single mismatch remained after convergence.
At around 50 % presentday human contamination, the inference of the endogenous base becomes difficult as there is a near 50/50 distribution of endogenous and contaminant bases. As in the evaluation of the contamination estimate, to simulate low coverage, we subsampled the original BAM file with a simulated contamination rate of 48 %. This was done both for fragments with doublestranded and singlestranded associated damage. Our results show that, for this difficult target, we can infer the endogenous genomes to a coverage of about 20 Ã— (see Additional file 1: Results, Section 2.3.2). This is also possible at 15 Ã— but the endogenous calls need to be filtered for highquality bases to avoid a high number of errors. This filtering also eliminates a significant portion (â‰ˆ1/16) of the mitochondrial calls. Prediction of the endogenous mitochondrial genome at a lower coverage is possible if presentday human contamination is lower.
Empirical data
Because not all features of empirical aDNA datasets can be accurately simulated, we also tested schmutzi on the five empirical datasets described in Table 3. Only a subset of the original data was used here. The accuracy of the endogenous consensus sequences called using schmutzi was compared to the published mitochondrial genomes and to the consensus sequence called using htslib. For htslib, the quality scores of potentially deaminated bases were reduced to avoid incorrect calls at deaminated sites, like the procedure used in [12, 22].
At contamination rates less than 5 %, the consensus sequences called with htslib were highly similar (between one and five mismatches) to the published mitochondrial genome sequences (see Fig. 4). However, at higher contamination rates (>40 %), the consensus sequence becomes increasingly inaccurate when called with htslib. In contrast, the consensus sequence produced by schmutzi is robust to higher contamination (40â€“50 %). For the highly contaminated Mezmaiskaya samples, we assessed the effect of using only deaminated fragments to generate the consensus using htslib. This approach has been used previously and substantially reduces the amount of contamination. Indeed, we show that the consensus obtained using htslib and only deaminated fragments improves the accuracy of the consensus sequence (see Fig. 4) but that the consensus sequence produced by schmutzi is still more accurate in all but one case, which was influenced by capture bias (see paragraphs below and â€˜Discussionâ€™).
To evaluate further the accuracy of the endogenous consensus calling, a maximumlikelihood phylogenetic tree was computed using the highquality bases (â‰¥200 PHRED scale) for both the inferred endogenous and contaminant genomes (see Fig. 5 b), and another using the unfiltered positions (see Additional file 1: Results, Section 2.2.3). The tree for the highquality bases has a higher likelihood than the unfiltered one. As expected, our endogenous mitochondrial genome falls within the Neanderthal lineage, more precisely on the Mezmaiskaya branch, whereas the contaminant one falls within the range of human variation. Our algorithm is, therefore, able, without any prior phylogenetic information, to separate the endogenous sequences from the contaminant portions of the alignment.
We examined in more detail the sequence inferred for the mitochondrial genome of the Neanderthal from Mezmaiskaya 1 (library ID B9687), which was generated from the same individual for which a highquality mitochondrial genome from a library with low contamination is available (GenBank FM865411). We note that the contaminating mitochondrial sequence is not known.
Under the assumption that the sequence from GenBank is without errors, the endogenous genome inferred by schmutzi should match perfectly this reference sequence. The inferred endogenous sequence differed by nine of the 16,608 bases. We noted that this region falls in the Dloop, which is typically quite divergent. We speculated that the incorrect identification of these nine bases may arise from an ascertainment bias due to the mitochondrial capture of the Mezmaiskaya sample using probes based on the human mitochondrial sequence. Indeed, we found that in this region the endogenous bases were significantly underrepresented compared to the contaminant (75 % rather than the average of 50 % for the whole mitochondrial genome). However, these bases tend to have low consensus base quality, which implies that the consensus calls at these positions is unreliable. Filtering for consensus base quality â‰¥200 (PHRED scale) reduces the number from nine mismatches to one. This single mismatch is in the polyC region (position 16,184), which is routinely removed in downstream analyses [23, 24].
Accuracy of contamination estimates
Empirical data
We estimated contamination for each of the five empirical datasets using schmutzi and contamMix (v1.010), an implementation from the authors of a previously described maximumlikelihood method for estimating mitochondrial contamination [14, 19].
The correct contamination estimate was taken to be that obtained from fragments aligned to sites in the reference mitochondrial genome where Neanderthals or Denisovans differ from 20 presentday humans (diagnostic sites). Since there are too few diagnostic sites, this approach could not be used for the early modern human data.
For the Altai Neanderthal and Denisovan samples, which have low contamination, both schmutzi and contamMix accurately estimate the contamination (see Fig. 4). However, for the highly contaminated Mezmaiskaya Neanderthal samples, schmutziâ€™s contamination estimates are closer to the estimates provided using diagnostic positions (44.1Â±0.8 and 49.3Â±0.7 for Mezmaiskaya samples 1 and 2, respectively). For Mezmaiskaya 1, for instance, using the 111 diagnostic sites, there were 2,443,418 individual bases supporting the Neanderthal base and 1,989,785 supporting the presentday human base, resulting in an estimated contamination of 44.9 % (per nucleotide basis). The contamination estimates obtained using diagnostic positions are constant even when filtering for high base quality and removing potentially deaminated bases. In comparison, the contamination estimate from schmutzi was 44Â±1 % and the estimate from contamMix was 41.4Â±0.8 %. We speculate that this is due to schmutziâ€™s iterative inference of the contaminating genome (see â€˜Simulated dataâ€™). To explore the results, we plotted the distribution of the posterior probability for the contamination estimate from one of the individuals (library ID B9687); see Fig. 5 a. The posterior probability peaks at the one obtained using diagnostic positions.
To test further the ability of schmutzi to estimate contamination and infer the endogenous sequence, we downloaded 22 different aDNA datasets from four different studies from different research groups. To compare our estimates to those produced by existing methods, we also ran contamMix on the same samples. Our results show that schmutzi is more accurate and our implementation faster than the existing methodologies (see Additional file 1: Results, Section 2.2.5).
Simulated data
To evaluate the range of contamination and coverage over which schmutzi can be used, we used the three simulated datasets with increasing levels of contamination and at varying coverage. For the simulated datasets, the contamination rates predicted by schmutzi correlate well with those simulated (Fig. 6 and Additional file 1: Fig. S16).
To test the accuracy of our algorithm to existing methods, we ran our algorithm and contamMix on a simulated dataset of 1 million fragments with doublestranded deamination patterns. The endogenous mitochondrial genome used was an early modern human with 50 % presentday human contamination. Our result show that the schmutzi algorithm offers superior accuracy compared to this existing method for estimating early modern human contamination (see Table 4). Results for the maximumlikelihood methods used by contamMix for the remaining samples are presented in Additional file 1: Results, Section 2.3.6. We also evaluated the impact of having multiple contaminant mitochondrial genomes (see Additional file 1: Results, Section 2.3.7) where an underestimate is observed for the early modern human at very high levels of contamination (70 %) and at a high mixture (e.g., 50/50) of different contaminant mitochondrial sequences.
The predictions of our algorithm for the remaining simulated datasets are presented in Additional file 1: Results, Section 2.3.5. The predicted presentday human contamination rates matched the simulated contamination rates.
To evaluate the effect of coverage on schmutziâ€™s contamination estimate, we analyzed a dataset with 47 % contamination and subsampled this to various levels of coverage. We chose 47 % as a level of contamination that makes the use of currently available tools difficult. Furthermore, at this level of contamination, there is an almost even number of endogenous and contaminant bases thus making the inference of each one relatively difficult for our model.
For the simulated Neanderthal, the contamination estimated by schmutzi is stable down to a coverage of âˆ¼ 100Ã— (see results for the singlestranded protocol in the top row of Fig. 7 and Additional file 1: Fig. S18 for the doublestranded data). At coverage less than 100 Ã— for the singlestranded data and contamination simulated here, estimation of contamination becomes difficult. For the doublestranded data, due to lower rates of deamination, our estimates are stable at coverages down to 150 Ã—. However, there are cases where an accurate mitochondrial genome sequence from another closely related individual can be used as a proxy to compute contamination rates (see Additional file 1: Fig. S19). Using this heuristic we can obtain accurate contamination rates for coverage down to âˆ¼ 5Ã— (see Fig. 7 bottom row).
We also note that the contamination prior estimates based only on deamination patterns also show a high correlation to those simulated (see Additional file 1: Results, Section 2.3.3). However, these estimates do not have the same robustness to low coverage as the final contamination estimate produced by the iterative approach. Additionally, we show that using a sensitive aligner like SHRIMP [25] does not cause drops in coverage around regions of high divergence of the Denisovan mitochondrial genome to the human mtDNA, thus allowing for a more reliable contamination estimate (see Additional file 1: Results, Section 2.1).
Contaminant consensus calling
The accuracy of the contaminant genome inferred from the simulated datasets increased as the amount of contamination increased (Fig. 3). However, at less than 1 % contamination, schmutzi cannot accurately infer the contaminant genome. An analysis of the inferred contaminant sequences is presented in Additional file 1: Tables S6 and S7.
For our empirical Mezmaiskaya samples, while the endogenous genome sequence is known, the nature of the contaminant is not. We can, however, take the inferred contamination genome and verify whether it falls within a known mitochondrial haplogroup. Using HaploGrep [26, 27], we determined that our inferred mitochondrial genome pertained to the T2b3 haplogroup with a confidence of 93.1 %. Out of a total of 33 diagnostic sites for this haplogroup, only one site, with a relatively low consensus prediction quality from our software (65 on a PHRED scale), was not the expected diagnostic base.
Methods
Test data
We tested the performance of schmutzi on simulated and empirical mitochondrial sequence data from both archaic humans and early modern humans. Simulated mtDNA datasets with increasing levels of contamination were created by fragmenting and deaminating the mitochondrial genome sequences of a Denisovan (GenBank: FN673705.1) [20], a Neanderthal (GenBank: AM948965.1) [12] and an early modern human (Ustâ€™Ishim individual [19]) and adding increasing amounts of contamination from a single, randomly selected presentday human mitochondrial genome (GenBank: KJ446110.1). We used empirical deamination rates from data prepared using a doublestranded library preparation protocol (C â†’ T at the 5^{â€²} end and G â†’ A at the 3^{â€²} end, rates from [13]). We repeated the simulations by adding deamination rates from empirical data prepared using a singlestranded library protocol (C â†’ T at both ends, rates from [22], see Additional file 1: Methods).
The empirical data included Illumina sequences from the same three ancient individuals as well as sequence data for two additional Neanderthal individuals from Mezmaiskaya [21] (NCBI SRA ID: PRJEB6014), which were selected because of the high rate of presentday human contamination present in the sequencing libraries [12].
We compared the accuracy of the consensus sequence called by schmutzi to the consensus sequences generated using a set of typical approaches that have been described in the literature: (i) MIA [7], (ii) PMDtools to identify deaminated reads followed by a haploid consensus call using htslib [9] and (iii) samtools mpileup (obtained from [28]) after removing deaminated reads [10]. We also compared schmutziâ€™s contamination estimates to the known contamination in the simulated sequence data, to the estimates based on diagnostic sites for the empirical data, and to the estimates obtained from the maximumlikelihood approach described in [14, 19]. This is currently the only published method that can estimate mitochondrial contamination for both early modern humans and archaic humans. To assess the robustness of schmutzi to varying coverage, fragments were downsampled from 1 % to 50 % of the data using a uniform probability distribution.
We first discuss how a reasonable contamination prior can be obtained using deamination patterns. We then provide details of the algorithm behind the endogenous consensus caller and show how the contamination is estimated using the output of the endogenous consensus caller. A list of the symbols used throughout this section is found in Table 5.
contDeam: determining a contamination prior using deamination patterns
The first iteration of the endogenous genome inference needs a contamination prior that is ideally a reasonable approximation of the actual contamination rate. This first contamination estimate is computed by contDeam (see schematic in Fig. 2). This program computes the likelihood of observing the aDNA fragments aligned to the reference genome given fixed endogenous deamination patterns and a prior on the rate of presentday human contamination. It then returns the contamination rate with the highest posterior probability. This contamination rate is the most likely value needed to explain the difference between deamination rates for fragments identified as endogenous and overall deamination rates for all the fragments of the entire dataset. We start from the assumption that only the endogenous DNA has the deamination patterns typical of aDNA and that contaminant fragments are not deaminated and will, therefore, only reduce overall deamination rates. Previous studies suggest that deamination is rare in contaminants younger than about 100 years old [8]. Having deaminated contaminant fragments may lead to underestimates. We discuss the extent of the potential underestimate at the end of this section.
To identify the endogenous fragments and derive their deamination rate, there are two possible approaches. The first involves the separation of the endogenous and contaminant fragments using diagnostic positions on the mitochondrial genome. This is relatively straightforward when dealing with Neanderthal or Denisovan individuals, as their mitochondrial genome sequences fall outside of presentday human variation [29, 30]. For instance, there are 111 diagnostic positions on the mitochondrial genome sequence at which seven Neanderthals share the same base, which differs from 20 presentday humans.
However, when the endogenous sample is an early modern human and falls within presentday human variation, this approach lacks power due to the rarity of such diagnostic sites. A second strategy takes advantage of the observation that deamination at the 5^{â€²} end of the fragment is independent of the deamination occurring at the 3^{â€²} end and vice versa. By conditioning on observing deamination at one end and measuring the rates of deamination at the other, an estimate of the deamination rates of the endogenous fragments can be obtained [10]. This second strategy requires an endogenous base to measure rates of deamination. We, therefore, use the mitochondrial reference sequence as the endogenous template. This assumption yields accurate results even for the highly divergent Denisovan mitochondrial genome. The contamination prior estimated by schmutzi uses this second approach by default. The estimate of the endogenous deamination rate is calculated only once, when launching contDeam. The contamination estimate obtained by contDeam is subsequently used as contamination prior for the first iteration (see Fig. 2).
Let \(\mathbb {R}\) be the set of all fragments and \(R_{j} \in \mathbb {R}\) be a particular aligned fragment of length l. We compute the probability of observing this particular alignment to the reference genome given two models: (i) the null model, where any difference from the reference can be solely explained by sequencing error or (ii) the deaminated model, where deamination and sequencing errors could have given rise to this particular alignment to the reference. For fragment R _{ j }, let \(\{ r_{1}, \dots, r_{l} \}\) be the individuals nucleotides and their respective error probabilities \(\{ \epsilon _{1}, \dots, \epsilon _{l} \}\), both of which are provided by the base caller. Let E denote the event that a sequencing error has occurred, D the event that deamination has occurred and let Â¬ denote the complement of an event (i.e., the event has not occurred).
We compute the likelihood of observing the base r _{ i }âˆˆR _{ j }, aligned to the reference nucleotide n, by assuming that nucleotide n was the endogenous template. The likelihood of observing r _{ i } under the null model, denoted p _{ n }(r _{ i }), is computed by taking into account two events, either a sequencing error has occurred or it has not:
where p[nâ†’r _{ i }Â¬E] is the probability that r _{ i } is observed if n was the template. This quantity is 1 as both nucleotides are identical. The other term, p[nâ†’r _{ i }E], is the probability of a substitution from nucleotide n to r _{ i } given sequencing error. This term is approximately equal to 1/3 but empirical substitution rates are used (see next section for details). Under the deaminated model, the probability of seeing base r _{ i } (given the template n) denoted p _{ d }(r _{ i }) is
as three events need to be taken into account: (i) \(\neg D \cap \neg E\), absence of both sequencing error and deamination (if n=r _{ i }), and either (ii) D deamination or (iii) E error occurred and nâ‰ r _{ i }. We currently ignore the probability of observing the data given that both deamination and a sequencing error have occurred (\(D \cap E\)) as it is very unlikely compared to the scenarios mentioned above. The probability of observing a substitution nâ†’r _{ i } given deamination (P[ nâ†’r _{ i }D]) is computed using the endogenous deamination rates that were described earlier. The term \(P [\!n \to r_{i} \neg D \cap \neg E]\) is the probability that base r _{ i } remains as is. This probability is obtained by subtracting from 1, the deamination probability of the remaining bases. For instance, if a given base has a deamination rate of 0.3, the probability that the base remains as is, given the absence of sequencing error, is 0.7.
Let C be the event that we sampled the fragment R _{ j } from a contaminant mitochondrial genome and Â¬C be the event that we sampled from the endogenous genome. We compute the probability of observing fragment R _{ j } with its alignment to the reference given that it was sampled from the endogenous genome by assuming that each base is an independent observation and that the probability of seeing any difference to the reference is explained by the deaminated model described by Eq. 2. Hence, we have:
and similarly, if R _{ j } was sampled from the contaminant, the probability of any base that differs from the reference is explained solely by sequencing errors (as defined by Eq. 1). This probability for all bases is given by
There are two events that could have occurred: either we sampled the fragment from the contaminant with probability denoted c _{d} or we sampled from the endogenous genome with probability 1âˆ’c _{d}. The goal of contDeam is to estimate c _{d} given the data. Using Eqs. 3 and 4, we obtain the probability of observing R _{ j } given that it is sampled from the contaminant at rate c _{d}:
since P[ C]=c _{d} by definition. The probability of observing all the fragments in set R, assuming the reference as the template and the endogenous deamination rates that were initially computed, for a given contamination rate c _{d}, is given by assuming that each fragment is an independent observation:
Finally, the posterior probability of the contamination rate is given by omitting the probability term for the data (\(P[\mathbb {R}]\)) as it is independent of the contamination rate, and using a uniform prior for the contamination rate (P[ c _{d}]). This posterior probability is, therefore,
We then produce the contamination rate \(\widehat {c_{\mathrm {d}}}\) with the highest posterior probability:
One advantage of this approach is that it does not require the computation of the endogenous consensus. However, it also does not allow the user to identify the source of the contamination. Furthermore, it may underestimate contamination if the contaminant is deaminated (see Additional file 1: Results, Section 2.3.4). The assumption that the mitochondrial genome reference sequence is the template does not seem to influence the final contamination estimate even for the highly divergent Denisovan mitochondrial genome (see Additional file 1: Results, Section 2.3.3).
endoCaller: mitochondrial consensus call
The first step of the iterative process is to call an initial consensus of the endogenous mitochondrial genome from mtDNA fragments aligned to a mitochondrial reference sequence (endoCaller in Fig. 2).
The consensus call relies on computing the probability of observing the aligned aDNA data for a particular pair of endogenous and contaminant nucleotides at a specific site, given a fixed contamination prior and fixed deamination patterns. The endogenous consensus caller seeks to identify the pair of endogenous and contamination nucleotides with the highest posterior probability given the aligned aDNA fragments. We also consider insertion/deletion at a given position. We assume that at any position there is a single nucleotide from the presentday human contaminant. The impact of having multiple contaminating nucleotides was also considered (see â€˜Resultsâ€™).
For a given position in the mitochondrial reference sequence, assuming a single contaminant, there are two bases to infer, b _{e} and b _{c}, for the endogenous and contaminant genomes, respectively. Let R be the set of all fragments and \(R_{j} \in \mathbb {R}\) be a fragment of length l that overlaps the position. Let \(\{ r_{1}, \dots, r_{l} \}\) be the individual nucleotides of the fragment R _{ j }, as identified by the base caller. The respective error probabilities \(\{ \epsilon _{1}, \dots, \epsilon _{l} \}\) for each base are also provided by the base caller.
For the position to be evaluated, let the nucleotide r _{ i } be the base of fragment R _{ j } that aligns at that specific position. Let Îµ _{ i } be its error probability as determined by the base caller. Let M be the event that R _{ j } was correctly mapped and P[M] is estimated using the mapping quality provided by the mapper. Let \(\mathbb {E}\) be the set of fragments from the endogenous mitochondrial genome such that \(\mathbb {E} \subseteq \mathbb {R}\). We will assume that the a priori probability that fragment R _{ j } is endogenous is \(P[\!R_{j} \in \mathbb {E}]\). This quantity is computed using both the deamination patterns of the fragment and its length to derive a probability of that fragment being endogenous. The equations for this expression are described in greater detail at the end of this section.
In having observed the base r _{ i }, there are two possibilities: the base came either from the contaminant with probability \(1P[\!R_{j} \in \mathbb {E}]\) or from the endogenous sample with probability \(P[\!R_{j} \in \mathbb {E}]\). We assume for now that the fragment was properly mapped (i.e., M occurred). The final equation, which considers either possibility, is presented in â€˜Mappingâ€™. The probability of observing base r _{ i }, denoted by P[ r _{ i }b _{e},b _{c},M], is given by
The expression P _{e}[r _{ i }b _{e},M] is the probability of observing r _{ i } given that the fragment is endogenous and b _{e} is the endogenous base. Let E denote the event that a sequencing error has occurred and let Â¬E denote the complement of the event or, in other words, that the sequencing was correct and no error has occurred. The quantity P _{e}[ r _{ i }b _{e},M] is given by
Given that the base is correct (i.e., without sequencing error), both r _{ i } and b _{e} should be identical; hence,
However, due to deamination, it is possible to have a substitution with the probability derived from the deamination profile entered as input. Let Î© be the set of all DNA bases (Î©={A,C,G,T}). Under the deamination model, the term P _{e}[ b _{e}â†’r _{ i }Â¬E,M] becomes
where rate_{deam}(bâ†’r _{ i }) is the rate of nucleotide substitution from b to r _{ i } due to deamination at that specific position of the fragment. As stated before, the deamination rates per base for each position of the fragment are entered as input and remain unchanged by endoCaller. For sequencing errors, the probability of base substitution can be obtained using the assumption that any given nucleotide is equally likely to be miscalled as any of the remaining three nucleotides:
However, studies on Illumina sequencing errors show that this assumption is often incorrect [31]. We, therefore, recommend using empirical nucleotide substitutions rates from an Illumina sequencing run (provided with the software package). The new error probability term becomes
where # xâ†’y represents the number of times a mismatch between the reference base x to an observed y occurred. These counts were determined using spikedin control sequences aligned to the PhiX genome provided by Illumina Corp.
A similar computation is derived for the probability of seeing r _{ i } given that we sampled the contaminant base b _{c} (P _{ c }[ r _{ i }b _{c},M]). However, the deamination profile provided as input for the contaminant fragments are different from the endogenous ones and tend to be much lower (the end of â€˜Methodsâ€™ describes the test data for empirical deamination rates for both endogenous and contaminant fragments). Our mitochondrial consensus caller endoCaller allows for deamination of the contaminant unlike contDeam, which assumes that the contaminant fragments have little to no deamination.
Mapping
Thus far, it was assumed that the fragment R _{ j } was correctly mapped. For fragments not properly mapped, we estimate that the probability of seeing the base r _{ i } is independent of bases b _{e} and b _{c} and is simply the probability of observing r _{ i }:
The probability of fragment R _{ j } being incorrectly mapped is obtained using its mapping quality, and we, therefore, combine Eqs. 9 and 15 into one to compute the final probability of observing the base r _{ i }, denoted by P[ r _{ i }b _{e},b _{c}]:
where \(m_{R_{j}}\) is the probability that the fragment R _{ j } is mismapped (i.e., \(m_{R_{j}} = P[\neg M] \)).
Producing the most likely bases
The probability of observing the data given every endogenous and contaminant base has been described. However, the posterior probability of the pair of bases given the data \(\mathbb {R}\) is the quantity that is sought. We assume that every fragment R _{ j } represents an independent observation and we also consider that the likelihood of bases b _{e} and b _{c} given the data is proportional to the probability of observing the data given the pair of nucleotides times a flat prior:
Once the joint probability for all pairs of nucleotides is computed, a marginalization over b _{c} is used to obtain the likelihood of a given endogenous base:
A marginalization over the endogenous base is used to call the contaminant base. Finally, the most likely endogenous nucleotide \(\widehat {b_{\mathrm {e}}}\) is produced:
The probability of error on \(\widehat {b_{\mathrm {e}}}\) is given by the ratio of the sum of the probabilities for all alternative bases except the most likely over the sum of the probabilities for all bases:
An analogous computation is done to determine the contaminant base. The computation for insertions and deletions is similar (see Additional file 1: Methods, Section 1.2).
Computation of \(P[R_{j} \in \mathbb {E}]\)
For the probability that a given fragment R _{ j } is endogenous, denoted as \(P[\!R_{j} \in \mathbb {E}]\), our model takes into consideration two factors: deamination patterns and the length of the fragments. Parameters for these two factors are introduced as input to the endogenous caller. Such parameters are reestimated at each iteration using fragments that support an endogenous base versus a contaminant one (splitEndo in Fig. 2). The splitEndo module will (i) use the output of endoCaller from the previous iteration and separate fragments that support the endogenous or the contaminant base at positions where they differ and (ii) estimate deamination parameters and fit a lognormal distribution on each separated set of fragments independently. Deamination rates are obtained by measuring rates of nucleotide substitution from the reference base at a given position in the fragment and the lognormal parameters are obtained by a maximumlikelihood fit using the fitdistrplus R package. These estimates are fixed throughout a single iteration and are reestimated by splitEndo in the following one.
Endogenous fragments tend to exhibit higher rates of deamination than contaminant fragments (see Additional file 1: Methods, Section 1.7). In the previous section where contDeam was described, we compared a model that considers deamination and sequencing errors, and another model that solely uses sequencing errors to compute the probability of seeing a particular alignment given the reference as template. In this section, we seek to incorporate the possibility that the template might be a different base than the endogenous one for greater accuracy. Let E denote the event that a sequencing error has occurred, D the event that deamination has occurred and let Â¬ denote the complement of an event (i.e., the event has not occurred). First, we seek to compute the probability of observing the base r _{ i }, part of the fragment R _{ j }, given that it originated from endogenous base b _{e} under a model where substitutions are solely due to sequencing errors. This term, denoted p _{ n }(r _{ i }), is obtained similarly to Eq. 1 but by considering all four potential endogenous bases b _{e} as follows:
where P _{ n }[r _{ i }b _{e}] is equal to
where \(P[\neg b_{\mathrm {e}}\mathbb {R}]\) is the probability of error for endogenous base b _{e} as defined in Eq. 20. The nucleotide substitution probabilities given either absence or presence of a sequencing error are computed as described in the contDeam section. Second, we compute the probability of seeing base r _{ i } given endogenous base b _{e} if any difference is explained by either deamination or sequencing errors. Like Eq. 2, this probability, denoted P _{d}[ r _{ i }], is computed using
where P _{d}[r _{ i }b _{e}] is equal to
Again, the substitution probabilities given either deamination or sequencing error are computed as described in the contDeam section.
We compute the probability that the aligned fragment R _{ j } was observed under a deamination and sequencing error model, denoted P[ R _{ j }M _{deam}], by taking the product for each base \(r_{1}, \dots, r_{l} \in R_{j}\) of the term described by Eq. 23. The probability that aligned fragment R _{ j } was observed under a sequencing error model, denoted P[ R _{ j }M _{null}] uses the product of the term described by Eq. 21 where only sequencing errors are considered.
As mentioned previously, endoCaller needs as input a prior, denoted c _{c}, on the rate of presentday human contamination. Finally, both probabilities are combined with our prior on a fragment being endogenous of 1âˆ’c _{c} as a posterior probability to obtain the probability that fragment R _{ j } is deaminated:
Differences in fragment lengths between the endogenous and contaminant sequences can also be informative about contamination. Ancient fragments tend to be shorter than modern contaminating DNA fragments due to degradation of aDNA [1, 29, 30, 32] (see Additional file 1: Methods, Section 1.5). Other studies have modeled the length of aDNA fragments using a lognormal distribution [33]. Here we model the endogenous and contaminant fragment length distributions using two lognormal distributions and infer, using empirical distributions, four parameters, Î¼ _{endo},Ïƒ _{endo},Î¼ _{cont} and Ïƒ _{cont}, for the location and scale parameters of the endogenous and contaminant lognormal distributions, respectively. Again, these parameters are estimated by splitEndo at each iteration. The probability that the fragment R _{ j } of length l was sampled from the endogenous distribution is given by the probability density function for the lognormal distribution:
The probability that the fragment is from the contaminant distribution (P[R _{ j }âˆˆcont_{dist}]) is calculated the same way except using the location and scale for that distribution. The posterior probability of both terms is used to compute the probability that fragment R _{ j } pertains to the endogenous distribution using the contamination prior:
Finally, the deamination and length probabilities are combined to compute the probability that a fragment is endogenous (\(P[\!R_{j} \in \mathbb {E}]\)).
mtCont: mitochondrial contamination estimate
Once the endogenous base and its likelihood have been computed for a given site, a second program takes this information, together with the aligned BAM file of all fragments covering each site, and determines the most likely contaminating genome from the database of possible contaminants as well as the contamination rate (mtCont in Fig. 2). This is achieved by determining the most likely contamination rate using sites where bases in the putative endogenous and contaminant genomes differ. Once this computation is finished for all mitochondrial genomes in the database, the genome with the highest likelihood of being the contaminant is identified (see details in Additional file 1: Methods, Section 1.6).
In the previous section, a fixed contamination prior was supplied to endoCaller and the most likely endogenous and contaminant bases were inferred given the data. In this section, mtCont computes the most likely contamination rate given the data for fixed probabilities for the endogenous and contamination bases, which are provided by endoCaller. As in endoCaller, the deamination rates are entered as input. The contamination estimate generated by contDeam at iteration #1 is recalculated by mtCont in subsequent iterations (see Fig. 2).
For a given position on the mitochondrion, let b _{e} be a possible base from the endogenous sample and c be a potential base from the contaminant. Let the contamination rate be c _{r}, defined as the probability of seeing a base from the contaminant at this given position. Therefore, the probability that the base is endogenous is 1âˆ’c _{r}. Like the terms used in the section above, let R _{ j } be a fragment with mismapping probability \(m_{R_{j}}\) and let base r _{ i } be its base at the position of interest. The probability of observing r _{ i } given that either b _{e} or c could have given rise to it, denoted P[ r _{ i }b _{e},c], is
where the probability of being mismapped is defined as in Eq. 15. If the fragment is properly mapped, it can originate from either the contaminant or the endogenous genome. Using the defined contamination rate, we can quantify P[r _{ i }b _{e},c,M], the probability of observing r _{ i } given that the fragment was correctly mapped as
since we either sampled from the contaminant with probability c _{r} or from the endogenous base with probability 1 âˆ’ c _{r}. The probability of observing the base r _{ i } given it came from either the endogenous material (P _{e}[ r _{ i }b _{e},c,M]) or the contamination (P _{ c }[ r _{ i }b _{e},c,M]) considers sequencing errors and deamination rates. The precise terms found for such quantities are derived as in Eq. 10. The only difference is that a deaminated substitution model is used for the endogenous base whereas a model that only considers sequencing errors is used for the contaminant base.
Let Î© ^{2} be the set of all possible pairs of nucleotides. For a given contamination rate c _{r}, the probability (P[ r _{ i }]) of observing the base r _{ i } is obtained by marginalizing over each possible contaminant and endogenous base:
where the term P[ r _{ i }b _{e},c] is defined in Eq. 28. The combined probability of b _{e} being the endogenous and c being the contaminant base is given by P[ b _{e},c]=P[ b _{e}]P[ c]. The prior on the endogenous base P[ b _{e}] is one minus the probability that b _{e} is not the endogenous base, a quantity defined by Eq. 20. The probability P[ c] is defined by the probability of having nucleotide c in the putative contaminant mitochondrial sequence.
The total likelihood is obtained by the product of Eq. 30 for every fragment. This likelihood is computed for every contamination rate between 0 and 100 % assuming a uniform prior on the contamination rate and for each mitochondrial genome in the set of putative contaminants. Finally, the contaminant genome is determined and the contamination rate with the highest posterior probability, as well as a 95 % confidence interval, is produced.
Discussion
aDNA analyses have typically decoupled reconstruction of the endogenous mitochondrial genome from quantification and characterization of presentday human contamination. Since these two tasks are interdependent, we argue that consensus calling and contamination estimation should be performed iteratively to achieve the most accurate results. Current approaches to determining the endogenous mtDNA sequence are very dependent on the amount of contamination. In samples with low presentday human contamination, a consensus sequence is usually called using all sequences, whereas for highly contaminated samples, only deaminated fragments are used. However, there is no clear contamination cutoff to determine which strategy should be used. Schmutzi can be applied to samples with either low or high levels of contamination thereby obviating this decision.
We have presented here empirical and simulated datasets demonstrating that schmutzi outperforms a number of existing approaches to consensus sequence calling and contamination estimation over a wide range of contamination rates and coverages. Our simulations were conducted using empirical fragment length distributions and deamination rates. It is trivial to see that higher deamination rates can enable end users to infer with greater confidence the endogenous sequence of even highly contaminated samples. We note that absence of deamination will yield incorrect estimates of contamination. Since deamination is the primary feature used to distinguish endogenous from contaminant bases, treatment with full uracilDNA glycosylase [34] is also likely to impact negatively the estimation of contamination and result in an incorrect endogenous consensus call at high levels of contamination. We, therefore, recommend using schmutzi only for samples with either no, or partial, uracilDNA glycosylase treatment for potentially contaminated samples. It is important to note that the number of parameters and their range hinder us from making simple general statements about the amount of coverage or extent of deamination required for accurate estimates of presentday human contamination or accurate inference of the endogenous genome sequence. Although our study focused on human mitochondrial aDNA data, schmutzi can be applied to any other haploid aDNA dataset for which a reference genome is available. This includes nonhuman mitochondrial genomes, as well as viral, bacterial and chloroplast genomes.
Although many groups have implemented ad hoc methods to assess contamination, there are few available software implementations. We compared schmutzi to contamMix, a previously used maximumlikelihood method described in [14]. The predicted contamination rates produced by our algorithm are more accurate than those produced by this method on simulated data (see Additional file 1: Results, Section 2.3.6). Although the true contamination rate is not known for most ancient datasets, we have shown that our estimates are also consistent with contamination measured in empirical datasets using methods relying on diagnostic positions. While the approach of taking diagnostic positions is suitable for archaic humans like Neanderthals, it is not readily applicable to early modern humans, who have few fixed differences to presentday humans. Schmutziâ€™s modeling of mismatches due to deamination, sequencing errors and mismapping results in greater accuracy than simply estimating a single error parameter.
Our endogenous consensus call shows a significant dependence on the prior, which is calculated based on the deamination patterns only for the first iteration (contDeam). We interpret this as evidence that a reasonable estimate for contamination can be obtained from deamination. For contDeam, we have also evaluated the impact on the final estimate due to biases like insufficient deamination and having deamination for contaminant fragments (see Additional file 1: Results Section 2.3.4). We do, however, notice that the contamination estimate improves incrementally during iteration of consensus calling and contamination estimation, suggesting that additional information is available in the mitochondrial endogenous consensus. This is particularly useful for low coverage samples.
Schmutzi accurately infers the endogenous ancient genome sequence from unfiltered ancient sequence data. This is of particular importance when the contamination is high. Interestingly, schmutzi is also more accurate than approaches that reduce contamination by using only deaminated fragments to call the consensus. Such approaches substantially reduce the number of fragments available for calling the consensus, which may explain why schmutzi is marginally better at determining the consensus sequence.
Although schmutzi performs well for both simulated and empirical data, a few artifacts are not currently modeled in the software. First, it is possible that there are multiple presentday human contaminants. At low contamination rates with multiple contaminants, schmutzi will underestimate the contamination, but the inference of the endogenous consensus sequence should not be affected. However, at high contamination rates, multiple contaminants make the inference of the endogenous sequence and estimation of the contamination extremely difficult, since the endogenous and contaminant alleles do not follow the expected distributions. Second, inclusion of misaligned microbial sequences and mitochondrial heteroplasmy are also not currently considered in the computation, though the empirical data suggest that schmutzi is not particularly sensitive to these. Lastly, the use of target enrichment approaches with DNA probes that are closer to the contaminant than to the endogenous sequence may cause differences in allele sampling, and may lead to incorrect consensus calls (see Fig. 4 and Additional file 1: Section 2.2.3 for further discussion about the capture bias).
Schmutzi is sensitive to the divergence between the actual contaminant and the closest record in the database of putative contaminants. If this divergence is very large (e.g., more than 30 mismatches), contamination will be underestimated.
When contamination rates are high, the predicted contaminant can be inferred at high resolution. This enables the program to use this predicted contaminant as a database record for the quantification of mitochondrial contamination (see Additional file 1: Results). This is not feasible at low contamination rates, where the prediction of the contaminant mtDNA is poor. Our method does not currently use phylogenetic information to infer the endogenous and contaminant sequences. Although our approach works well empirically, the use of phylogenetic information could provide additional power for obtaining contamination estimates in very low coverage samples.
In conclusion, we have described an algorithm that infers the endogenous mitochondrial genome sequence from an aDNA sample, even in the presence of high contamination. We have applied this to the reconstruction of mitochondrial genomes for archaic and early modern humans and show that it is possible to quantify accurately contamination from presentday individuals.
Abbreviations
 aDNA:

Ancient DNA
 MIA:

Mapping iterative assembler
References
PrÃ¼fer K, Stenzel U, Hofreiter M, PÃ¤Ã¤bo S, Kelso J, Green RE. Computational challenges in the analysis of ancient DNA. Genome Biol. 2010; 11:47.
Briggs AW, Stenzel U, Johnson PL, Green RE, Kelso J, PrÃ¼fer K, et al. Patterns of damage in genomic DNA sequences from a Neandertal. Proc Natl Acad Sci. 2007; 104:14616â€“21.
Poinar HN, Schwarz C, Qi J, Shapiro B, MacPhee RD, Buigues B, et al. Metagenomics to paleogenomics: largescale sequencing of mammoth DNA. Science. 2006; 311:392â€“4.
Bandelt HJ. Mosaics of ancient mitochondrial DNA: positive indicators of nonauthenticity. Eur J Hum Genet. 2005; 13:1106â€“12.
Wall JD, Kim SK. Inconsistencies in Neanderthal genomic DNA sequences. PLoS Genet. 2007; 3:175.
Parks M, Lambert D. Impacts of low coverage depths and postmortem DNA damage on variant calling: a simulation study. BMC Genomics. 2015; 16:19.
Green RE, Malaspinas AS, Krause J, Briggs AW, Johnson PL, Uhler C, et al. A complete Neandertal mitochondrial genome sequence determined by highthroughput sequencing. Cell. 2008; 134:416â€“26.
Sawyer S, Krause J, Guschanski K, Savolainen V, PÃ¤Ã¤bo S. Temporal patterns of nucleotide misincorporations and DNA fragmentation in ancient DNA. PLoS One. 2012; 7:34131.
Skoglund P, Northoff BH, Shunkov MV, Derevianko AP, PÃ¤Ã¤bo S, Krause J, et al. Separating endogenous ancient DNA from modern day contamination in a Siberian Neandertal. Proc Natl Acad Sci. 2014; 111:2229â€“34.
Meyer M, Fu Q, AximuPetri A, Glocke I, Nickel B, Arsuaga JL, et al. A mitochondrial genome sequence of a hominin from Sima de los Huesos. Nature. 2014; 505:403â€“6.
Green RE, Krause J, Ptak SE, Briggs AW, Ronan MT, Simons JF, et al. Analysis of one million base pairs of Neanderthal DNA. Nature. 2006; 444:330â€“6.
PrÃ¼fer K, Racimo F, Patterson N, Jay F, Sankararaman S, Sawyer S, et al. The complete genome sequence of a Neanderthal from the Altai mountains. Nature. 2014; 505:43â€“9.
Olalde I, Allentoft ME, SÃ¡nchezQuinto F, Santpere G, Chiang CW, DeGiorgio M, et al. Derived immune and ancestral pigmentation alleles in a 7,000yearold Mesolithic European. Nature. 2014; 507:225â€“8.
Fu Q, Mittnik A, Johnson PL, Bos K, Lari M, Bollongino R, et al. A revised timescale for human evolution based on ancient mitochondrial genomes. Curr Biol. 2013; 23:553â€“9.
JÃ³nsson H, Ginolhac A, Schubert M, Johnson PL, Orlando L. mapDamage2. 0: fast approximate Bayesian estimates of ancient DNA damage parameters. Bioinformatics. 2013; 29:1682â€“4.
Helgason A, Palsson S, LaluezaFox C, Ghosh S, Sigurdardottir S, Baker A, et al. A statistical approach to identify ancient template DNA. J Mol Evol. 2007; 65:92â€“102.
Korneliussen TS, Albrechtsen A, Nielsen R. ANGSD: analysis of next generation sequencing data. BMC Bioinforma. 2014; 15:356.
Joint estimation of contamination for ancient DNA and endogenous mitochondrial genome inference. https://bioinf.eva.mpg.de/schmutzi/. Access date Sept 30th.
Fu Q, Li H, Moorjani P, Jay F, Slepchenko SM, Bondarev AA, et al. Genome sequence of a 45,000yearold modern human from western Siberia. Nature. 2014; 514:445â€“9.
Meyer M, Kircher M, Gansauge MT, Li H, Racimo F, Mallick S, et al. A highcoverage genome sequence from an archaic Denisovan individual. Science. 2012; 338:222â€“6.
Gansauge MT, Meyer M. Selective enrichment of damaged DNA molecules for ancient genome sequencing. Genome Res. 2014; 24:1543â€“9.
Lazaridis I, Patterson N, Mittnik A, Renaud G, Mallick S, Kirsanow K, et al. Ancient human genomes suggest three ancestral populations for presentday Europeans. Nature. 2014; 513:409â€“13.
Duggan AT, Whitten M, Wiebe V, Crawford M, Butthof A, Spitsyn V, et al. Investigating the prehistory of Tungusic peoples of Siberia and the AmurUssuri Region with complete mtDNA genome sequences and Ychromosomal markers. PloS One. 2013; 8:83570.
Barbieri C, Vicente M, Oliveira S, Bostoen K, Rocha J, Stoneking M, et al. Migration and interaction in a contact zone: mtDNA variation among Bantuspeakers in southern Africa. PloS One. 2014; 9:99117.
David M, Dzamba M, Lister D, Ilie L, Brudno M. SHRiMP2: sensitive yet practical short read mapping. Bioinformatics. 2011; 27:1011â€“12.
Van Oven M, Kayser M. Updated comprehensive phylogenetic tree of global human mitochondrial DNA variation. Hum Mutat. 2009; 30:386â€“94.
KlossBrandstÃ¤tter A, Pacher D, SchÃ¶nherr S, Weissensteiner H, Binna R, Specht G, et al. HaploGrep: a fast and reliable algorithm for automatic classification of mitochondrial DNA haplogroups. Hum Mutat. 2011; 32:25â€“32.
C library for highthroughput sequencing data formats. https://github.com/samtools/htslib. Access date Sept 30th.
Green RE, Briggs AW, Krause J, PrÃ¼fer K, Burbano HA, Siebauer M, et al. The Neandertal genome and ancient DNA authenticity. EMBO J. 2009; 28:2494â€“502.
Krause J, Fu Q, Good JM, Viola B, Shunkov MV, Derevianko AP, et al. The complete mitochondrial DNA genome of an unknown hominin from southern Siberia. Nature. 2010; 464:894â€“7.
Nakamura K, Oshima T, Morimoto T, Ikeda S, Yoshikawa H, Shiwa Y, et al. Sequencespecific error profile of Illumina sequencers. Nucleic Acids Res. 2011; 39:90.
GarciaGarcera M, Gigli E, SanchezQuinto F, Ramirez O, Calafell F, Civit S, et al. Fragmentation of contaminant and endogenous DNA in ancient samples determined by shotgun sequencing; prospects for human palaeogenomics. PloS One. 2011; 6:24161.
Renaud G, Stenzel U, Kelso J. leeHom: adaptor trimming and merging for Illumina sequencing reads. Nucleic Acids Res. 2014; 42:141.
Rohland N, Harney E, Mallick S, Nordenfelt S, Reich D. Partial uracilDNAglycosylase treatment for screening of ancient DNA. Philos Trans R Soc London B: Biol Sci. 2015; 370:20130624.
Acknowledgments
We would like to acknowledge the help of Udo Stenzel, Matthias Meyer, Marie Gansauge, Michael Dannemann and the entire Ancient DNA Methods group at the Max Planck Institute of Evolutionary Anthropology for their expertise. We would like to thank Fernando Racimo and Montgomery Slatkin for their useful input. We are also indebted to Joana Rocha, Susanna Sawyer and Johann Visagie for their help in testing the software and expertise regarding mitochondrial genomes. We are also grateful to Anahita Kazem for proofreading parts of our manuscript. We acknowledge the Max Planck Society for funding and Natural Sciences and Engineering Research Council of Canada (NSERC) for a PGS D scholarship.
Author information
Authors and Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Authorsâ€™ contributions
GR developed, implemented and tested the algorithm. VS provided aDNA sequencing expertise and test data. ATD helped with haplogroup determination, built the database of putative mitochondrial contaminants and reviewed the manuscript. JK provided guidance for the project. GR, VS and JK wrote the manuscript. All authors read and approved the final manuscript.
Additional file
Additional file 1
Supplementary material. (PDF 2232 kb)
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. 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.
About this article
Cite this article
Renaud, G., Slon, V., Duggan, A.T. et al. Schmutzi: estimation of contamination and endogenous mitochondrial consensus calling for ancient DNA. Genome Biol 16, 224 (2015). https://doi.org/10.1186/s1305901507760
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s1305901507760