Hop atlas home · Overview · Changelog · Architecture · Adding_Data · Introgression · Ribbon · Dosage · Phylogeny · Bundle · Ingest · Ingest_Gbs · Ingest_Wgs · Ingest_Grasdi · Ingest_Rnaseq · Ingest_Assembly
Rendered from hop_atlas/components/RIBBON.md (2026-10-13)
Status: living document, started 2026-10-08. The atlas and its products are tentative.
Served: scratch_plots/structural_atlas, a symlink to sync/resources/ribbon_plots/structural_atlas/, on port 8900.
- index.html: within-chromosome ribbons, reorderable rows.
- crosschrom.html: chromosome-to-chromosome, circos and linear genome-wide views.
Both pages are self-contained: all geometry is embedded and nothing is fetched at run time.
Tool: hop_atlas/tools/atlas_deploy.py (profile ribbon), described in §5.
Partly.
- Generic and runnable: rebuilding and verifying the atlas from atlas-ready inputs (§2, §5), and adding an assembly once its inputs exist (§3: one manifest entry, then rebuild).
- Cohort-specific: producing those per-assembly inputs is documented only through the Cascade example (/data/hop_data/cascade_dovetail_atlas/report/PIPELINE.sh, "documentation of what was run, paths hardcoded").
- Not reproducible as written: the original 13-haplotype alignment depends on /workspace/joint_paintings_work/, which no longer exists.
- Not available for new rows: repeat, ancestry and F-marker tracks have no documented recipe for new assemblies.
m21_h1/h2 (21110M), apollo_h1/h2, saaz_h1/h2, hl1012_h1/h2, drHumLupu, MN1421_h1/h2, MN586_h1/h2;cascade_hopbase, which is tentative: an uncollapsed diploid that should be used with caution.x → L − x). The project rule in CLAUDE.md is to orient by dominant-strand voting before plotting.| Input | Path |
|---|---|
| backbone | /data/hop_data/ref_21110M_male/male_ref.fa |
| assemblies (legacy 13) | /data/hop_data/v5_inputs_gz/*.fa.gz |
raw alignments (1 Mb chunks, minimap2 -cx asm20 --cs --secondary=no) |
/data/hop_data/block_haplotype_identity/paf/*.paf.gz (from run_align_all.sh) |
| parsed tables / orientation | /data/hop_data/deepspace_ribbons/{chunks,tables} (run_parse.sh, build_tables.py; tables/orientation_and_inversions.tsv) |
| orientation spec | /data/hop_data/gbs_tags/panel/panel_canonical_spec.tsv |
| repeats | /data/hop_data/repeat_karyotype_v4/v5b/repeat_tracks_v4.tsv |
| ancestry tiles | sync/2026-09-29/universal_introgression_atlas/tables/U3_hap_clade_universal.tsv + /data/hop_data/universal_introgression_atlas/geometry/universal_tiles.tsv |
| held display geometry (read by every render and verifier) | /data/hop_data/structural_ribbon_v2/display_geometry.json |
| intermediates | /data/hop_data/structural_ribbon_v2/{compact,crosschrom,pilot,logs} |
| extra assemblies (beyond the legacy 13) | annevo_eval/scripts/atlas_extra_assemblies.json (sha256-checked against each producer manifest) |
Similarity view (similarity.html, added 2026-10-08): "which haplotypes have the most similar arrangement of chromosome X?"
- Views: ranking (one haplotype + chromosome), one vs all chromosomes (grid), and matrix (all pairs on one chromosome); links work via #view=..&hap=..&chrom=...
- Data: no new computation. It reads pair_distances_v2.tsv, the arrangement distance build_ribbon_v2.py already uses to order rows: 5 Mb backbone windows, coverage-weighted |Δstrand|/2 + 4·|Δposition offset|. It measures arrangement, not sequence identity.
- Built by hop_atlas/tools/build_ribbon_similarity.py and tested by hop_atlas/tools/verify_ribbon_similarity.py: 8 rankings, the grid order and means, matrix counts and URL links against an independent reading of the TSV, with a shuffled-order must-fail. Both are part of atlas_deploy.py build/test ribbon.
- Background: it replaces the unmerged tools/chr_similarity_explorer (branch worktree-saaz293-hsr-cascade-panel), which used a coarser ~1 Mb window join and also scored sequence sharing and identity. Sequence-based similarity would need computing from the existing PAFs; it is not in this view.
annevo_eval/scripts/)| Step | Script | Writes |
|---|---|---|
| (once) | audit_ribbon_alignments.py; optional ribbon_sensitivity_pilot.py, summarize_ribbon_pilot.py |
alignment audit, pilot |
| 1 | build_ribbon_v2.py (imports build_structural_ribbon_atlas.py, atlas_candidate_loci.py, atlas_extra_assemblies.py) |
index.html, display_geometry.json, orientation_audit_v2.tsv, support_v2.tsv, pair_distances_v2.tsv |
| 2 | build_ribbon_crosschrom.py --render-only |
crosschrom.html |
| 3 | summarize_crosschrom_panel.py |
crosschrom_panel_comparisons.json / _summary.tsv |
| 4 | build_ribbon_crosschrom.py --render-only |
re-embeds the panel |
| 5 | compare_candidates_crosschrom.py, plot_candidates_vs_placements.py |
candidate vs placement tables and figures |
| 6 | verifiers (§4) | *_validation.json, previews |
ATLAS_OUT (served files) and ATLAS_GEOM_OUT (geometry). That is how atlas_deploy.py build ribbon builds into a stage without touching the served copy.structural_atlas/PIPELINE*.sh (V2, CANDIDATES, CROSSCHROM, GENOMEWIDE, JUNCTIONS, CASCADE_ROW). They are documentation, not drivers./data/hop_data/cascade_dovetail_atlas/report/PIPELINE.sh and its scripts/.male_ref.fa with minimap2 -cx asm20 --cs -I 8G --secondary=no.direct_vote.py).compact/<hap>.tsv.gz, crosschrom/<hap>.json.gz, meta/<hap>_orientation_and_inversions.tsv, meta/<hap>_panel_spec.tsv and meta/<hap>_alignment_loss_audit.tsv.annevo_eval/scripts/atlas_extra_assemblies.json: hap, label, short, alias, color, the five input paths, the producer manifest and a caveat.Changing the legacy 13 means editing several hard-coded lists:
- HAPS / LABEL / COL in build_structural_ribbon_atlas.py;
- NAMES in audit_ribbon_alignments.py;
- ALIAS in build_ribbon_v2.py;
- the haplotype lists in run_parse.sh, build_tables.py and run_align_all.sh.
Re-running the legacy alignment also needs /workspace/joint_paintings_work/{chunk_stream.py,keep/*.keep,ref/male_ref.asm20.mmi}, which is missing. It would have to be rebuilt from the Cascade scripts, which carry equivalent chunking (extract_chunks.py, subset_chunks.py).
Tests run only when the PI asks (PI, 2026-10-08). They are kept and documented, but not run after every change.
| Verifier | Checks |
|---|---|
verify_structural_ribbon_atlas.py |
v1 atlas files |
verify_ribbon_v2_data.py |
geometry bounds, merge negative controls, row and track counts |
verify_ribbon_v2_browser.py |
index page in headless Chromium |
verify_ribbon_crosschrom.py |
crosschrom data and page |
verify_atlas_candidate_loci.py |
candidate-loci layer |
verify_ribbon_genomewide.py |
genome-wide circos and linear views |
file:// and need the chromelibs LD_LIBRARY_PATH / FONTCONFIG_FILE, which the tool sets.*_validation.json next to the pages./data/hop_data/atlas_stages/ribbon/verify_2026-10-08/checks.txt).verify_ribbon_v2_data fails. The geometry was then restored.T=hop_atlas/tools/atlas_deploy.py
python3 $T stage ribbon --name my_change # /data/hop_data/atlas_stages/ribbon/my_change/{structural_atlas,display_geometry.json}
STG=/data/hop_data/atlas_stages/ribbon/my_change
python3 $T build ribbon $STG # steps 1-5 of §2 into the stage (ATLAS_OUT / ATLAS_GEOM_OUT set)
python3 $T test ribbon $STG # the six verifiers -> $STG/checks.txt
python3 $T deploy ribbon $STG --dry-run # lists files; for text files, lines the served copy would LOSE
python3 $T deploy ribbon $STG # refuses if the served copy or the held geometry changed since `stage`
sync/resources/ribbon_plots/structural_atlas/ and the stage geometry to /data/hop_data/structural_ribbon_v2/display_geometry.json. Every replaced file is backed up as *.bak_<stamp>_<stage>, and nothing is deleted.APPLY_*.sh scripts that lived only in session worktrees; this tool replaces them.annevo_eval/scripts/ are untracked.annevo_eval/data_inventory/provenance_scripts/structural_ribbon_atlas_v2_2026_10_01/ lacks atlas_extra_assemblies.* and the junction modules.structural_ribbon_atlas_v2_2026_10_01 and sync/resources/README.md predate the Cascade row, the candidate loci and the junctions./workspace/joint_paintings_work) are gone (§3).