Tadpole

Script: tadpole.sh Package: assemble Class: Tadpole.java

Kmer-based assembler with additional capabilities for error correction and sequence extension. Designed for fast, conservative assembly with extremely low misassembly rates and excellent handling of irregular coverage distributions.

Overview

Tadpole is a De Bruijn graph assembler optimized for specific use cases where speed, accuracy, and handling of irregular coverage are critical. Unlike complex scaffolding assemblers, Tadpole focuses on conservative kmer-based assembly without complicated graph analysis, making it particularly suitable for:

Tadpole supports unlimited kmer lengths and generates no temporary files or directories, making it ideal for automated pipelines.

Processing Modes

Tadpole operates in distinct processing modes, each optimized for different tasks:

Contig Mode (Default)

Single-pass processing where reads are loaded once to count kmers, then contigs are assembled and written to output. This is the fastest mode for pure assembly tasks.

tadpole.sh in=reads.fq out=contigs.fa k=93

Extension Mode

Two-pass processing: first pass counts kmers, second pass extends existing sequences bidirectionally. Can be combined with error correction.

tadpole.sh in=reads.fq out=extended.fq mode=extend k=93 el=50 er=50

Correction Mode

Two-pass processing focused on error correction. The reassemble algorithm (local rebuilding) is enabled by default (reassemble=t). The pincer (bidirectional), tail (end-focused), and substitute (experimental alternate-confirmation cleanup, run after reassemble) algorithms are enabled with pincer=t, tail=t, and substitute=t. In mode=correct, ecc is enabled unless ecc is set explicitly (Tadpole.java). Single-base indel repair with fixindels=t selects a separate path; see General single-base correction.

tadpole.sh in=reads.fq out=corrected.fq mode=correct k=50

Combined Processing

Extension and correction can be performed simultaneously in the second pass, though different optimal kmer lengths may require separate runs.

Graph Mode

Explores connections between supplied contigs using read kmers, without changing or reassembling the contigs. Requires contigs=<assembly.fa> and dot=<graph.dot> or gfa=<graph.gfa>. out= is not allowed in this mode. Only in/in2/extra reads contribute kmer counts. Requires one k value, not a multi-K list.

tadpole.sh in=reads.fq contigs=assembly.fa mode=graph k=31 dot=graph.dot pretty

Kmer Length Selection

Kmer length is critical for optimal results and should be chosen based on the primary goal:

Any k value is accepted. By default (packed=t), k>31 uses a fully-packed multi-word kmer representation that represents any k>31 exactly, with no rounding. Setting packed=f selects the legacy even-split layout, which supports only specific k>31 values (1-31, multiples of 2 from 32-62, multiples of 3 from 63-93, and so on) and silently rounds down otherwise.

Recommended Usage

Optimal Assembly

tadpole.sh in=reads.fq out=contigs.fa shave rinse pop k=62

Recommended parameters including dead-end removal (shave), bubble removal (rinse), and bubble popping for maximum contiguity while maintaining accuracy.

Two-Stage Assembly for Maximum Continuity

# Stage 1: Error correction and extension with short kmers
tadpole.sh in=reads.fq out=corrected.fq mode=correct k=31

# Stage 2: Assembly with longer kmers for better repeat resolution
tadpole.sh in=corrected.fq out=contigs.fa k=93 shave rinse pop

Optimal approach for complex genomes: correct and extend with short kmers, then assemble with long kmers.

Contig Extension with Additional Reads

tadpole.sh in=contigs.fa out=extended.fa el=100 er=100 mode=extend extra=reads.fq k=62

Extend existing contigs using additional sequencing data as kmer source.

Parameters

Input parameters

in=<file>
Primary input file for reads to use as kmer data.
in2=<file>
Second input file for paired data.
extra=<file>
Extra files for use as kmer data, but not for error-correction or extension.
contigs=<file>
Existing FASTA assembly for graph-only exploration. Names, sequences, and record order are retained; implies mode=graph. Only in/in2/extra reads contribute kmer counts.
reads=-1
Only process this number of reads, then quit (-1 means all).

Note: in, in2, and extra may be comma-delimited lists of files.

Output parameters

out=<file>
Write contigs (in contig mode) or corrected/extended reads (in other modes).
out2=<file>
Second output file for paired output.
outd=<file>
Write discarded reads, if using junk-removal flags.
dot=<file>
Write a contigs connectivity graph (partially implemented). Not yet supported with multi-K assembly.
pretty=f
(fancy, prettydot) Add visual DOT styling and contig names. Plain assembly DOT stays unchanged by default. Rectangular nodes contain names, lengths, and depth=min,mean,max. Width scales with log(max(16,length-128)), longest=4 inches, minimum width=1.2 inches; nodes expand when necessary to keep labels inside. Thin depth-scaled edges (0.65-1.3 pt) attach to the actual left/right contig ends. K is shown once above the graph. Assembly edges use first-extension depth, not spanning reads.
gfa=<file>
Write the post-processed contig graph in GFA 1.0 format.
dump=<file>
Write kmers and their counts.
fastadump=t
Write kmers and counts as fasta versus 2-column tsv.
mincounttodump=1
Only dump kmers with at least this depth.
showstats=t
Print assembly statistics after writing contigs.
shortnames=t
Short contig names without branch data.
veryshortnames=f
Very short contig names without min/max depth and hh/caga metrics.
tid=-1
If positive, embed this TaxID in contig names. Used by Reassemble to label assembled contigs by genome of origin.

Prefiltering parameters

prefilter=0
If set to a positive integer, use a countmin sketch to ignore kmers with depth of that value or lower.
prehashes=2
Number of hashes for prefilter.
prefiltersize=0.2
(pff) Fraction of memory to use for prefilter.
minprobprefilter=t
(mpp) Use minprob for the prefilter.
prepasses=1
Use this many prefiltering passes; higher be more thorough if the filter is very full. Set to 'auto' to iteratively prefilter until the remaining kmers will fit in memory.
onepass=f
If true, prefilter will be generated in same pass as kmer counts. Much faster but counts will be lower, by up to prefilter's depth limit.
filtermem=0
Allows manually specifying prefilter memory in bytes, for deterministic runs. 0 will set it automatically.

Hashing parameters

k=31
Kmer length (1 to infinity). Memory use increases with K. A comma-delimited list enables multi-K assembly; values are processed in input order unless korder=legacy is requested.
prealloc=f
Pre-allocate memory rather than dynamically growing; faster and more memory-efficient. A float fraction (0-1) may be specified; default is 1.
hashkmers=auto
Compact storage for sequence-driven long-k operations. For eligible operations, auto keeps explicit kmers below K=64. At K=64 it uses fixed fingerprints only with prealloc; above K=64 it uses fixed fingerprints with prealloc, or a resizable hash pair otherwise. Set f, pair, or fixed to override; explicit fixed works at K=62 and forces prealloc=t. Fixed stores one 64-bit fingerprint plus an integer count; the placement hash is not stored, so the table cannot resize. Compact modes require K>31 and sequence-driven operations: no table-seeded contigs, kmer dumps, GC histogram, bounded kmer-range enumeration, or non-tip-seeded shave/rinse. Multi-K wash uses contig-tip-seeded compact cleaning.
minprob=0.5
Ignore kmers with overall probability of correctness below this.
minprobmain=t
(mpm) Use minprob for the primary kmer counts.
threads=X
Spawn X worker threads; default is number of logical processors.
buildthreads=X
Spawn X contig-building threads. If not set, defaults to the same as threads. Setting this to 1 will make contigs deterministic.
rcomp=t
Store and count each kmer together and its reverse-complement.
coremask=t
All kmer extensions share the same hashcode.
packed=t
For k>31, use a fully-packed, non-symmetric multi-word kmer representation, allowing any k>31 to be represented exactly (no rounding to the nearest supported length). Set to f for the legacy even-split layout.
fillfast=t
Speed up kmer extension lookups.

Multi-K parameters

assemblek=auto
Kmer length used to build the initial contigs. By default, this is the first value in k.
korder=input
Process k in the supplied order, preserving repeated values. Assembly consumes the first occurrence of assemblek (or precedes the list if absent). Each later occurrence groups fusion then bridging and shares one count table when needed. legacy restores sorted unique Ks, all fusion before bridging, and the old assemblek/graphk defaults for comparisons.
fusek=auto
(joink) Comma-delimited K values for exact reciprocal tip overlaps. Values must be shorter than assemblek. With korder=input, fusek and bridgek filter the k schedule; list every requested phase K in k. If k is absent, phases follow fusek then additional bridgek values. Neural/path fusion uses raw explicit counts, then cleans that same table for bridging; no second evidence table is kept in memory. Set fusek=none to disable this phase.
fusedeadends=f
Require both fusion ends to have been DEAD_END with no edges after initial assembly-K processing. Applies to final graph-K overlap fusion too; bridge eligibility is unchanged.
fusemaxmismatches=-1
Validate trimmed-away overlapping flanks at every fusion K. -1 preserves unchecked trimming; 0 requires agreement; 1 permits one mismatch total across both discarded flanks. The shared anchor remains exact. Unknown bases count as mismatches; uncovered trimmed bases reject the fusion.
fuseconflicts=f
Reject a best fusion if the same ends have a larger covered placement with conflicting flanks in that pass. Placement span includes both trims. Requires fusemaxmismatches>=0; applies at every fusion K without a cross-K cache.
fusecoverageratio=0
Maximum ratio of higher to lower whole-contig mean depth for exact-overlap fusion. 0 disables; otherwise finite >=1. Rejects zero-depth ends when enabled. Applies before path/NN vetoes, including final graph-K overlap fusion; not gap bridges. Optional repeat-copy safeguard; 1.75 was tested with the bundled NN. Can also reject correct joins across depth changes.
fusepath=f
Validate each fusion using that fusion's K, across the overlap plus K retained bases on each side. All words must occur; both directions must favor the proposed path without a significant branch (existing branch-ratio settings apply). Missing flank context rejects. Rechecks before merging. Only one table is live: initial fusion passes load serially; final graph-K fusions reuse the possibly cleaned graph table. Gap bridging is unchanged. This is not spanning-read proof.
fusepathdepth=1
Minimum word count for fusepath validation.
fusenet=null
Optional experimental fusion-join network (109 v2 inputs, one output). Disabled by default; requires fusencutoff. Vetoes frozen reciprocal proposals after existing guards; never selects a replacement partner or changes gap bridging. Uses retained-window depths and original-tip entropy. Each fusion phase loads one exact, non-prefiltered read table; final graph-K fusions borrow its possibly cleaned table. Quality filtering is unchanged. Models trained on unfiltered counts should be tested with minprob=0 minprobmain=f.
fusencutoff=<0..1>
Explicit minimum accepted fusion score (inclusive). The model's embedded cutoff is not used. The bundled dense networks/tadpole_fusion.bbnet was tested at 0.667098 on simulated bacterial reads; it is not enabled automatically. Supply its actual file path with fusenet. Phase timings separate feature extraction and inference from table loading.
fusionvectors=
Optional development-only prefix for .vectors.tsv, .histograms.tsv, .diagnostic.tsv, and .trace.tsv sidecars. Records reciprocal proposals before cycle/conflict/path vetoes, after partner selection and overlap eligibility. Does not change fusion decisions. Loads one count table per fusion phase; reference labels are generated separately. Outputs must not already exist. Disabled by default.
fusepathflank=auto
Minimum retained bases to validate on EACH side of the overlap. Effective flank is max(current fusion K, this value). auto or 0 uses K. Requires full flanks; never silently clips.
fusetrim=t
Allow exact anchors with terminal trimming; validation follows fusemaxmismatches. Set f to admit only zero-trim external overlaps at both ends. Longer-than-K exact terminal overlaps remain eligible; conservative anchor/self/conflict ambiguity rules still apply.
bridgek=auto
Comma-delimited K values for read-supported unbranched gap walks. Values may be above, below, or equal to assemblek. Set fusek=none or bridgek=none to disable either phase. Explicit phase lists override the values inferred from k.
bridgehash=auto
Legacy alias for hashkmers.
crosskmaxlen=500
(ckml) Maximum graph walk length when finding cross-K bridges or final graph edges.
crosskmaxdepthratio=3
(ckmdr) Maximum connecting-edge depth relative to the higher-coverage flanking contig; 0 disables this filter.
crosskpasses=10
(ckpasses) Maximum merge passes after each overlap or bridging phase.

Assembly parameters

mincountseed=3
(mcs) Minimum kmer count to seed a new contig or begin extension.
mincountextend=2
(mce) Minimum kmer count continue extension of a read or contig. It is recommended that mce=1 for low-depth metagenomes.
mincountretain=0
(mincr) Discard kmers with count below this.
maxcountretain=INF
(maxcr) Discard kmers with count above this.
branchmult1=20
(bm1) Min ratio of 1st to 2nd-greatest path depth at high depth.
branchmult2=3
(bm2) Min ratio of 1st to 2nd-greatest path depth at low depth.
branchlower=3
(blc) Max value of 2nd-greatest path depth to be considered low.
minextension=2
(mine) Do not keep contigs that did not extend at least this much.
mincontig=500
(minc) Do not write contigs shorter than this. This is the final-output threshold and is independent of sweeplen.
sweeplen=500
Remove selected short artifact contigs before graph simplification. The default removes unanchored contigs at low, semilow, or medium depth, and terminal or branched-terminal contigs at low or semilow depth. Set to 0 to disable this automatic pre-graph sweep. Explicit evictgraphclass/evictgraphdepth controls remain available.
mincoverage=1
(mincov) Do not write contigs with average coverage below this.
maxcoverage=inf
(maxcov) Do not write contigs with average coverage above this.
trimends=0
(trim) Trim contig ends by this much. Trimming by K/2 may yield more accurate genome size estimation.
trimcircular=t
Trim one end of contigs ending in LOOP/LOOP by K-1, to eliminate the overlapping portion.
contigpasses=16
Build contigs with decreasing seed depth for this many iterations.
contigpassmult=1.7
Ratio between seed depth of two iterations.
ownership=auto
For concurrency; do not touch.
processcontigs=f
Explore the contig connectivity graph.
popbubbles=t
(pop) Pop bubbles; increases contiguity. Requires additional time and memory and forces processcontigs=t.

Graph simplification parameters

popdirect=t
Merge unambiguous adjacent unitigs.
popindirect=f
Remove depth-supported error arms from simple bubbles.
unzipbubbles=t
Linearize isolated true bubbles into both supported paths.
resolverepeats=f
Resolve closed 2-by-2 repeat junctions when individual reads span both boundaries and uniquely pair both paths. Experimental; rereads primary input files and cannot use stdin.
simpleomnitigs=f
(omnitigs) Output maximal topology-safe walks through the contig graph. May duplicate shared sequence around branches; never selects an unsupported branch pairing.
graphcover=f
(pathcover, nonredundantpaths) Output a deterministic graph path cover without combinatorial duplication. A clean 2x2 X center is emitted twice on one boundary, never paired through. Joined products must contain an independently output-sized contig.
graphk=auto
Multi-K only. Build the final graph at this kmer length. Defaults to the last listed K (assemblek in legacy mode; last constructed phase when no k list is supplied). Reuses the last phase table when K matches; a different explicit graphk rereads the inputs once. For example, k=96,124,32,64 ends with graphk=64 using at most four loads; k=96,124,64,32,96 intentionally loads 96 again at the end. Before graph extraction, uniquely overlapping unbranched graph-k ends are joined conservatively.
graphmergecoverageratio=0
Maximum whole-contig mean-depth ratio for ordinary direct merges in the final Multi-K graph. 0 disables; otherwise finite >=1. Rejects zero-depth ends when enabled. Requests final graph processing and reuses a matching last table. Initial assembly, cross-K fusion/bridging, indirect bubble removal, and path extraction are not filtered by it. Use fusecoverageratio separately for exact-overlap fusion.
repeatminsupport=2
(rms) Minimum spanning reads required for each resolved path.
repeatmaxnoise=0
(rmn) Maximum conflicting spanning reads; zero is strictest.
validategraph=f
Run graph consistency checks during simplification. Diagnostic option; requires Java assertions (default).

Graph classification and cleanup parameters

lowdepthcontigdiag=f
(ldcd) Report conservative short, low-depth isolate contigs. Set to early, final, or both to select the assembly-K and/or post-joining graph boundary; t means final. With both, report how many early candidates were retired/absorbed, grown, or reclassified. Diagnostic only; does not delete contigs.
lowdepthcontigdiagstage=final
(ldcdstage) Alternate stage-selection syntax; specifying it enables the diagnostic.
lowdepthcontigmaxlen=auto
(ldcmaxlen) Maximum candidate length; auto is max(500,2*K).
lowdepthcontigmaxcov=3
(ldcmaxcov) Maximum candidate average depth.
lowdepthcontigfraction=0.2
(ldcfrac) Maximum candidate depth relative to the called isolate kmer-depth peak (robust median fallback).
lowdepthcontigtopology=conservative
(ldctopology) Candidate endpoint policy. Conservative accepts dead/dead, dead/back-branch, and back-branch/back-branch; notloop accepts every non-loop form.
retainshortcontigs=auto
Retain sub-sweeplen unitigs through graph operations, while still suppressing them from final FASTA output. Auto preserves the prior behavior: enabled with pop=t.
evictlowdepthcontigs=f
(ldce) Before graph construction, remove retained short low-depth isolate candidates selected by the ldc thresholds. Experimental and inappropriate for metagenomes.
classifygraphcontigs=f
Label final graph contigs on independent length, depth, and topology axes. Length is short/long at sweeplen when enabled, otherwise mincontig. Depth is low/semilow/medium/high. Topology records 0, 1, or 2+ reciprocal paths from each end to distinct long anchors, with separate loopback and self-loop classes.
graphclasslowmaxcov=4
(gclmc) Absolute ceiling for the low-depth class.
graphclasslowfraction=0.2
(gclf) Relative ceiling for the low-depth class. Low includes the boundary; semilow starts above it.
graphclassmediumfraction=0.4
(gcmf) Boundary between semilow and medium depth, relative to the called main-depth peak. Medium includes it.
graphclasshighfraction=2.5
(gchf) Upper boundary of medium depth; high is above it.
emitconnectedmax=all
(ecm) Emit connected-N contigs below mincontig through this hop class. Classification emits all connected classes by default.
emitterminal=f
Emit terminal-N contigs below mincontig.
emitbranchedterminal=f
Emit branched-terminal-N contigs below mincontig.
emitunanchored=f
Emit unanchored contigs below mincontig.
emitloopback=f
Emit loopback-N contigs below mincontig.
emitbranchedconnected=f
Emit branched-connected-N contigs below mincontig.
emitmulticonnected=f
Emit multi-connected-N contigs below mincontig.
emitselfloop=f
Emit self-loop contigs below mincontig.
emitsuspect=f
(suspect) Alias setting terminal, branched-terminal, unanchored, and loopback emission together.
evictterminal=f
Remove eligible terminal-N contigs before simplification.
evictbranchedterminal=f
Remove eligible branched-terminal-N contigs.
evictunanchored=f
Remove eligible unanchored contigs before simplification.
evictloopback=f
Remove eligible loopback-N contigs before simplification.
evictbranchedconnected=f
Remove eligible branched-connected-N contigs.
evictmulticonnected=f
Remove eligible multi-connected-N contigs.
evictsuspect=f
(es) Alias setting terminal, branched-terminal, unanchored, and loopback eviction together.
evictgraphclass=none
Select one or more logical topology groups: unanchored, terminal, connected, loopback, or self-loop. Terminal also selects branched-terminal; connected also selects branched-connected and multi-connected. Comma-delimited lists are accepted; granular eviction flags remain available.
evictgraphdepth=low
Select cleanup depth classes from low, semilow, medium, high, or a comma-delimited list. Long contigs are never graph-class evicted. Self-loops require explicit selection through evictgraphclass. sweeplen is enforced.
evictconnectedabove=none
(eca) Also remove connected-N contigs with N above this value when eligible under the graph cleanup limits. Experimental.

Processing mode parameters

mode=contig
contig: Make contigs from kmers.
graph: Explore connections between supplied contigs using read kmers, without changing or reassembling contigs.
extend: Extend sequences to be longer, and optionally perform error correction.
correct: Error correct only.
insert: Measure insert sizes.
discard: Discard low-depth reads, without error correction.

Graph-only parameters

graphmaxdist=500
Maximum extension steps from an oriented contig end.
graphmaxstates=10000
Maximum distinct oriented kmers explored per source end. Search follows all branches with depth >= mincountextend, stopping each route at the first supplied contig end. Shared ends and competing reachable targets are retained. Limited searches are marked on nodes and reported; missing links are not proof of disconnection. One K per run only. DOT always labels original names; pretty adds visual style. Connections describe kmer reachability, not spanning reads. Each edge represents one shortest path (ACGT tie order). len/EL counts extension steps; zero means a K-base overlap. Path depth=min,mean,max (GFA MN/MD/MX) includes both endpoint kmers. Plain DOT retains min/mean labels. startdepth/EC is first-extension depth (source depth for zero-step links). GFA stores names as escaped SN tags and uses unspecified overlap for links. SL/SR mark bounded left/right searches. No out= sequence output, washing, or graph simplification.

Extension parameters

extendleft=100
(el) Extend to the left by at most this many bases.
extendright=100
(er) Extend to the right by at most this many bases.
ibb=t
(ignorebackbranches) Do not stop at backward branches.
extendrollback=3
Trim a random number of bases, up to this many, on reads that extend only partially. This prevents the creation of sharp coverage discontinuities at branches.

General single-base correction (default off)

pacbio=f
Enables indel repair and PacBio-trained neural networks, for unpaired PacBio HiFi FASTA/FASTQ reads. Sets fixindels=t, k=62, ecc=f, minprob=0 and the bundled LOW/HIGH models. Selects correct mode if mode is omitted. With pacbio, ecc requests this repair path, not the legacy substitution pass. Uses LOW cutoff 0.93 at original-read median kmer depth <=30, HIGH cutoff 0.96 above 30. Routing uses read depth, not the nominal coverage of the dataset. Models only veto otherwise accepted corrections; they do not bypass heuristic checks. Explicit options override preset defaults in either order. Bare pacbio means pacbio=t; pacbio=f leaves defaults unchanged. Incompatible options (e.g. k!=62, pair/batch modes) cause an error; they are not silently ignored.
fixindels=f
Correct substitutions and 1bp insertions/deletions using kmer support; not restricted to homopolymers. Selects a separate conservative algorithm, not indel-only correction. Unpaired, alignment-free FASTA/FASTQ reads only. Requires k>=5 and correct mode (selected if mode is omitted). Incompatible with legacy ecc/ecco/merge/markerrors/hpindel, extension, or base marking. Uses one centered candidate probe window, then verifies all affected kmers against the unchanged table. With qualities present, inserted/substituted bases get Q0; retained qualities and read names are preserved. Competing verified substitutions and indels are withheld, rather than preferring a substitution over a supported indel. Genuine variants are not guaranteed to be preserved. Use minprob=0 to count all valid input kmers. Larger indels are not the target of this mode.
fixindelsmax=8
(localeditmax) Maximum accepted single-base edits per read (S+I+D total). Skip unchanged if the original depth scan finds more than this many separated K-1/K-wide, strongly flanked low-depth troughs (an error estimate, not verified repairs). Otherwise, restore original bases/qualities if later correction needs an additional edit beyond the limit. Exactly-at-limit reads are retained only after no further supported edit is found. Sequential mode rescans after each tentative edit; batch mode rescans local regions and may abstain on other regions.
fixindelsstride=8
Sample every Nth kmer when scanning a read; 1 scans densely. Fill detected low-depth patches and their flanks exactly. Short troughs between samples may be missed. Small K/short profiles and fixindelspairs=t use dense scans. Winning edits still require complete affected-context verification.
fixindelspairs=f
Also try a bounded two-edit witness after single-edit searches; requires fixindels=t. Applies only its first edit, then rescans. Tadpole only; BBCMS has no pair-witness option. Legacy aliases: localedit, localeditmax, localeditpairs.
fixindelsbatch=f
Experimental local-region correction with one final read rebuild. Requires fixindels=t, fixindelsstride=1, fixindelspairs=f. Groups original-coordinate candidates, repairs each bounded region sequentially, and commits accepted regions together. Preserves the read-wide edit limit and rollback; insufficient flanks, oversized or unverified regions are left unchanged. Tadpole only. Existing sequential mode remains the default.
fixindelspatchmax=4096
Maximum region size in bases, including context, for batch mode. Must be >=2*K+5. Oversized regions are withheld, not split.
fixindelsnet=<file>
Neural veto after unique full-context verification. Used for all reads without a HIGH model, otherwise for median depth<=30. Requires fixindels=t, k=62, fixindelspairs=f, fixindelsbatch=f.
fixindelssha80=<20hex>
Expected model checksum: last 20 lowercase SHA-256 hex digits.
fixindelscutoff=<0..1>
Minimum accepted LOW score (0.93 with pacbio).
fixindelshighnet=<file>
Optional HIGH model for original-read median depth>30. Requires a LOW model; both must have 39 inputs and 1 output.
fixindelshighsha80=<20hex>
Expected HIGH model checksum, in the same format.
fixindelshighcutoff=<0..1>
Minimum accepted HIGH score (0.96 with pacbio). Without pacbio, supply path, checksum and cutoff together for each model. With pacbio, bundled models need no path/hash; custom replacements require matching path and checksum. Missing features or scores below cutoff leave edits unapplied. Missing models, checksum/dimension mismatches and invalid cutoffs are errors. Neural correction remains off by default.
tadpole.sh in=reads.fq out=fixed.fq k=62 fixindels=t ecc=f minprob=0
tadpole.sh in=reads.fq.gz out=fixed.fq.gz k=62 ecc pacbio

Homopolymer repair parameters (hpindel)

hpindel=f
Experimental unpaired, alignment-free homopolymer +/-1 repair. This older specialized algorithm remains separately selectable; it does not perform general substitution correction. Requires correct mode, k>=5, ecc=f ecco=f merge=f, markerrors=f fixindels=f, no extension or base marking. All hp* options below affect ONLY this specialized path.
hpmaxedits=1
Maximum complete disjoint-context edit batch per read.
hpsingletons=f
Also allow singleton +1 proposals; requires hpindel=t.
hpisolated=f
After existing paths reject, rescue the complete isolated candidate set only if it fits hpmaxedits. Requires hpindel=t.
hpdeletioncompeting=f
Experimental: veto HP deletions when deleting an immediately adjacent non-run base is also supported. Requires hpindel=t. Abstains only; may withhold true repairs or release other edits.
hpcompeting=f
Experimental: veto HP insertions when a non-run base inserted strictly inside the run passes the same support/contrast gates. Boundary alternatives are excluded. Requires hpindel=t. Proposal-level filtering can change batch selection. Experimental: rare true alleles can be changed.

Error-correction parameters

ecc=f
Error correct via kmer counts. Default f; in mode=correct it is enabled unless ecc is set explicitly (Tadpole.java). With pacbio=t, NN-gated indel repair is used instead of the legacy ecc pass.
markerrors=f
Mark bounded low-count kmer runs as N instead of correcting. Requires two high-depth kmers on both sides; exact K and K-1 runs are marked, while end/merged runs are reported and skipped.
reassemble=t
If ecc is enabled, use the reassemble algorithm.
pincer=f
If ecc is enabled, use the pincer algorithm.
tail=f
If ecc is enabled, use the tail algorithm.
substitute=f
(Experimental) If ecc is enabled, use the substitute algorithm: an alternate-confirmation cleanup pass, run after reassemble, for errors too dense or close together for reassemble to resolve. Works at all k.
eccfull=f
If ecc is enabled, use tail over the entire read.
aggressive=f
(aecc) Use aggressive error correction settings. Overrides some other flags like errormult1 and deadzone.
conservative=f
(cecc) Use conservative error correction settings. Overrides some other flags like errormult1 and deadzone.
rollback=t
Undo changes to reads that have lower coverage for any kmer after correction.
markbadbases=0
(mbb) Any base fully covered by kmers with count below this will have its quality reduced.
markdeltaonly=t
(mdo) Only mark bad bases adjacent to good bases.
meo=t
(markerrorreadsonly) Only mark bad bases in reads containing errors.
markquality=0
(mq) Set quality scores for marked bases to this. A level of 0 will also convert the base to an N.
errormult1=16
(em1) Min ratio between kmer depths to call an error.
errormult2=2.6
(em2) Alternate ratio between low-depth kmers.
errorlowerconst=3
(elc) Use mult2 when the lower kmer is at most this deep.
mincountcorrect=3
(mcc) Don't correct to kmers with count under this.
pathsimilarityfraction=0.45
(psf) Max difference ratio considered similar. Controls whether a path appears to be continuous.
pathsimilarityconstant=3
(psc) Absolute differences below this are ignored.
errorextensionreassemble=5
(eer) Verify this many kmers before the error as having similar depth, for reassemble.
errorextensionpincer=5
(eep) Verify this many additional bases after the error as matching current bases, for pincer.
errorextensiontail=9
(eet) Verify additional bases before and after the error as matching current bases, for tail.
deadzone=0
(dz) Do not try to correct bases within this distance of read ends.
window=12
(w) Length of window to use in reassemble mode.
windowcount=6
(wc) If more than this many errors are found within a window, halt correction in that direction.
qualsum=80
(qs) If the sum of the qualities of corrected bases within a window exceeds this, halt correction in that direction.
rbi=t
(requirebidirectional) Require agreement from both directions when correcting errors in the middle part of the read using the reassemble algorithm.
errorpath=1
(ep) For debugging purposes.

Junk-removal parameters (to only remove junk, set mode=discard)

tossjunk=f
Remove reads that cannot be used for assembly. This means they have no kmers above depth 1 (2 for paired reads) and the outermost kmers cannot be extended. Pairs are removed only if both reads fail.
tossdepth=-1
Remove reads containing kmers at or below this depth. Pairs are removed if either read fails.
lowdepthfraction=0
(ldf) Require at least this fraction of kmers to be low-depth to discard a read; range 0-1. 0 still requires at least 1 low-depth kmer.
requirebothbad=f
(rbb) Only discard pairs if both reads are low-depth.
tossuncorrectable=f
(tu) Discard reads containing uncorrectable errors. Requires error-correction to be enabled.

Shaving parameters

shave=f
Remove dead ends (aka hair).
rinse=f
Remove bubbles.
wash=
Set shave and rinse at the same time. In compact multi-K phases, seeds from contig tips and ignores proven bounded artifacts during bridge walks.
maxshavedepth=1
(msd) Shave or rinse kmers at most this deep.
exploredist=300
(sed) Quit after exploring this far.
discardlength=150
(sdl) Discard shavings up to this long.

Note: Shave and rinse can produce substantially better assemblies for low-depth data, but they are very slow for large metagenomes. They are recommended for optimal results.

Overlap parameters (for overlapping paired-end reads only)

merge=f
Attempt to merge overlapping reads prior to kmer-counting, and again prior to correction. Output will still be unmerged pairs.
ecco=f
Error correct via overlap, but do not merge reads.
testmerge=t
Test kmer counts around the read merge junctions. If it appears that the merge created new errors, undo it.

Java Parameters

-Xmx
This will set Java's memory usage, overriding autodetection. -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs. The max is typically 85% of physical memory.
-eoom
This flag will cause the process to exit if an out-of-memory exception occurs. Requires Java 8u92+.
-da
Disable assertions.

Advanced Examples

Basic Assembly

tadpole.sh in=reads.fq out=contigs.fa k=93

Each contig consists of unique kmers, so contigs will not overlap by more than K-1 bases. Contigs end when there is a branch or dead-end in the kmer graph.

Error Correction with Multiple Algorithms

tadpole.sh in=reads.fq out=ecc.fq mode=correct k=50

With the defaults (reassemble=t, pincer=f, tail=f), correction uses the reassemble algorithm. Setting pincer=t and tail=t adds pincer correction for middle bases (bidirectional validation) and tail correction for end bases (where pincer cannot work).

Error Marking Without Correction

tadpole.sh in=reads.fq out=marked.fq mode=correct k=50 ecc=f mbb=2

Marks bases as errors (replacing with N) instead of correcting them. A base is marked if fully covered by kmers with depth below the specified value.

Multi-library Error Correction

tadpole.sh in=libA_r1.fq,libA_merged.fq in2=libA_r2.fq,null extra=libB_r1.fq out=ecc_libA_r1.fq,ecc_libA_merged.fq out2=ecc_libA_r2.fq,null mode=correct

Error corrects multiple files while using additional library data for kmer counts but not for output.

Coverage Band Assembly

tadpole.sh in=reads.fq out=contigs.fa mincoverage=1000 maxcoverage=1500 k=93

Selectively assembles only regions with coverage between 1000x and 1500x, useful for complex metagenomes or amplified samples.

Memory-Optimized Assembly

tadpole.sh in=reads.fq out=contigs.fa k=93 prefilter=2 minprob=0.6 prealloc=t

Uses prefiltering to remove low-depth kmers and quality-based kmer filtering to reduce memory usage on large datasets.

Multi-K Assembly

tadpole.sh in=reads.fq out=assembly.fa k=96,124,64,32

Assembles at the first K, then processes the remaining Ks in their supplied order. Each phase joins eligible reciprocal exact tip overlaps and bridges eligible tips through unique unbranched paths. Contig mode only; requires rereadable input files and cannot use stdin.

PacBio HiFi Correction

tadpole.sh in=reads.fq out=corrected.fq k=62 ecc pacbio

Applies the bundled PacBio HiFi neural models for indel repair. Sets fixindels=t, k=62, ecc=f, and minprob=0 by default; explicit options override these defaults. Intended for unpaired PacBio HiFi FASTA/FASTQ reads.

Graph Exploration Without Reassembly

tadpole.sh in=reads.fq contigs=assembly.fa mode=graph k=31 dot=graph.dot pretty

Writes a connectivity graph between existing contig ends using read kmers. Contig sequences are not changed.

Algorithm Details

Conservative Assembly Strategy

Tadpole implements a conservative approach designed to minimize misassemblies in repetitive regions. The assembly algorithm uses adaptive branch resolution based on kmer depth ratios rather than absolute thresholds:

Graph Cleaning Operations

Two complementary graph cleaning algorithms improve assembly continuity:

Multi-Algorithm Error Correction

Error correction employs four specialized algorithms working in combination (substitute is experimental):

Flexible Kmer Length Implementation

Tadpole automatically switches between optimized implementations based on kmer length:

Memory Management and Optimization

Multiple strategies reduce memory requirements for large datasets:

Parallel Processing Architecture

Multi-threaded implementation provides near-linear scaling:

Memory and Performance Considerations

Tadpole's memory usage is primarily determined by the number of unique kmers in the dataset:

Dataset-Specific Recommendations

Troubleshooting

Support

For questions and support: