Chapters and reference
Complete canonical API text; task articles explain the workflows. Usage guide

Read existing delta alignments through an optional command-line decoder
Source:R/data-delta.R
read_delta.RdInvokes an existing show-coords executable with fixed -THld arguments to read NUCMER/PROMER delta. No alignment, filtering, sorting, merging or missing-character reconstruction is performed. Source FASTA paths in the delta preamble are retained as metadata, never opened or downloaded.
Usage
R · Example code
read_delta(
file = NULL,
files = NULL,
executable = "show-coords",
query_ids = NULL,
subject_ids = NULL,
source_file = FALSE
)Arguments
- file
Optional local path vector or glob patterns, before files.
- files
Optional additional delta paths or patterns.
- executable
Existing show-coords executable name or path, default "show-coords". It must already be installed; no environment is modified.
- query_ids, subject_ids
Optional explicit named source-ID maps, following
read_chain(). Shared final IDs need explicit declaration on both sides and consistent full lengths. Defaults never auto-prefix IDs.- source_file
Add .source_file to ribbon rows, default FALSE.
Value
A list with seq_data, ribbon_data and report. The report retains original text/headers, native decoder output/messages, executable and exact arguments. No executable version is guessed when the tool cannot report one; record the prepared environment's version separately. All source rows remain distinct; no source HSP IDs or observation counts are manufactured. Parsing is explicit data preparation, never a draw-time step.
Details
Query becomes qaccver and reference becomes saccver. Original one-based inclusive directional endpoints and full lengths are checked against the tool output without shifting or inferring lengths. Original numeric-looking IDs stay strings. Source errors and signed delta scripts (including terminal zero) remain attached to each row, with physical alignment/header lines. No sequence characters are reconstructed from these scripts alone.
pident is the decoder's reported percent identity, with its printed precision; it is not inferred from endpoints. For NUCMER this describes nucleotide alignment; for PROMER it describes amino-acid alignment, while endpoint and full-length coordinates still use bp. Similarity, stop percentages and frames remain separate native fields. qspan/sspan are source interval widths, not alignment-column counts. No BLAST length or read-support field is invented.
Examples
R · Example code
decoder <- Sys.getenv("DELTA_EXECUTABLE", "show-coords")
if (nzchar(Sys.which(decoder)) || file.exists(decoder)) {
result <- read_delta("examples/genome-alignments/nucmer.delta", executable = decoder)
head(result$ribbon_data)
} else {
"Optional show-coords decoder is unavailable; no delta result was computed."
}
#> [1] "Optional show-coords decoder is unavailable; no delta result was computed."