CoChat

<tt>SAFARI</tt> : pangenome alignment of ancient DNA using purine/pyrimidine encodings

Open access

The DOI matches its Crossref record; 55 of the 55 references it cites were found in a registry or an index; 31 of the 37 sources its claims cite were checked for support.

Abstract

Abstract Aligning DNA sequences retrieved from fossils or other paleontological artifacts, referred to as ancient DNA (aDNA), is particularly challenging due to the short sequence length and chemical damage which creates a specific pattern of substitution (C$\rightarrow$T and G$\rightarrow$A) in addition to the heightened divergence between the sample and the reference genome thus exacerbating reference bias. This bias can be mitigated by aligning to pangenome graphs to incorporate documented organismic variation, but this approach still suffers from substitution patterns due to chemical damage. We introduce a novel methodology introducing the RYmer index, a variant of the commonly used minimizer index which represents purines (A,G) and pyrimidines (C,T) as R and Y, respectively. This creates an indexing scheme robust to the aforementioned chemical damage. We implemented SAFARI (Sensitive Alignments From A RYmer Index), an aDNA damage-aware version of the pangenome aligner vg giraffe, which uses RYmers to rescue alignments containing deaminated seeds. For highly damaged samples, the recovery rate could be upwards of 10%, an amount which could well affect downstream results. We show that our approach produces more correct alignments from aDNA sequences than current approaches while maintaining a tolerable rate of spurious alignments. In addition, we demonstrate that our algorithm improves the estimate of the rate of aDNA damage, especially for highly damaged samples. Crucially, we show that this improved alignment can directly translate into better insights gained from the data by showcasing its integration with a number of extant pangenome tools.

Overview

CoChat Summary

## TL;DR

SAFARI is a damage-aware modification of `vg giraffe` that uses purine/pyrimidine encodings (“RYmers”) to rescue ancient-DNA seeds disrupted by deamination. Across simulated and empirical aDNA benchmarks, it increased sensitivity and downstream performance, with reported gains up to 10% in highly damaged samples.

## Key findings

  • In surjected linear alignments, SAFARI improved sensitivity on high-damage samples; at sensitivity-optimized \((k,w)=(10,2)\), it recovered 102 more nonspurious alignments (269,425 for `vg giraffe` vs 269,527 for SAFARI, out of 270,163 total).
  • At default \(k=29\), the same dataset showed a larger gain: 14,883 additional recovered alignments (123,588 vs 138,471 out of 270,163 total).
  • In damage estimation from surjected BAM files, SAFARI reduced median RMSE relative to `vg giraffe`; the paper states there was zero difference with no damage and very little change at low damage, with improvements increasing at medium/high damage.
  • In HaploCart, SAFARI increased aligned/processed reads and reduced mean Levenshtein distance between prediction and ground truth by ~8%.
  • In euka, SAFARI detected more fragments per taxon in almost all cases; for the most abundant taxon (Calyptratae), detected fragments increased by 6.08%, and no false-positive taxa were detected in either case.
  • The abstract reports that for highly damaged samples, recovery rate could be upwards of 10%.

## Methods

  • The paper introduces RYmer indexing, which converts kmers into purine/pyrimidine space by mapping A/G → R and C/T → Y, then uses a SAFARI Bayesian filter to decide whether a RYmer-space match is likely due to deamination or spurious alignment.
  • SAFARI was implemented as a modified `vg giraffe` workflow with a new `vg rymer` subcommand and an additional `*.ry` index; downstream clustering and extension remain in standard kmer space.
  • Evaluation used four benchmarking strategies: surjected linear alignments, damage-rate estimation from surjected BAMs, HaploCart on 20 ancient samples with downsampling to 0.25×, 0.5×, 1.0×, and 2.0× (with five replicates per sample), and euka on a simulated Late Pleistocene cave metagenomic environment.

## Limitations

  • The paper states that the Bayesian spurious-match model is only a “cursory approximation” and that mismatch distributions likely depend heavily on contaminant genomes.
  • The authors say they cannot fully answer the best indexing parameters \((k,w)\); optimal settings depend on the data, graph, runtime/memory limits, and use case.
  • They explicitly note that evaluations were confined to mitochondrial genomes and one chloroplast genome, so the nuclear-genome setting remains untested in this paper.
  • Evident from the text: runtime and memory requirements are considerably larger for SAFARI than for original `vg giraffe`, so scalability may be an issue.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.1093/nargab/lqaf170

Cites

55 of 55 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Figure 1. A) A sliding window traverses the pangenome reference graph. The purple, red, blue, and green paths along the graph are the embedded haplotypes. Within each window, the hash value of all kmers of the graph’s embedded haplotypes, as well as their reverse complements, are considered. (B) The integer encoding of the kmer with the minimum hash value for a given window is placed as a key in the minimizer index, with the 64-bit value of this key (the payload) being the locations of all copies of this kmer in the graph, as well as associated metadata. (C) The RYmer index is constructed in an analogous way to the minimizer index, but the sequence of the key is transformed into RYmer space, and the value stores the corresponding minimizer key that gave rise to this RYmer. (D) Four situations might arise from a given template sequence containing a seed match to an indexed RYmer. (i) The match is perfect, in which case we will observe the seed match in RYmer space, and also kmer space. The read is immediately aligned. (ii) A base in the seed is deaminated (C \rightarrow T), so we observe a match in RYmer space but not kmer space. This read is passed through our Bayesian filter where the posterior probability of being a true positive is computed. Supposing this posterior is above our predefined threshold, the read will be rescued. (iii) A spurious RYmer space match in which all mismatches in kmer space are transitions. Since the match in kmer space is not exact we apply our Bayesian filter, which does not let the read through. (iv) A spurious read which does not match in either index. It is not even considered for alignment. Adapted from [37], with permission.
Figure 1. A) A sliding window traverses the pangenome reference graph. The purple, red, blue, and green paths along the graph are the embedded haplotypes. Within each window, the hash value of all kmers of the graph’s embedded haplotypes, as well as their reverse complements, are considered. (B) The integer encoding of the kmer with the minimum hash value for a given window is placed as a key in the minimizer index, with the 64-bit value of this key (the payload) being the locations of all copies of this kmer in the graph, as well as associated metadata. (C) The RYmer index is constructed in an analogous way to the minimizer index, but the sequence of the key is transformed into RYmer space, and the value stores the corresponding minimizer key that gave rise to this RYmer. (D) Four situations might arise from a given template sequence containing a seed match to an indexed RYmer. (i) The match is perfect, in which case we will observe the seed match in RYmer space, and also kmer space. The read is immediately aligned. (ii) A base in the seed is deaminated (C \rightarrow T), so we observe a match in RYmer space but not kmer space. This read is passed through our Bayesian filter where the posterior probability of being a true positive is computed. Supposing this posterior is above our predefined threshold, the read will be rescued. (iii) A spurious RYmer space match in which all mismatches in kmer space are transitions. Since the match in kmer space is not exact we apply our Bayesian filter, which does not let the read through. (iv) A spurious read which does not match in either index. It is not even considered for alignment. Adapted from [37], with permission.CC BY · PubMed Central
Figure 2. In the case of the RYmer index, the portion of the hash table value devoted to the payload is instead used to store the key of the corresponding minimizer that gave rise to that RYmer (or a pointer to all keys of minimizers which gave rise to that RYmer, if not unique), allowing for efficient, constant-time lookup during runtime.
Figure 2. In the case of the RYmer index, the portion of the hash table value devoted to the payload is instead used to store the key of the corresponding minimizer that gave rise to that RYmer (or a pointer to all keys of minimizers which gave rise to that RYmer, if not unique), allowing for efficient, constant-time lookup during runtime.CC BY · PubMed Central
Figure 3. Sensitivity versus specificity comparison of SAFARI and vg giraffe on surjected linear alignments using the empirically derived fragment length distribution from Vindija Cave, Croatia. In both cases, the indexing parameter values were the default values, namely k=29, w=11. (A) High damage samples. Here, we can see that sensitivity has clearly improved with SAFARI thanks to the recovered alignments, at the expense of a slight drop in specificity (median sensitivity increased 12.0% from 0.458 to 0.513; median specificity dropped a negligible amount, from 0.9999 to 0.99990). (B) Samples with zero damage. As expected, there is no difference between SAFARI and vg giraffe, as the resulting alignments are identical thus showing that our strategy does not generate spurious alignment in the absence of deamination.
Figure 3. Sensitivity versus specificity comparison of SAFARI and vg giraffe on surjected linear alignments using the empirically derived fragment length distribution from Vindija Cave, Croatia. In both cases, the indexing parameter values were the default values, namely k=29, w=11. (A) High damage samples. Here, we can see that sensitivity has clearly improved with SAFARI thanks to the recovered alignments, at the expense of a slight drop in specificity (median sensitivity increased 12.0% from 0.458 to 0.513; median specificity dropped a negligible amount, from 0.9999 to 0.99990). (B) Samples with zero damage. As expected, there is no difference between SAFARI and vg giraffe, as the resulting alignments are identical thus showing that our strategy does not generate spurious alignment in the absence of deamination.CC BY · PubMed Central
Figure 4. Median F_1 score of each of the two pangenomic alignment tools stratified by level of aDNA damage under default indexing parameters (k,w) = (29,11) for the empirically derived fragment length distribution from Vindija Cave, Croatia. The improvement in median F_1 score conferred by the deaminated seed rescue in SAFARI is especially clear at high levels of damage (from 0.628 to 0.678, a 7.96% increase).
Figure 4. Median F_1 score of each of the two pangenomic alignment tools stratified by level of aDNA damage under default indexing parameters (k,w) = (29,11) for the empirically derived fragment length distribution from Vindija Cave, Croatia. The improvement in median F_1 score conferred by the deaminated seed rescue in SAFARI is especially clear at high levels of damage (from 0.628 to 0.678, a 7.96% increase).CC BY · PubMed Central
Figure 5. Median F_1 score across samples obeying the fragment length distribution from Vindija Cave, stratified by level of damage. In the case of SAFARI and vg giraffe, we use indexing parameter values (i.e. kmer size k and consecutive kmers per forward-strand window w) that optimize for maximum sensitivity. The optimized values were (k,w) = (10,2). We see that many tools worsen in performance precipitously once damage reaches a high level, with the two pangenome tools and SHRiMP being the three that are relatively robust to high damage overall. For the analogous plot with samples obeying the fragment length distribution from Chagyrskaya Cave please see Supplementary Fig. S11.
Figure 5. Median F_1 score across samples obeying the fragment length distribution from Vindija Cave, stratified by level of damage. In the case of SAFARI and vg giraffe, we use indexing parameter values (i.e. kmer size k and consecutive kmers per forward-strand window w) that optimize for maximum sensitivity. The optimized values were (k,w) = (10,2). We see that many tools worsen in performance precipitously once damage reaches a high level, with the two pangenome tools and SHRiMP being the three that are relatively robust to high damage overall. For the analogous plot with samples obeying the fragment length distribution from Chagyrskaya Cave please see Supplementary Fig. S11.CC BY · PubMed Central
Figure 6. Difference in median RMSE between ground truth and predicted nucleotide misincorporation matrices between vg giraffe and SAFARI at four distinct damage patterns, stratified by empirically derived fragment length distribution. Lower RMSE implies better performance, so if vg giraffe outperformed SAFARI the RMSE difference would be negative. We clearly see the improvement in inferred damage rate even for medium levels of damage but the improvement is particularly stark when high levels of damage are present in the input samples, due to the increased amount of information recovered from reads with deaminated seeds. Note that at zero damage the estimated damage matrices are equivalent.
Figure 6. Difference in median RMSE between ground truth and predicted nucleotide misincorporation matrices between vg giraffe and SAFARI at four distinct damage patterns, stratified by empirically derived fragment length distribution. Lower RMSE implies better performance, so if vg giraffe outperformed SAFARI the RMSE difference would be negative. We clearly see the improvement in inferred damage rate even for medium levels of damage but the improvement is particularly stark when high levels of damage are present in the input samples, due to the increased amount of information recovered from reads with deaminated seeds. Note that at zero damage the estimated damage matrices are equivalent.CC BY · PubMed Central
Figure 7. Comparison of performance metrics for HaploCart runs on aDNA samples before and after RYmer correction to the mapping. The median number of aligned and processed reads with SAFARI is 160.5 as compared to 148.0 for vg giraffe. The mean Levenshtein distance (edit distance) from the predicted to the ground truth is 6.2375 and 6.78 for SAFARI and vg giraffe, respectively (i.e. an 8.00% improvement for our tool). We report mean rather than median for the latter metric because the value is often zero.
Figure 7. Comparison of performance metrics for HaploCart runs on aDNA samples before and after RYmer correction to the mapping. The median number of aligned and processed reads with SAFARI is 160.5 as compared to 148.0 for vg giraffe. The mean Levenshtein distance (edit distance) from the predicted to the ground truth is 6.2375 and 6.78 for SAFARI and vg giraffe, respectively (i.e. an 8.00% improvement for our tool). We report mean rather than median for the latter metric because the value is often zero.CC BY · PubMed Central
Figure 8. Detected number of fragments per taxon for vg giraffe versus SAFARI in the euka experiment. In this case, SAFARI is run with the default posterior threshold of 0.5. No false positive taxa were detected in either case. In almost all instances, the number of fragments detected from the taxa increased after the RYmer correction was applied. The sole exception is Xerinae for which there was one less fragment (142 for SAFARI, 143 for vg giraffe).
Figure 8. Detected number of fragments per taxon for vg giraffe versus SAFARI in the euka experiment. In this case, SAFARI is run with the default posterior threshold of 0.5. No false positive taxa were detected in either case. In almost all instances, the number of fragments detected from the taxa increased after the RYmer correction was applied. The sole exception is Xerinae for which there was one less fragment (142 for SAFARI, 143 for vg giraffe).CC BY · PubMed Central

Verification

Claims the paper makes

18 Valid · 5 Not valid · 4 Not checked · 72 Own results and interpretations

49 more claims

Create a free account to see all 99 claims and every source verdict.

See all claims — free account
  • Probably not a substantial claim. 26
  • It may state two separate claims as one. 22
  • The quote only partly states this claim. 1

Create a free account to see these claims.

Citations

Cites

Show all 55 references

Metadata

Authors
Rubin, J., van Waaij, J., Kraft, L., Sirén, J., Sackett, P. W., & Renaud, G.
Affiliations
  • Technical University of Denmark (DK)
  • University of California, Santa Cruz (US)
  • Université Laval (CA)
Corresponding author
Rubin, Joshua
Venue
NAR Genomics and Bioinformatics
Published
2025-10-07
Volume
7
Issue
4
Pages
lqaf170-lqaf170
ISSN
2631-9268 (ISSN-L)
OpenAlex
W4417268800
Cited by
1
References
51
Citations by year
2026: 1
FWCI
0.30
Type
journal article
Language
en
Open access
Locations
  • NAR Genomics and Bioinformatics (publishedVersion, cc-by)
  • bioRxiv (Cold Spring Harbor Laboratory) (acceptedVersion, cc-by)
  • PubMed Central (publishedVersion, cc-by)
  • PubMed (publishedVersion)
  • PubMed Central (submittedVersion, cc-by)
  • eScholarship (California Digital Library) (submittedVersion, cc-by)
Funders
  • Novo Nordisk Data Science Investigator Grant number (NNF20OC0062491)
  • National Human Genome Research Institute (R01HG010485, U41HG010972, U01HG010961)
Topics
  • Life Sciences › Biochemistry, Genetics and Molecular Biology › Molecular Biology › Genomics and Phylogenetic Studies
  • Physical Sciences › Mathematics › Theoretical Computer Science › Algorithms and Data Compression
  • Life Sciences › Biochemistry, Genetics and Molecular Biology › Molecular Biology › Fractal and DNA sequence analysis
Keywords
ancient DNA, deamination, chemical injury, reference bias, pangenome graphs

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

The claim verdicts this report counts are experimental: their accuracy is not yet measured.

A language model drew the claims from the paper on 2026-10-11, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-11 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Cited sources are checked with a language model’s help (gpt-6-sol).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: <tt>SAFARI</tt> : pangenome alignment of ancient DNA using purine/pyrimidine encodings. https://app.cochat.ai/papers/10.1093/nargab/lqaf170
The paper
Rubin, J., van Waaij, J., Kraft, L., Sirén, J., Sackett, P. W., & Renaud, G. (2025). <tt>SAFARI</tt> : pangenome alignment of ancient DNA using purine/pyrimidine encodings. NAR Genomics and Bioinformatics. https://doi.org/10.1093/nargab/lqaf170

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.