POC Creating new block groups in python without breaking node identity#110
Draft
bobvh wants to merge 14 commits into
Draft
POC Creating new block groups in python without breaking node identity#110bobvh wants to merge 14 commits into
bobvh wants to merge 14 commits into
Conversation
Introduces Cells highlight kind and cell_highlights storage in the viewport graph, allowing sub-rectangle tinting of individual nodes. Adds center_on_node_offset and highlight_match_range helpers to gen_graph_widget for navigating to and highlighting exact sequence match positions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd add inline label placement with collision avoidance Extends annotation_track.rs with full glyph rendering, inline label placement, and multi-track layout. Updates gen-tui graph widget and plotter to consume the new annotation data structures. Adds inline_label_placement.rs for label collision avoidance.
…bool
Replace case_sensitive: bool params in search/build_index methods with
sequence_kind: str ("dna", "ssdna", "protein") to match the new
GenGraphMatcher API. Derive case_sensitive internally from SequenceKind
for SeedIndex header serialization.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements a Jupyter anywidget backed by a Rust serialization layer that streams rendered frames to the browser. TypeScript sources in gen-python/js/ draw cells, box-drawing chars, and text onto a canvas. Includes pan/drag interaction and zoom buttons. Compiled JS is checked in so npm is not required at build time.
Introduces glyphs.ts with the full GLYPH_SPLIT map: mixed-weight box-drawing codepoints decomposed into a heavy layer (cell fg) and a light layer (neutral_fg), enabling true three-colour rendering without bold font tricks. Adds circle rendering for NODE_GLYPH_CP (●) via canvas arc. Updates renderer.ts to use both.
Adds flo11, yeast, and comprehensive API demo notebooks with corresponding FASTA, GFF3, and VCF reference data. Updates search_and_navigate.ipynb for the new widget API.
- implemented create_block_group_from_* methods on Repository - moved block_group_to_* methods from Factory to BlockGroup (deleted Factory) - improved block_group_to_* nethods to include more fields from the core model - tests and notebook to prove round trip
Member
|
This demonstrates translating a protein sequence graph to the corresponding DNA sequence graph, right @bobvh ? |
Member
Author
Correct, it's demonstrated in the notebooks this PR added. Note that I pushed this as a POC, not intended to actually merge. Not deleting yet because I do want consider the upload-graph-from-networkx more if it fits in the API; or alternatively try to see if it's even possible to do the recodes without it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is something Chris at brought up a long time ago when we first had the networkx export: can we also go the other way around and create blocks directly in a networkx graph? We can with the Block datatype I implemented here for Python, and I used it to have an AI create a notebook that implements the "reverse translation graph" that we've been toying around with only in idea form.
(supersedes PR109 which had the wrong merge base, but it looks like github still lists all commits since main. Only commits from 5e9bae5 and onwards are relevant here)