Communication tool to generate 3D scenes from Ancestral Recombination Graphs (ARGs), in particular those generated by arg-needle-lib. This primarily for diagnosing and understanding the current threading behaviour in arg-needle-lib, and secondarily for visualising new potential threading operations to support polytomy.
- Replace/tidy scaling code
- Ensure ARG orientation matches original arg-needle-lib design notes
- Add
pyproject.toml - Add/public API docs
- Add VTK render?
- Render edge start/ends
pip install -r requirements.txt
python example_sim.py
open sim.blend # Open in BlenderExample screenshot of internals of ARG in Blender. ARG nodes are rendered - somewhat counterintuitively - as lines, and ARG edges are rendered as quads between these lines. This represents arg-needle-lib's structure, where each nodes span a [start, end) range along the genome, and can have many edges to other nodes, where where each edge also has a [start, end) range.
The sample nodes in the ARG are the blue lines, and internal nodes are green. The spanning edges between these nodes are rendered as translucent quads, blue if coming off a sample node, becoming redder higher up in the graph.
The ArgToBlender class processes the ARG and attempts to scale and position the nodes for an intuitive render. Setting blender_out_file will create a .blend file and set the viewport to this camera at startup. Setting png_out_file will create a .png file using this camera, for example:
You can override the camera position and target which is useful when rendering an ARG changing over time. The example_threading.py does this to generate a series of images for particular threading cases, which are collated into an animated gif:


