[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EDSW9Z873Y2JVRE8HRY490":3,"skill-same:01M7EDSW9Z873Y2JVRE8HRY490":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EDSW9Z873Y2JVRE8HRY490","bio-hi-c-analysis-matrix-operations",null,"Balances Hi-C contact matrices (ICE via cooler.balance_cooler, KR\u002FSCALE\u002FVC context), computes distance-decay expected with cooltools (expected_cis per-diagonal P(s), expected_trans scalar), builds observed\u002Fexpected (O\u002FE) matrices, and diagnoses polymer state from the P(s) log-derivative. Covers the within-matrix-vs-cross-sample distinction (balancing is NOT a normalizer), the equal-visibility assumption that CNV\u002Faneuploidy violates (use raw counts for copy-number), cis-only balancing, mad_max\u002Fblacklist masking before balancing, multiplicative cooler weights vs divisive juicer weights, and the resolution-vs-depth budget. Use when balancing a .cool\u002F.mcool, computing expected or P(s), making O\u002FE matrices for compartments\u002Floops, deciding ICE vs KR vs SCALE, choosing a resolution for a given depth, or troubleshooting NaN\u002Fall-NaN balanced matrices; route cross-sample comparison to hic-differential.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-hi-c-analysis-matrix-operations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-hi-c-analysis-matrix-operations\ndescription: Balances Hi-C contact matrices (ICE via cooler.balance_cooler, KR\u002FSCALE\u002FVC context), computes distance-decay expected with cooltools (expected_cis per-diagonal P(s), expected_trans scalar), builds observed\u002Fexpected (O\u002FE) matrices, and diagnoses polymer state from the P(s) log-derivative. Covers the within-matrix-vs-cross-sample distinction (balancing is NOT a normalizer), the equal-visibility assumption that CNV\u002Faneuploidy violates (use raw counts for copy-number), cis-only balancing, mad_max\u002Fblacklist masking before balancing, multiplicative cooler weights vs divisive juicer weights, and the resolution-vs-depth budget. Use when balancing a .cool\u002F.mcool, computing expected or P(s), making O\u002FE matrices for compartments\u002Floops, deciding ICE vs KR vs SCALE, choosing a resolution for a given depth, or troubleshooting NaN\u002Fall-NaN balanced matrices; route cross-sample comparison to hic-differential.\ntool_type: python\nprimary_tool: cooler\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"hi-c-analysis\u002Fmatrix-operations\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: cooler 0.10+, cooltools 0.7+, bioframe 0.7+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\ncooltools standardized its API around 0.7 (functions take a `view_df` viewframe; `expected_cis` defaults to `smooth=True, aggregate_smoothed=True`). `.mcool` is multi-resolution: analysis functions take a single-resolution URI (`file.mcool::\u002Fresolutions\u002F10000`), never the bare `.mcool`. A matrix must be balanced (a stored `weight` column) before O\u002FE, compartments, insulation, or dots; `clr.matrix(balance=True)` on an unbalanced cooler returns all-NaN.\n\n# Hi-C Matrix Operations\n\n**\"Make the pixels of my Hi-C matrix comparable to each other.\"** -> Balance (remove per-bin coverage bias under equal-visibility), then divide by distance-matched expected (remove the polymer P(s) background) to get O\u002FE.\n- Python: `cooler.balance_cooler(clr, cis_only=True, store=True)`, then `cooltools.expected_cis(clr)` and divide observed by per-diagonal expected.\n\n## The Single Most Important Modern Insight -- Balancing Makes ONE Matrix Self-Consistent; It Does NOT Make Two Matrices Comparable\n\nBalancing (ICE\u002FKR) is a *within-matrix* operation: it solves for per-bin bias weights so every bin has equal genome-wide visibility, making a single map internally consistent. It does nothing to relate map A to map B. Two balanced matrices at different sequencing depth still differ in absolute magnitude, dynamic range, and noise floor -- and `rescale_marginals` makes the absolute balanced values arbitrary-scaled anyway. \"I balanced both, now I'll subtract\u002Flog2-ratio them\" is the single most common error in the field: the depth difference is read as biology. Cross-sample comparison requires downsampling to equal valid-pair count, distance-matched O\u002FE, and a replicate-aware differential tool (multiHiCcompare, HiCcompare loess-over-distance, dcHiC) -- route to hic-differential.\n\nTwo corollaries that flow from the same equal-visibility model:\n\n1. **CNV silently breaks balancing.** The premise is that every bin *should* make the same number of contacts; any deviation is technical bias. That is true for a diploid uniform-copy genome and FALSE for tumors\u002Faneuploids -- a 3-copy region genuinely contacts ~3x more. ICE forces equal marginals and ERASES that real copy-number, then redistributes it perversely (post-ICE high-copy regions go cis-depleted, trans-enriched; Servant 2018). Use **raw counts** for CNV\u002FSV calling (coverage IS the signal -> copy-number); plain ICE\u002FKR on an aneuploid is a category error (use CNV-aware LOIC\u002FCAIC for 3D structure).\n2. **A balanced cis map is still dominated by distance-decay.** The A\u002FB plaid and focal loops are a faint modulation under the P(s) background. Dividing by distance-matched expected (O\u002FE) before eigendecomposition is mandatory, or the top eigenvector is just the decay curve, not compartments.\n\n## Normalization-Method Taxonomy\n\n| Method | What it does | Mechanism | When |\n|--------|-------------|-----------|------|\n| ICE (cooler native) | true matrix balancing | iterative proportional fitting (Sinkhorn); equalizes all marginals | default; robust, converges on sparse\u002Flow-depth where KR fails |\n| KR (juicer) | true matrix balancing | Knight-Ruiz Newton solver; SAME fixed point as ICE | fast (few iterations); fails to converge on sparse\u002Fhigh-res maps |\n| SCALE (juicer) | true matrix balancing | modern KR-family solver, more robust | juicer's default; converges where KR diverges on sparse maps |\n| VC \u002F vanilla coverage | NOT true balancing | single pass: divide by row-coverage * col-coverage (one ICE iteration) | fast robust fallback; leaves residual bias |\n| VC_SQRT | NOT true balancing | divide by sqrt of coverage product (gentler than VC) | very sparse data where full balancing overfits |\n| LOIC \u002F CAIC (Servant 2018) | CNV-aware balancing | condition on copy-number; LOIC keeps the CN effect, CAIC removes it | aneuploid\u002Ftumor genomes (plain ICE is wrong here) |\n\nKR and ICE reach the same balanced map -- choose by **convergence, not quality**: KR is faster but blows up on sparse\u002Flow-depth\u002Fhigh-resolution matrices; ICE is the robust default; SCALE is the juicer-side answer when KR fails.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|----------|-------------|-----|\n| Need to balance a diploid map | `cooler.balance_cooler(cis_only=True, store=True)` (ICE) | robust default; cis-only is the analysis convention |\n| KR failed to converge (sparse\u002Fhigh-res) | fall back to ICE, or SCALE on the juicer side | same fixed point; ICE\u002FSCALE are the robust solvers |\n| Tumor \u002F aneuploid genome, 3D structure | CNV-aware LOIC\u002FCAIC (Servant 2018) | plain ICE erases real copy-number |\n| CNV \u002F SV calling from Hi-C | RAW counts (no balancing) | coverage is the signal -> copy-number |\n| Compartments at 100kb-1Mb | balance -> `expected_cis` -> O\u002FE -> Pearson -> eigenvector | O\u002FE removes P(s) so the plaid is visible -> compartment-analysis |\n| Focal loops \u002F TADs | balance -> `expected_cis` -> O\u002FE | local enrichment needs the distance background removed -> loop-calling, tad-detection |\n| P(s) \u002F polymer-state diagnostic | `expected_cis(smooth=True)` -> log-derivative | the derivative reads out loop-extrusion machinery |\n| Imported a juicer KR\u002FVC weight column | check `divisive_weights` before applying | cooler weights are multiplicative, juicer's are divisive |\n| Compare two conditions | downsample to equal depth, then -> hic-differential | balancing is within-matrix, not a cross-sample normalizer |\n| Bare `.mcool` passed and KeyError | use `file.mcool::\u002Fresolutions\u002F\u003Cbp>` URI | `.mcool` is a container of resolutions |\n\n## Balance a Matrix (ICE)\n\n**Goal:** Remove one-dimensional per-bin coverage bias so every bin has equal genome-wide visibility within this single map.\n\n**Approach:** Mask low-coverage and blacklisted bins FIRST (mad_max on log-marginals + explicit blacklist of centromere\u002FrDNA\u002Funmappable), drop the first two diagonals (ligation chemistry, not 3D contact), then run cis-only ICE; the multiplicative weight vector is stored in the `weight` column.\n\n```python\nimport cooler\n\nclr = cooler.Cooler('matrix.mcool::\u002Fresolutions\u002F10000')\nbias, stats = cooler.balance_cooler(clr, cis_only=True, mad_max=5, ignore_diags=2, blacklist=None, store=True)\nprint('converged:', stats['converged'], 'scale:', stats['scale'])   # stats also reports var, divisive_weights\n\nclr = cooler.Cooler('matrix.mcool::\u002Fresolutions\u002F10000')              # re-open to see the stored weights\nbalanced = clr.matrix(balance=True).fetch('chr1')                    # raw[i,j] * w[i] * w[j]; masked bins -> NaN\n```\n\n`cis_only=True` is the convention for compartment\u002FTAD\u002Floop work -- trans signal is weak, noisy ambient ligation that pulls the bias estimates toward trans noise. `ignore_diags=2` drops the main diagonal (self-ligation\u002Fdangling ends) and first off-diagonal (undigested\u002Freligated fragments): huge untrustworthy counts that would dominate the marginals. `mad_max=5` filters bins whose **log**-marginal is >5 MAD below the median; without it a near-empty unmappable\u002Fcentromeric bin gets a gigantic weight and ICE diverges. Masking (mad_max + `blacklist`) MUST precede balancing -- balancing cannot rescue a no-signal bin, it amplifies it.\n\nCLI equivalent:\n\n```bash\ncooler balance --cis-only --mad-max 5 --ignore-diags 2 matrix.mcool::\u002Fresolutions\u002F10000\n```\n\n## Expected: cis P(s) Curve and trans Scalar\n\n**Goal:** Build the distance-decay background (the denominator for O\u002FE) and the P(s) curve for diagnostics.\n\n**Approach:** cis expected is a per-diagonal curve (one value per separation s -- this IS P(s)); trans expected is a single scalar per chromosome-pair block (trans contacts are ~distance-independent). cooltools enforces the split with two functions.\n\n```python\nimport cooltools\nimport bioframe\n\nclr = cooler.Cooler('matrix.mcool::\u002Fresolutions\u002F10000')\nview_df = bioframe.make_viewframe(clr.chromsizes)               # whole-chromosome regions; or arms for acrocentric genomes\n\ncvd = cooltools.expected_cis(clr, view_df=view_df, smooth=True, aggregate_smoothed=True, ignore_diags=2)\n# columns include: region1, region2, dist, dist_bp, n_valid, count.avg, balanced.avg, balanced.avg.smoothed.agg\n\ntrans_exp = cooltools.expected_trans(clr, view_df=view_df)      # one balanced.avg per region1-region2 block\n```\n\n`smooth=True` smooths P(s) in log10(distance) space (`smooth_sigma=0.1`). Pre-0.7.0 cooltools errored on raw smoothing (`clr_weight_name=None, smooth=True`, issue #456); that was fixed in 0.7.0, and raw smoothing now returns `count.avg.smoothed`. Regardless of version, balance first: a raw expected still carries per-bin coverage bias, so it is not a clean P(s)\u002FO\u002FE denominator.\n\n## Observed\u002FExpected Matrix\n\n**Goal:** Divide out the polymer distance-decay so enrichment (loops, plaid) stands above the local background.\n\n**Approach:** Map the per-diagonal cis expected (`balanced.avg`, keyed by `dist`) onto a dense balanced matrix by diagonal offset -- vectorized with numpy diagonal indexing, NOT an O(n^2) Python loop.\n\n```python\nimport numpy as np\n\ndef oe_matrix(clr, region, cvd):\n    obs = clr.matrix(balance=True).fetch(region)\n    chrom = region.split(':')[0] if isinstance(region, str) else region[0]\n    exp = cvd[cvd['region1'] == chrom].set_index('dist')['balanced.avg']\n    exp_by_dist = exp.reindex(range(obs.shape[0])).to_numpy()              # one expected per separation s\n    expected = exp_by_dist[np.abs(np.subtract.outer(np.arange(obs.shape[0]), np.arange(obs.shape[0])))]\n    return obs \u002F expected                                                  # NaN where expected is NaN (masked diags)\n\noe = oe_matrix(clr, 'chr1', cvd)\nlog_oe = np.log2(oe)                                                        # symmetric around 0 for display\n```\n\ncooltools also ships `cooltools.lib.numutils.observed_over_expected(matrix, mask)` (returns a 4-tuple `(OE, dist_bins, sum_pixels, n_pixels)`) for a self-contained dense O\u002FE without a precomputed `cvd`.\n\n## P(s) Log-Derivative -- the Polymer-State Diagnostic\n\n**Goal:** Read out chromatin polymer state and loop-extrusion machinery from the shape of the contact-decay curve.\n\n**Approach:** Take the slope of P(s) in log-log space; a reference slope near -1 over 0.1-1 Mb is the crumpled-globule background, and a loop-extrusion bump (~100kb interphase) appears as a peak in the derivative. Smooth in logspace FIRST or the derivative is pure noise.\n\n```python\nagg = cvd[(cvd['region1'] == cvd['region2']) & (cvd['dist'] > 0)].drop_duplicates('dist_bp')\nslope = np.gradient(np.log(agg['balanced.avg.smoothed.agg']), np.log(agg['dist_bp']))\n# slope ~ -1 over 0.1-1 Mb; a bump toward 0 near ~100kb flags cohesin loop extrusion (flattens on WAPL\u002FRAD21 loss)\n```\n\n## Resolution-vs-Depth Budget\n\nThe achievable resolution is a function of depth and genome size, not a free choice. Rule of thumb: a bin needs ~**1000 contacts** to be reliably populated, and the number of bins scales as N^2 with the number of genomic bins -- so halving bin size quarters per-bin coverage. Coarse features are cheap, focal features are expensive:\n\n| Feature | Resolution | Approximate depth (human) | Why |\n|---------|-----------|---------------------------|-----|\n| A\u002FB compartments | 100kb-1Mb | tens of millions of valid pairs | chromosome-scale, few large bins -> cheap |\n| TADs \u002F insulation | 10-50kb | hundreds of millions | sub-Mb domains; window 5-25x the bin |\n| Loops \u002F dots | \u003C=10kb | billions (Rao 2014 in-situ Hi-C ~ billions) | focal kb-scale pixels; coarse bins blur anchors |\n\nCalling 10kb loops from a shallow library binned at 50kb is not a resolution choice -- there is no signal there. Choose the finest resolution where median per-bin contacts stay near ~1000.\n\n## Per-Method Failure Modes\n\n### Cross-sample subtraction of balanced matrices\n**Trigger:** balancing two libraries then log2-ratioing\u002Fsubtracting. **Mechanism:** balancing is within-matrix; balanced magnitude still scales with depth and `rescale_marginals` makes it arbitrary. **Symptom:** systematic genome-wide \"differences\" that track sequencing depth. **Fix:** downsample to equal valid pairs, compare O\u002FE, use a replicate-aware tool -> hic-differential.\n\n### Plain ICE on an aneuploid \u002F tumor\n**Trigger:** `balance_cooler` on a genome with large copy-number swings. **Mechanism:** equal-visibility forces equal marginals, erasing the real ~CN-fold coverage. **Symptom:** high-copy regions look cis-depleted\u002Ftrans-enriched (Servant 2018); CNV vanishes. **Fix:** raw counts for CNV calling; LOIC\u002FCAIC for 3D structure.\n\n### Masking after (not before) balancing\n**Trigger:** low-coverage centromere\u002FrDNA\u002Funmappable bins left in before ICE. **Mechanism:** a near-empty bin gets a gigantic bias weight. **Symptom:** ICE fails to converge, or stripe artifacts radiate from a few bins. **Fix:** set `mad_max` and pass `blacklist`; masking precedes balancing.\n\n### Eigendecomposition on a balanced (non-O\u002FE) map\n**Trigger:** compartment calling skips the expected\u002FO\u002FE step. **Mechanism:** the distance-decay dominates the balanced cis map. **Symptom:** top eigenvector is the P(s) curve, not the A\u002FB plaid. **Fix:** divide by `expected_cis` (O\u002FE) before correlating\u002Feigendecomposing.\n\n### Crossing multiplicative and divisive weights\n**Trigger:** applying an imported juicer KR\u002FVC vector as if it were a cooler weight. **Mechanism:** cooler weights are multiplicative (raw*w*w), juicer's are divisive (raw\u002Fw\u002Fw). **Symptom:** correction inverts -- high-bias bins get MORE extreme; nothing errors. **Fix:** check the weight column's `divisive_weights` attribute before applying.\n\n### O\u002FE from a raw (unbalanced) expected\n**Trigger:** computing P(s)\u002FO\u002FE from `expected_cis(clr_weight_name=None)`. **Mechanism:** raw expected still carries per-bin coverage bias, so dividing by it does not cleanly remove the polymer background; pre-0.7.0 cooltools additionally errored on `smooth=True` with raw (issue #456, fixed in 0.7.0). **Symptom:** O\u002FE still shows coverage stripes; on old cooltools, an error demanding balanced data. **Fix:** balance first, then `expected_cis` on the balanced `weight` column.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|-----------|--------|-----------|\n| `ignore_diags=2` | cooler default; ICE convention | drops self-ligation\u002Fdangling (diag 0) + undigested\u002Freligated (diag 1); ligation chemistry, not 3D contact |\n| `mad_max=5` | cooler default | drops bins >5 MAD below median LOG-marginal; near-empty bins otherwise get exploding weights |\n| `min_nnz=10` | cooler default | \u003C10 nonzero pixels per row is too sparse to estimate a bias reliably |\n| `tol=1e-5`, `max_iters=200` | cooler defaults | convergence = variance of balanced marginals \u003C tol; non-convergence usually = a masking problem, not a tol problem |\n| `smooth_sigma=0.1` | cooltools default | Gaussian std in log10(distance) units for P(s) smoothing |\n| ~1000 contacts\u002Fbin | depth-budget convention | per-bin coverage floor for a reliably populated bin; bins scale ~N^2 |\n| Compartment res 100kb-1Mb | compartment scale | finer bins mix in TAD\u002Floop structure |\n| TAD\u002Finsulation res 10-50kb | domain scale | sub-Mb domains; window 5-25x the bin |\n| Loop res \u003C=10kb (needs ~billions of pairs) | Rao 2014 in-situ Hi-C | focal kb-scale; coarse bins blur loop anchors |\n| P(s) slope ~ -1 over 0.1-1 Mb | crumpled\u002Ffractal globule | reference background; deviations\u002Fderivative read out polymer state |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `clr.matrix(balance=True)` all NaN | cooler not balanced | run `cooler.balance_cooler(..., store=True)` first |\n| Empty \u002F wrong-resolution result on .mcool | bare `.mcool` passed | use `file.mcool::\u002Fresolutions\u002F\u003Cbp>` URI |\n| ICE not converging | low-coverage bins not masked | raise\u002Fset `mad_max`, pass `blacklist`; do not just raise `max_iters` |\n| `expected_cis(smooth=True)` errors on raw (pre-0.7.0 only) | `clr_weight_name=None` on old cooltools (issue #456, fixed 0.7.0) | upgrade to cooltools 0.7+, or balance first \u002F `smooth=False` |\n| O\u002FE enrichment inverted on a tumor | ICE applied to an aneuploid | use raw counts \u002F LOIC\u002FCAIC; equal-visibility is violated |\n| Imported weight makes bias worse | divisive juicer weight applied as multiplicative | check `divisive_weights`; reciprocate if needed |\n| Cross-condition \"difference\" tracks depth | subtracting balanced matrices | downsample + O\u002FE + replicate-aware test -> hic-differential |\n\n## References\n\n- Imakaev et al. 2012 *Nat Methods* 9:999-1003 -- ICE iterative correction.\n- Knight & Ruiz 2013 *IMA J Numer Anal* 33(3):1029-1047 -- KR matrix-balancing algorithm.\n- Rao et al. 2014 *Cell* 159(7):1665-1680 -- in-situ Hi-C, KR norm, VC\u002FVC_SQRT, kilobase loops (depth budget).\n- Cournac et al. 2012 *BMC Genomics* 13:436 -- sequential\u002Fvanilla-coverage (SCN\u002FVC) normalization.\n- Servant et al. 2018 *BMC Bioinformatics* 19:313 -- CNV-aware normalization (LOIC\u002FCAIC); ICE erases copy-number.\n- Abdennur & Mirny 2020 *Bioinformatics* 36(1):311-316 -- cooler.\n- Open2C, Abdennur et al. 2024 *PLoS Comput Biol* 20(5):e1012067 -- cooltools.\n- Open2C, Abdennur et al. 2024 *Bioinformatics* 40(2):btae088 -- bioframe.\n\n## Related Skills\n\n- hic-data-io - Load the cooler files this skill balances; divisive-vs-multiplicative weight naming\n- compartment-analysis - Consumes the O\u002FE this skill produces for eigenvector calling\n- tad-detection - Insulation needs a cis-balanced matrix\n- loop-calling - Dots need balanced + expected as prerequisites\n- hic-differential - Cross-sample comparison; the right home for subtracting\u002Fratioing conditions\n- hic-visualization - Render balanced\u002FO\u002FE\u002Flog matrices\n- copy-number\u002Fcnv-visualization - Raw-count CNV from Hi-C when balancing would erase copy-number\n- genome-intervals\u002Fbigwig-tracks - Export the P(s)\u002Fexpected or eigenvector as a bigWig\n","## Version Compatibility\n\nReference examples tested with: cooler 0.10+, cooltools 0.7+, bioframe 0.7+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\ncooltools standardized its API around 0.7 (functions take a `view_df` viewframe; `expected_cis` defaults to `smooth=True, aggregate_smoothed=True`). `.mcool` is multi-resolution: analysis functions take a single-resolution URI (`file.mcool::\u002Fresolutions\u002F10000`), never the bare `.mcool`. A matrix must be balanced (a stored `weight` column) before O\u002FE, compartments, insulation, or dots; `clr.matrix(balance=True)` on an unbalanced cooler returns all-NaN.\n\n# Hi-C Matrix Operations\n\n**\"Make the pixels of my Hi-C matrix comparable to each other.\"** -> Balance (remove per-bin coverage bias under equal-visibility), then divide by distance-matched expected (remove the polymer P(s) background) to get O\u002FE.\n- Python: `cooler.balance_cooler(clr, cis_only=True, store=True)`, then `cooltools.expected_cis(clr)` and divide observed by per-diagonal expected.\n\n## The Single Most Important Modern Insight -- Balancing Makes ONE Matrix Self-Consistent; It Does NOT Make Two Matrices Comparable\n\nBalancing (ICE\u002FKR) is a *within-matrix* operation: it solves for per-bin bias weights so every bin has equal genome-wide visibility, making a single map internally consistent. It does nothing to relate map A to map B. Two balanced matrices at different sequencing depth still differ in absolute magnitude, dynamic range, and noise floor -- and `rescale_marginals` makes the absolute balanced values arbitrary-scaled anyway. \"I balanced both, now I'll subtract\u002Flog2-ratio them\" is the single most common error in the field: the depth difference is read as biology. Cross-sample comparison requires downsampling to equal valid-pair count, distance-matched O\u002FE, and a replicate-aware differential tool (multiHiCcompare, HiCcompare loess-over-distance, dcHiC) -- route to hic-differential.\n\nTwo corollaries that flow from the same equal-visibility model:\n\n1. **CNV silently breaks balancing.** The premise is that every bin *should* make the same number of contacts; any deviation is technical bias. That is true for a diploid uniform-copy genome and FALSE for tumors\u002Faneuploids -- a 3-copy region genuinely contacts ~3x more. ICE forces equal marginals and ERASES that real copy-number, then redistributes it perversely (post-ICE high-copy regions go cis-depleted, trans-enriched; Servant 2018). Use **raw counts** for CNV\u002FSV calling (coverage IS the signal -> copy-number); plain ICE\u002FKR on an aneuploid is a category error (use CNV-aware LOIC\u002FCAIC for 3D structure).\n2. **A balanced cis map is still dominated by distance-decay.** The A\u002FB plaid and focal loops are a faint modulation under the P(s) background. Dividing by distance-matched expected (O\u002FE) before eigendecomposition is mandatory, or the top eigenvector is just the decay curve, not compartments.\n\n## Normalization-Method Taxonomy\n\n| Method | What it does | Mechanism | When |\n|--------|-------------|-----------|------|\n| ICE (cooler native) | true matrix balancing | iterative proportional fitting (Sinkhorn); equalizes all marginals | default; robust, converges on sparse\u002Flow-depth where KR fails |\n| KR (juicer) | true matrix balancing | Knight-Ruiz Newton solver; SAME fixed point as ICE | fast (few iterations); fails to converge on sparse\u002Fhigh-res maps |\n| SCALE (juicer) | true matrix balancing | modern KR-family solver, more robust | juicer's default; converges where KR diverges on sparse maps |\n| VC \u002F vanilla coverage | NOT true balancing | single pass: divide by row-coverage * col-coverage (one ICE iteration) | fast robust fallback; leaves residual bias |\n| VC_SQRT | NOT true balancing | divide by sqrt of coverage product (gentler than VC) | very sparse data where full balancing overfits |\n| LOIC \u002F CAIC (Servant 2018) | CNV-aware balancing | condition on copy-number; LOIC keeps the CN effect, CAIC removes it | aneuploid\u002Ftumor genomes (plain ICE is wrong here) |\n\nKR and ICE reach the same balanced map -- choose by **convergence, not quality**: KR is faster but blows up on sparse\u002Flow-depth\u002Fhigh-resolution matrices; ICE is the robust default; SCALE is the juicer-side answer when KR fails.\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended | Why |\n|----------|-------------|-----|\n| Need to balance a diploid map | `cooler.balance_cooler(cis_only=True, store=True)` (ICE) | robust default; cis-only is the analysis convention |\n| KR failed to converge (sparse\u002Fhigh-res) | fall back to ICE, or SCALE on the juicer side | same fixed point; ICE\u002FSCALE are the robust solvers |\n| Tumor \u002F aneuploid genome, 3D structure | CNV-aware LOIC\u002FCAIC (Servant 2018) | plain ICE erases real copy-number |\n| CNV \u002F SV calling from Hi-C | RAW counts (no balancing) | coverage is the signal -> copy-number |\n| Compartments at 100kb-1Mb | balance -> `expected_cis` -> O\u002FE -> Pearson -> eigenvector | O\u002FE removes P(s) so the plaid is visible -> compartment-analysis |\n| Focal loops \u002F TADs | balance -> `expected_cis` -> O\u002FE | local enrichment needs the distance background removed -> loop-calling, tad-detection |\n| P(s) \u002F polymer-state diagnostic | `expected_cis(smooth=True)` -> log-derivative | the derivative reads out loop-extrusion machinery |\n| Imported a juicer KR\u002FVC weight column | check `divisive_weights` before applying | cooler weights are multiplicative, juicer's are divisive |\n| Compare two conditions | downsample to equal depth, then -> hic-differential | balancing is within-matrix, not a cross-sample normalizer |\n| Bare `.mcool` passed and KeyError | use `file.mcool::\u002Fresolutions\u002F\u003Cbp>` URI | `.mcool` is a container of resolutions |\n\n## Balance a Matrix (ICE)\n\n**Goal:** Remove one-dimensional per-bin coverage bias so every bin has equal genome-wide visibility within this single map.\n\n**Approach:** Mask low-coverage and blacklisted bins FIRST (mad_max on log-marginals + explicit blacklist of centromere\u002FrDNA\u002Funmappable), drop the first two diagonals (ligation chemistry, not 3D contact), then run cis-only ICE; the multiplicative weight vector is stored in the `weight` column.\n\n```python\nimport cooler\n\nclr = cooler.Cooler('matrix.mcool::\u002Fresolutions\u002F10000')\nbias, stats = cooler.balance_cooler(clr, cis_only=True, mad_max=5, ignore_diags=2, blacklist=None, store=True)\nprint('converged:', stats['converged'], 'scale:', stats['scale'])   # stats also reports var, divisive_weights\n\nclr = cooler.Cooler('matrix.mcool::\u002Fresolutions\u002F10000')              # re-open to see the stored weights\nbalanced = clr.matrix(balance=True).fetch('chr1')                    # raw[i,j] * w[i] * w[j]; masked bins -> NaN\n```\n\n`cis_only=True` is the convention for compartment\u002FTAD\u002Floop work -- trans signal is weak, noisy ambient ligation that pulls the bias estimates toward trans noise. `ignore_diags=2` drops the main diagonal (self-ligation\u002Fdangling ends) and first off-diagonal (undigested\u002Freligated fragments): huge untrustworthy counts that would dominate the marginals. `mad_max=5` filters bins whose **log**-marginal is >5 MAD below the median; without it a near-empty unmappable\u002Fcentromeric bin gets a gigantic weight and ICE diverges. Masking (mad_max + `blacklist`) MUST precede balancing -- balancing cannot rescue a no-signal bin, it amplifies it.\n\nCLI equivalent:\n\n```bash\ncooler balance --cis-only --mad-max 5 --ignore-diags 2 matrix.mcool::\u002Fresolutions\u002F10000\n```\n\n## Expected: cis P(s) Curve and trans Scalar\n\n**Goal:** Build the distance-decay background (the denominator for O\u002FE) and the P(s) curve for diagnostics.\n\n**Approach:** cis expected is a per-diagonal curve (one value per separation s -- this IS P(s)); trans expected is a single scalar per chromosome-pair block (trans contacts are ~distance-independent). cooltools enforces the split with two functions.\n\n```python\nimport cooltools\nimport bioframe\n\nclr = cooler.Cooler('matrix.mcool::\u002Fresolutions\u002F10000')\nview_df = bioframe.make_viewframe(clr.chromsizes)               # whole-chromosome regions; or arms for acrocentric genomes\n\ncvd = cooltools.expected_cis(clr, view_df=view_df, smooth=True, aggregate_smoothed=True, ignore_diags=2)\n# columns include: region1, region2, dist, dist_bp, n_valid, count.avg, balanced.avg, balanced.avg.smoothed.agg\n\ntrans_exp = cooltools.expected_trans(clr, view_df=view_df)      # one balanced.avg per region1-region2 block\n```\n\n`smooth=True` smooths P(s) in log10(distance) space (`smooth_sigma=0.1`). Pre-0.7.0 cooltools errored on raw smoothing (`clr_weight_name=None, smooth=True`, issue #456); that was fixed in 0.7.0, and raw smoothing now returns `count.avg.smoothed`. Regardless of version, balance first: a raw expected still carries per-bin coverage bias, so it is not a clean P(s)\u002FO\u002FE denominator.\n\n## Observed\u002FExpected Matrix\n\n**Goal:** Divide out the polymer distance-decay so enrichment (loops, plaid) stands above the local background.\n\n**Approach:** Map the per-diagonal cis expected (`balanced.avg`, keyed by `dist`) onto a dense balanced matrix by diagonal offset -- vectorized with numpy diagonal indexing, NOT an O(n^2) Python loop.\n\n```python\nimport numpy as np\n\ndef oe_matrix(clr, region, cvd):\n    obs = clr.matrix(balance=True).fetch(region)\n    chrom = region.split(':')[0] if isinstance(region, str) else region[0]\n    exp = cvd[cvd['region1'] == chrom].set_index('dist')['balanced.avg']\n    exp_by_dist = exp.reindex(range(obs.shape[0])).to_numpy()              # one expected per separation s\n    expected = exp_by_dist[np.abs(np.subtract.outer(np.arange(obs.shape[0]), np.arange(obs.shape[0])))]\n    return obs \u002F expected                                                  # NaN where expected is NaN (masked diags)\n\noe = oe_matrix(clr, 'chr1', cvd)\nlog_oe = np.log2(oe)                                                        # symmetric around 0 for display\n```\n\ncooltools also ships `cooltools.lib.numutils.observed_over_expected(matrix, mask)` (returns a 4-tuple `(OE, dist_bins, sum_pixels, n_pixels)`) for a self-contained dense O\u002FE without a precomputed `cvd`.\n\n## P(s) Log-Derivative -- the Polymer-State Diagnostic\n\n**Goal:** Read out chromatin polymer state and loop-extrusion machinery from the shape of the contact-decay curve.\n\n**Approach:** Take the slope of P(s) in log-log space; a reference slope near -1 over 0.1-1 Mb is the crumpled-globule background, and a loop-extrusion bump (~100kb interphase) appears as a peak in the derivative. Smooth in logspace FIRST or the derivative is pure noise.\n\n```python\nagg = cvd[(cvd['region1'] == cvd['region2']) & (cvd['dist'] > 0)].drop_duplicates('dist_bp')\nslope = np.gradient(np.log(agg['balanced.avg.smoothed.agg']), np.log(agg['dist_bp']))\n# slope ~ -1 over 0.1-1 Mb; a bump toward 0 near ~100kb flags cohesin loop extrusion (flattens on WAPL\u002FRAD21 loss)\n```\n\n## Resolution-vs-Depth Budget\n\nThe achievable resolution is a function of depth and genome size, not a free choice. Rule of thumb: a bin needs ~**1000 contacts** to be reliably populated, and the number of bins scales as N^2 with the number of genomic bins -- so halving bin size quarters per-bin coverage. Coarse features are cheap, focal features are expensive:\n\n| Feature | Resolution | Approximate depth (human) | Why |\n|---------|-----------|---------------------------|-----|\n| A\u002FB compartments | 100kb-1Mb | tens of millions of valid pairs | chromosome-scale, few large bins -> cheap |\n| TADs \u002F insulation | 10-50kb | hundreds of millions | sub-Mb domains; window 5-25x the bin |\n| Loops \u002F dots | \u003C=10kb | billions (Rao 2014 in-situ Hi-C ~ billions) | focal kb-scale pixels; coarse bins blur anchors |\n\nCalling 10kb loops from a shallow library binned at 50kb is not a resolution choice -- there is no signal there. Choose the finest resolution where median per-bin contacts stay near ~1000.\n\n## Per-Method Failure Modes\n\n### Cross-sample subtraction of balanced matrices\n**Trigger:** balancing two libraries then log2-ratioing\u002Fsubtracting. **Mechanism:** balancing is within-matrix; balanced magnitude still scales with depth and `rescale_marginals` makes it arbitrary. **Symptom:** systematic genome-wide \"differences\" that track sequencing depth. **Fix:** downsample to equal valid pairs, compare O\u002FE, use a replicate-aware tool -> hic-differential.\n\n### Plain ICE on an aneuploid \u002F tumor\n**Trigger:** `balance_cooler` on a genome with large copy-number swings. **Mechanism:** equal-visibility forces equal marginals, erasing the real ~CN-fold coverage. **Symptom:** high-copy regions look cis-depleted\u002Ftrans-enriched (Servant 2018); CNV vanishes. **Fix:** raw counts for CNV calling; LOIC\u002FCAIC for 3D structure.\n\n### Masking after (not before) balancing\n**Trigger:** low-coverage centromere\u002FrDNA\u002Funmappable bins left in before ICE. **Mechanism:** a near-empty bin gets a gigantic bias weight. **Symptom:** ICE fails to converge, or stripe artifacts radiate from a few bins. **Fix:** set `mad_max` and pass `blacklist`; masking precedes balancing.\n\n### Eigendecomposition on a balanced (non-O\u002FE) map\n**Trigger:** compartment calling skips the expected\u002FO\u002FE step. **Mechanism:** the distance-decay dominates the balanced cis map. **Symptom:** top eigenvector is the P(s) curve, not the A\u002FB plaid. **Fix:** divide by `expected_cis` (O\u002FE) before correlating\u002Feigendecomposing.\n\n### Crossing multiplicative and divisive weights\n**Trigger:** applying an imported juicer KR\u002FVC vector as if it were a cooler weight. **Mechanism:** cooler weights are multiplicative (raw*w*w), juicer's are divisive (raw\u002Fw\u002Fw). **Symptom:** correction inverts -- high-bias bins get MORE extreme; nothing errors. **Fix:** check the weight column's `divisive_weights` attribute before applying.\n\n### O\u002FE from a raw (unbalanced) expected\n**Trigger:** computing P(s)\u002FO\u002FE from `expected_cis(clr_weight_name=None)`. **Mechanism:** raw expected still carries per-bin coverage bias, so dividing by it does not cleanly remove the polymer background; pre-0.7.0 cooltools additionally errored on `smooth=True` with raw (issue #456, fixed in 0.7.0). **Symptom:** O\u002FE still shows coverage stripes; on old cooltools, an error demanding balanced data. **Fix:** balance first, then `expected_cis` on the balanced `weight` column.\n\n## Quantitative Thresholds\n\n| Threshold | Source | Rationale |\n|-----------|--------|-----------|\n| `ignore_diags=2` | cooler default; ICE convention | drops self-ligation\u002Fdangling (diag 0) + undigested\u002Freligated (diag 1); ligation chemistry, not 3D contact |\n| `mad_max=5` | cooler default | drops bins >5 MAD below median LOG-marginal; near-empty bins otherwise get exploding weights |\n| `min_nnz=10` | cooler default | \u003C10 nonzero pixels per row is too sparse to estimate a bias reliably |\n| `tol=1e-5`, `max_iters=200` | cooler defaults | convergence = variance of balanced marginals \u003C tol; non-convergence usually = a masking problem, not a tol problem |\n| `smooth_sigma=0.1` | cooltools default | Gaussian std in log10(distance) units for P(s) smoothing |\n| ~1000 contacts\u002Fbin | depth-budget convention | per-bin coverage floor for a reliably populated bin; bins scale ~N^2 |\n| Compartment res 100kb-1Mb | compartment scale | finer bins mix in TAD\u002Floop structure |\n| TAD\u002Finsulation res 10-50kb | domain scale | sub-Mb domains; window 5-25x the bin |\n| Loop res \u003C=10kb (needs ~billions of pairs) | Rao 2014 in-situ Hi-C | focal kb-scale; coarse bins blur loop anchors |\n| P(s) slope ~ -1 over 0.1-1 Mb | crumpled\u002Ffractal globule | reference background; deviations\u002Fderivative read out polymer state |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `clr.matrix(balance=True)` all NaN | cooler not balanced | run `cooler.balance_cooler(..., store=True)` first |\n| Empty \u002F wrong-resolution result on .mcool | bare `.mcool` passed | use `file.mcool::\u002Fresolutions\u002F\u003Cbp>` URI |\n| ICE not converging | low-coverage bins not masked | raise\u002Fset `mad_max`, pass `blacklist`; do not just raise `max_iters` |\n| `expected_cis(smooth=True)` errors on raw (pre-0.7.0 only) | `clr_weight_name=None` on old cooltools (issue #456, fixed 0.7.0) | upgrade to cooltools 0.7+, or balance first \u002F `smooth=False` |\n| O\u002FE enrichment inverted on a tumor | ICE applied to an aneuploid | use raw counts \u002F LOIC\u002FCAIC; equal-visibility is violated |\n| Imported weight makes bias worse | divisive juicer weight applied as multiplicative | check `divisive_weights`; reciprocate if needed |\n| Cross-condition \"difference\" tracks depth | subtracting balanced matrices | downsample + O\u002FE + replicate-aware test -> hic-differential |\n\n## References\n\n- Imakaev et al. 2012 *Nat Methods* 9:999-1003 -- ICE iterative correction.\n- Knight & Ruiz 2013 *IMA J Numer Anal* 33(3):1029-1047 -- KR matrix-balancing algorithm.\n- Rao et al. 2014 *Cell* 159(7):1665-1680 -- in-situ Hi-C, KR norm, VC\u002FVC_SQRT, kilobase loops (depth budget).\n- Cournac et al. 2012 *BMC Genomics* 13:436 -- sequential\u002Fvanilla-coverage (SCN\u002FVC) normalization.\n- Servant et al. 2018 *BMC Bioinformatics* 19:313 -- CNV-aware normalization (LOIC\u002FCAIC); ICE erases copy-number.\n- Abdennur & Mirny 2020 *Bioinformatics* 36(1):311-316 -- cooler.\n- Open2C, Abdennur et al. 2024 *PLoS Comput Biol* 20(5):e1012067 -- cooltools.\n- Open2C, Abdennur et al. 2024 *Bioinformatics* 40(2):btae088 -- bioframe.\n\n## Related Skills\n\n- hic-data-io - Load the cooler files this skill balances; divisive-vs-multiplicative weight naming\n- compartment-analysis - Consumes the O\u002FE this skill produces for eigenvector calling\n- tad-detection - Insulation needs a cis-balanced matrix\n- loop-calling - Dots need balanced + expected as prerequisites\n- hic-differential - Cross-sample comparison; the right home for subtracting\u002Fratioing conditions\n- hic-visualization - Render balanced\u002FO\u002FE\u002Flog matrices\n- copy-number\u002Fcnv-visualization - Raw-count CNV from Hi-C when balancing would erase copy-number\n- genome-intervals\u002Fbigwig-tracks - Export the P(s)\u002Fexpected or eigenvector as a bigWig\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","python","2026-09-20","hi-c-analysis\u002Fmatrix-operations\u002FSKILL.md","cooler","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-hi-c-analysis-matrix-operations","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-hi-c-analysis-matrix-operations",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-hi-c-analysis-matrix-operations",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-hi-c-analysis-matrix-operations","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-hi-c-analysis-matrix-operations\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fbalance_and_oe.py","SCRIPT","脚本",2275,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-hi-c-analysis-matrix-operations\u002Fexamples\u002Fbalance_and_oe.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",5180,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-hi-c-analysis-matrix-operations\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]