Indelligent v2.0.0 |
|||
|
© 2026 Dmitry Dmitriev & Roman Rakitov |
|||
indelligent - reconstruct allelic sequences from mixed traces
indelligent [sequence_or_file]
indelligent -p port
indelligent --simulate
Direct sequencing of a diploid DNA template containing a heterozygous insertion or deletion results in a difficult-to-interpret mixed trace formed by two allelic traces superimposed onto each other with a phase shift. Indelligent uses a dynamic optimization algorithm to output the pair of maximally similar allelic strings which can be superimposed to produce the observed pattern of peaks. When multiple optimal solutions are possible, some of the mixed sites remain unresolved in the output. The method yields accurate reconstructions when (1) the analyzed trace has been formed by highly similar allelic sequences, (2) the indel is small relative to the length of the analyzed fragment, and (3) multiple indels, if present, are well spaced. Failed analyses result in a large number of mismatching and ambiguous sites in the output (see INTERPRETING RESULTS). The user can adjust parameters of the analysis iteratively until a satisfactory reconstruction is obtained. The method is currently in the process of development and should be used for research only, not in diagnostic procedures.
Indelligent is a free program. Not for use in diagnostic procedures.
Please cite the program as:
Dmitriev, D.A. & Rakitov, R.A. 2008. Decoding of superimposed traces produced by direct sequencing of heterozygous indels. PLoS Comput. Biol. 4(7): e1000113. doi:10.1371/journal.pcbi.1000113.
Dmitriev, D.A. & Rakitov, R.A. 2008-2025. Indelligent v.1.2.
Dmitriev, D.A. & Rakitov, R.A. 2026. Indelligent v.2.0.
The sequence to be analyzed is input as a text string, which can be typed directly in the input window or copied-and-pasted from another application. The programs providing the option to call primary and secondary peaks on sequencing chromatograms include Sequencher and PHRED. The peaks are called using the standard IUPAC symbols for mixed bases. Indelligent can analyze sequences containing symbols for double and triple peaks, as well as unknown sites (N). Example: "TKGKKSCMWN". Alternatively, the sequence can be entered as pairs of superimposed base calls separated by spaces. The order of symbols within a pair is unimportant; for unambiguous peaks two identical symbols have to be entered. Example: "AC TG GG AC". It is recommended that the chromatograms be inspected for basecalling errors prior to analysis.
Maximum phase shiftShift change penaltyFix shiftsAlign allelesFloating indel alignment Right aligned:
ATCAT....TGCC
ATCATCGATTGCC
Left aligned:
ATC....ATTGCC
ATCATCGATTGCC
Display "long indels" Mixed fragment:
TYWSRKKWYWMYMMYMTMYAACKWYGYWKYAYWRYRGTSRWSAW
Solution with "short" insertion:
..TCAGGTTACTACCATCTA.CAACGTTGCATTACAGTGGTCAAGAT
TTTCAGGTTACTACCATCTAACTACGTTGCATTACAGTGGTCAA...
Solution with "long" insertion:
..TCAGGTTACTACCATCTACAACTACGTTGCATTACAGTGGTCAA...
TTTCAGGTTACTACCATCTA.....ACGTTGCATTACAGTGGTCAAGAT
Depending on the parameters, the program can select the solution with a short insertion as optimal even if it contains mismatches, as in the example above. If the reconstructed allelic strings contain mismatches in the vicinity of an indel (which should always be considered suspicious) repeat the analysis with the "Display long indels" option checked. Analysis of the reverse sequence of the same mixed fragment can be used to verify that the indel has been reconstructed correctly.
This advanced tool allows to simulate mixed fragments resulting from one or two indel events. Pairs of identical strings composed of the letters A, C, G, and T, selected randomly with equal probability, are generated and shifted with respect to each other by inserting additional bases into one or both strings. To simulate single nucleotide polymorphisms (SNPs), a specified number of point differences between the strings are introduced at randomly chosen sites. When the button "Generate" is pressed, the strings are generated and their consensus, except the overhanging parts in the beginning and the end, is analyzed. The output summarizes differences between the generated and the reconstructed strings.
The mixed sequence below has been decoded as a pair of allelic strings with one mismatching site. That site represents either a single nucleotide polymorphism (SNP), or an incorrectly called peak on the sequencing chromatogram.
Mixed fragment:
CCYWMYKSCMARRAYKGRWTKKWRS
Resolved fragment:
.CCTACTGCCAAGAATGGATTGTAGC
CCCTACTGCCAAGACTGGATTGTAG.
In the example below, each reconstructed allelic string contains two mixed bases (W):
Mixed fragment:
WSWMYMMSWSWCTYTYYYYYKMSAY
Resolved fragment:
..ACTACCAGWCWCTTTCCTTCGACAT
TGACTACCWGWCTCTTTCCTTCGAC..
This is so because three different pairs of strings provide equally optimal reconstructions of the analyzed sequence, each containing one mismatching site:
1. ..ACTACCAGTCACTTTCCTTCGACAT
TGACTACCAGTCTCTTTCCTTCGAC..
2. ..ACTACCAGTCTCTTTCCTTCGACAT
TGACTACCAGACTCTTTCCTTCGAC..
3. ..ACTACCAGACTCTTTCCTTCGACAT
TGACTACCTGACTCTTTCCTTCGAC..
When such multiple optimal reconstructions are possible, the upper and the lower strings in the output of Indelligent represent strict consensuses of, respectively, the upper and the lower allelic strings of the individual reconstructions:
Upper strings:
1. ..ACTACCAGTCACTTTCCTTCGACAT
2. ..ACTACCAGTCTCTTTCCTTCGACAT
3. ..ACTACCAGACTCTTTCCTTCGACAT
Consensus: ..ACTACCAGWCWCTTTCCTTCGACAT
Lower strings:
1. TGACTACCAGTCTCTTTCCTTCGAC..
2. TGACTACCAGACTCTTTCCTTCGAC..
3. TGACTACCTGACTCTTTCCTTCGAC..
Consensus: TGACTACCWGWCTCTTTCCTTCGAC..
Currently the program lacks a test to estimate the statistical significance of reconstructions. The program will output a two-string reconstruction for any input sequence, even a randomly generated sequence of IUPAC symbols. However, a random input generally will result in a smaller proportion of ambiguous sites decoded. The reported maximum proportions of resolved ambiguous sites expected by chance are estimated from the maximum values observed in experiments in which fragments of variable length, formed by superimposition of randomly generated strings containing equal proportions of A, G, C, and T, were artificially generated (1,000 replicates for each length tested) and processed by Indelligent. If the value reported for a particular reconstruction exceeds the one expected by chance, the comparison supports the hypothesis that the analyzed mixed fragment has indeed resulted from superimposition of allelic sequences containing a heterozygous indel. The opposite may mean that the analyzed sequence is too short to distinguish between random vs. nonrandom nature of the fragment, inadequate parameters of the analysis have been chosen, or that the original trace contains no heterozygous indels. Because the comparison lacks statistical power its results should be interpreted cautiously. Note that the reported percent of resolved ambiguities is calculated based on the number of ambiguous sites remaining in the output "combined" sequence.
Large number of ambiguous and mismatching sites in the output:
Scattered or clustered mismatches/ambiguities:
Part reconstructed nicely, rest has mismatches/ambiguities:
Mismatches or ambiguities near an indel:
Reconstructed strings contain multiple gaps separated by short distances:
Analyze a single sequence (FASTA output):
indelligent "TKGKKSCMW"
Compact JSON output:
indelligent "TKGKKSCMW" -f compact
Human-readable JSON output:
indelligent "TKGKKSCMW" -f pretty
Process many sequences from a file:
indelligent sequences.txt > results.fasta
Process via stdin:
cat sequences.txt | indelligent
Start web service and API on port 1977:
indelligent -p 1977
Use -f to select the output format:
fastacompactprettytsv-d for full detail
columns.-V, --version
-f, --format=fmt
-d, --details
-j, --jobs=n
-p, --port=port
-s, --stream
-u, --unordered
-b, --batch-size=n
-q, --quiet
-m, --max-shift=n
-P, --shift-penalty=n
-x, --fix-shifts=list
-A, --align-alleles
-a, --float-align=
-L, --long-indels
--no-color--simulate--sim-length=n
--sim-indel=n
--sim-indel2=n
--sim-allele=n
--sim-subs=n
Input files should contain one IUPAC sequence per line. Lines starting with
# or > are treated as comments and skipped. Empty lines are also skipped.
Download the latest release archive for your platform. Each archive contains
the indelligent binary and a man page.
Linux (x86):
tar xzf indelligent-*-linux-x86.tar.gz
sudo cp indelligent /usr/local/bin/
Linux (ARM):
tar xzf indelligent-*-linux-arm.tar.gz
sudo cp indelligent /usr/local/bin/
macOS:
tar xzf indelligent-*-mac-*.tar.gz
cp indelligent /usr/local/bin/
Windows:
Unzip indelligent-*-win-x86.zip and run indelligent.exe from the command
prompt or PowerShell.
Verify the installation:
indelligent -V
Running locally has no built-in limits on sequence length, batch size, or request rate. The hosted web service may enforce limits to protect shared resources; when it does, the error message will direct you here.
To start a local web service with the same interface:
indelligent -p 1977
To apply limits (e.g. when self-hosting for multiple users):
indelligent -p 1977 \
--max-batch-sequences 10000 \
--max-sequence-length 100000 \
--max-sim-length 10000 \
--rate-limit 20 \
--body-limit 1M
docker run -p 1977:1977 sfgrp/indelligent
With limits:
docker run -p 1977:1977 sfgrp/indelligent \
--max-batch-sequences 10000 \
--max-sequence-length 100000 \
--max-sim-length 10000 \
--rate-limit 20 \
--body-limit 1M
By default, Indelligent processes input files in batch mode: it reads
sequences into batches (up to 50,000 per batch by default, adjustable with
-b), distributes them across multiple worker threads, and writes results
preserving the original input order. This maximizes throughput on multi-core
machines.
Stream mode (-s) processes sequences one at a time as they arrive, without
buffering the entire input. This uses significantly less memory and is useful
when piping from another process or when working with very large files where you
want results to appear incrementally:
indelligent -s sequences.txt
Stream mode can also read from stdin:
cat sequences.txt | indelligent -s
In batch mode, you can allow unordered output with -u for a small speed
improvement when output order does not matter:
indelligent -u sequences.txt
Dmitry A. Dmitriev and Roman A. Rakitov.
Copyright (C) 2008-2026 Dmitry A. Dmitriev & Roman A. Rakitov. The source code is available free for non-commercial users.
When started with -p, Indelligent exposes a REST API alongside the web interface. All API responses are JSON. Interactive API documentation is available at /swagger/index.html.
Endpoints
Method |
Path |
Description |
GET |
/api/v1/ping |
Health check. Returns "pong". |
GET |
/api/v1/version |
Returns version and build info as JSON. |
GET |
/api/v1/:sequence |
Analyze a single IUPAC sequence. Example: /api/v1/TKGKKSCMW |
POST |
/api/v1/ |
Analyze multiple sequences. Send JSON body: {"sequences": ["TKGKKSCMW", "CCYWMYKSCMARRAYKGRWTKKWRS"]} |
GET |
/api/v1/simulate |
Generate a random fragment with known indels and analyze it. Query params: length, indel, indel2, allele, subs. |
Example: single sequence
curl http://localhost:1977/api/v1/TKGKKSCMW
Response:
{
"input": "TKGKKSCMW",
"parsed": true,
"allele1": "TGGTGCCAT",
"allele2": "TTGGTGCCA",
"aligned1": ".TGGTGCCAT",
"aligned2": "TTGGTGCCA.",
"combined": "TTGGTGCCAT",
"stats": { ... },
"phaseShifts": [{"size": 1, "positions": 1}]
}
Example: batch analysis
curl -X POST http://localhost:1977/api/v1/ \
-H "Content-Type: application/json" \
-d '{"sequences": ["TKGKKSCMW", "ACGT"]}'
Returns a JSON array of results, one per input sequence.