AGENT SKILL

circular-composition

Compose and export general pyCirclize circular layouts with Circos sectors, global primitives, links, custom polar axes, and Matplotlib figure lifecycle.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
circular-composition
license
MIT
metadata
{ "disco-role": "operating" }
description
Compose and export general pyCirclize circular layouts with Circos sectors, global primitives, links, custom polar axes, and Matplotlib figure lifecycle.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Circular composition

Use this route when the task is to build a general Circos layout from sector sizes or coordinate ranges, add composition-level annotations or links, and render/export a Matplotlib figure. This route is for pyCirclize 1.10.1 on Python >=3.10 with the base dependencies (biopython, matplotlib, numpy, pandas). Tooltip interaction is optional (pycirclize[tooltip], ipympl) and is not required for static output.

Route first

  • Use plot-primitives for Sector.add_track and every track-local drawing/data method.
  • Use data-parsers for matrix/table input, Circos.chord_diagram, and Circos.radar_chart.
  • Use genomics-and-trees for BED/GenBank/GFF initialization, cytobands, biological features, and phylogenetic trees.
  • Use the pyCirclize root route for installation, shared provenance, environment checks, and cross-workflow decisions.

Operating procedure

  1. Normalize each sector as name -> size or name -> (start, end) and choose the global degree interval, inter-sector spaces, optional final space, and per-sector direction before adding any coordinates.
  2. Construct Circos, inspect circos.deg_lim, circos.sectors, and each sector's start, end, size, deg_lim, and clockwise; use get_sector() rather than indexing by an assumed order.
  3. Add composition-level axis, text, line, rect, link, link_line, or colorbar calls. Keep x/degree coordinates in the declared sector ranges; track data belongs to the plot-primitives route.
  4. Render with plotfig() when a caller needs the returned Figure, a custom matplotlib.projections.polar.PolarAxes, a legend, subplots, or other post-render Matplotlib edits. Add legends through circos.ax only after plotfig() returns, then save the returned Figure.
  5. Use savefig() for a self-contained static export when no post-render legend/subplot/annotation must be retained. Verify the output exists and has the requested format.

Contracts and checks

  • start/end must satisfy -360 <= start < end <= 360, with span at most 360 degrees. A sequence space has one value per sector when endspace=True, or one fewer when endspace=False; total spaces cannot consume the plot.
  • Tuple sector ranges require start < end; their widths determine angular allocation, while coordinates remain in each tuple's own range.
  • sector2clockwise changes coordinate conversion for named sectors; it does not change the order of sectors. Validate directed links in both directions when mixing clockwise and anti-clockwise sectors.
  • circos.ax is unavailable until plotfig() has initialized or accepted a polar axis. plotfig(ax=...) rejects a non-polar Matplotlib axis.
  • Run the bundled deterministic composition smoke with an explicit output path. It exercises invalid configuration recovery, nonuniform spaces, tuple ranges, directed links, global primitives, the savefig() lifecycle, custom PolarAxes, legend insertion, and PNG export.

For signatures, coordinate conventions, lifecycle details, and recovery, use:

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351