New Features
Trim unannotated assembly ends
- New Trim unannotated ends control in the annotate-details window cuts a linear assembly back to its outermost annotated feature. Export already performed this cut in memory for linear units; doing it in the app makes it visible, undoable, and applied to everything the app shows rather than only to what is submitted. Because the boundary is a feature boundary, no feature is ever dropped or truncated, so feature counts, spans, and gene order are unchanged.
- New Restore assembly control undoes every in-app assembly edit for a unit, returning the sequence, feature model, coverage track, and annotate-stage files to the pipeline's own output. Linearize is now covered by the same undo.
- Snapshots are stored in a new
assembly_backuptable; a row exists only while a unit carries an un-restored edit. - Guarded throughout: circular assemblies must be linearized first, the coverage track must line up with the assembly or the trim is refused rather than desynchronizing them, user-supplied multi-contig units are refused outright, and soft-deleted annotations stay tombstoned at position zero. Any edit drops the unit's cached
blast_ref_alignment, which WF1 regenerates on the next run, so the synteny view can never silently mis-register against an edited sequence.
Stale assembly-output detection
- ASSEMBLE publishes to
out/<ID>/assemble/<assemble_opts>/, so the option-set name doubles as a directory name and every downstream stage rebuilds that path. Reassigning a sample to a different parameter set after it has assembled left the published output under the old name, and nothing noticed: WF2 annotate / curate / ORF, the coverage viewer, and the output-folder button all pointed somewhere that was never created, so runs either failed obscurely or completed with no reference hits at all. - MitoPilot now detects this and reports it at three points: on app startup (a warning, keeping the app open, since the fix requires the app), at lock time (the affected samples are held back, the rest are locked, and both remedies are spelled out), and when the parameter set is reassigned. The check mirrors the WF2 gate exactly and tests for the per-path assembly FASTA, not merely the directory, so an empty publish directory does not silence it.
ANNOTATEadditionally logs a warning naming the parameter-set directories that do exist for the sample. The unit is still emitted either way, soannotate()fails as loudly as it always has.- Coverage-details reads and writes are checked before anything is written, so a missing output can no longer leave a half-written Path 0 behind. The check reports but never creates: a directory holding only the Path 0 files would look complete while the raw path assemblies stayed orphaned.
Scaffold-join editor: live verification views
- The mapping plot and base-pair zoom now read a live layout that overlays your current reverse-complement and include choices, so manual edits are reflected immediately without re-running the reference mapping.
- Exclusion reasons are surfaced ("low reference coverage", "unmapped", "subsumed by scaffold N") in the editor, the mapping plot, and the join note, so it is clear why a scaffold was left out of Path 0.
- Sparse placements are hatched in the mapping plot. A bar spans the union extent of a scaffold's alignment blocks, so a sparse placement was previously drawn solid over reference it does not actually cover, which is what made the base-pair zoom look like it disagreed with the overview.
- Scaffolds that are included but have no reference placement are now called out ("appended with N gap") instead of being absent from the plot entirely, and empty zoom rows say why they are empty rather than reading as missing data.
- Switching the reference recomputes the layout and snaps back to the last good accession if the recompute fails, so the dropdown can never disagree with the layout the build step actually uses.
Bug Fixes
Scaffold placement and joining
- Origin-wrap and repeat blocks no longer balloon a scaffold's placement. A scaffold's alignment blocks are reduced to a single colinear chain before the reference extent is taken, so a block on the far side of the origin can no longer stretch the extent across the whole reference and manufacture a genome-scale negative gap at the next junction. Query coverage is still scored over all blocks, so a genuinely rearranged scaffold is not dropped.
- The sparseness test is now relative to the sample's own scaffolds rather than an absolute match-density floor. Match density falls with reference divergence, so the old fixed threshold was cleared by everything against a conspecific reference and by nothing against an ~83%-identity one, switching the guard off exactly where fragmented assemblies need it most.
- Contained scaffolds are excluded from Path 0 instead of forcing a large negative gap that trimmed real bases out of the container. Guarded so a scaffold still carrying substantial unaligned sequence is never discarded, and a scaffold that is itself excluded cannot be cited as another's container.
- Junction overlaps must now be genuine. A confirmed overlap has to reach the 3' terminus of the preceding scaffold, have ungapped and near-identical terminal columns, and not be low-complexity. On real data a dragged alignment scored 5/10 at the terminus with 42 indel bases where a true junction scored 100%, so short AT-rich matches were previously confirming junctions that were not there and trimming real bases.
- Overlap consensus no longer manufactures ambiguity codes. The coverage-majority consensus pairs the two scaffolds by index, so it now runs only when the overlap is base-alignable (no indels, and the aligned length matches the trim taken). Otherwise the preceding scaffold's bases are kept and the junction note says so, instead of quoting an identity that does not describe what was written.
- A scaffold fully consumed by overlap trimming is dropped rather than appended as an empty piece, which previously desynchronized the source-position map. The following junction is re-measured against the scaffold actually present.
- Origin rotation only happens when a block actually reaches reference position 0. Extrapolating to the origin from a distant block is wrong across N gaps and non-colinear scaffolds, where the colinear offset is not constant.
- An unticked Circular box no longer silently emits the origin region twice. Redundant-end detection always runs; when trimming is not authorized, the join note warns that the duplication is present.
- Coverage tracks stay in register. Per-position strings now preserve their position count (empty cells become NA, outlier-mask prefixes are stripped) and are padded or truncated to the sequence length. Numeric mapping columns are also coerced back after SQLite returns them as text, which it does whenever unmapped scaffolds store empty strings.
Base-pair zoom rendering blank
- The zoom's scaffold sub-region is estimated from a single anchor block, so its error grows with distance from that anchor and with every indel in between; scaffolds that showed a bar in the overview could render blank. The estimate now widens in proportion to the drift, candidate alignments are scored against the reference window and rejected below an identity floor, and a whole-scaffold realignment is tried when the estimate covers less than half the window. A drifted estimate now yields an honest blank instead of confidently wrong bases.
BLAST reference synteny orientation
- The whole-genome aligner aligns on whichever strand scores higher, so a sample stored on the opposite strand from its reference came back reverse-complemented, putting the synteny view in a different frame from the coverage map and the sequence editor: the same sample, with gene order and orientation mirrored between two plots sitting side by side. Alignments are now normalized on load so the sample is always drawn in its stored orientation and the reference carries the flip, labelled "shown reverse-complemented". Independent of the
ref_based_rccuration option, which already flips the assembly before alignment. - Origin-wrapping features keep their gene label on both arcs. Labelling only the longer arc left an unidentified arrow at the opposite edge of the linearized layout.
Path 0 attribution in the join editor
- The joined assembly now inherits its BLAST hit from the accession the layout was actually built from, not the raw dropdown value, so a reference whose recompute failed can no longer mislabel Path 0.
- Manual layouts carry their reference coordinates and recompute junction gaps rather than blanking them. An all-empty gap vector switched off the overlap probe at every junction, turning each one into a blind 100-N spacer with the shared bases duplicated, including junctions the user never touched.
- Per-sample join state is cleared when the window opens, so a stale accession or orientation from a previously viewed sample cannot be stamped onto another sample's Path 0.
Join-group ids in the annotation editor
- The next join-group id was derived from an unanchored
group=search over the notes field, and applied a non-vectorized operator to a whole column. A free-text note mentioninggroup=anywhere could steal or inflate the id, and a notes column holding only NULLs raised an error instead of returning the first id. The id is now derived from the anchoredJOIN:marker, matching the readers used by export and the un-join action.
Cluster configuration
memoryin.configis a plain number of gigabytes, but a bare number is interpreted as bytes by Nextflow.scaffold_join,coverage, andcoverage_userAsmbnow convert it explicitly and scale the request with the retry attempt, so a scheduler memory kill self-heals on retry instead of failing identically.scaffold_join.clusterOptionsaccepts a closure, letting a site configuration grow its own reservation per attempt (schedulers such as SGE take memory fromclusterOptionsrather than thememorydirective). Plain strings continue to work unchanged.- Default
scaffold_joinmemory raised from 4 GB to 8 GB, and the bundled NMNH Hydra configuration from 16 GB to 32 GB with per-attempt scaling.
Note
To update older MitoPilot projects, please run MitoPilot::backwards_compatibility(). This will add any missing fields to the SQL database (including the new assembly_backup table) and attempt to update the Docker/Singularity container version in your project .config file.
Full Changelog: 1.5.0...1.5.1