Agent skill · Testing & QA

nan-safe-correlation

Per-feature NaN-safe Spearman/Pearson correlation across many features (genes, proteins, variants) with missing values. Covers why bulk matrix shortcuts fail, correct pairwise deletion, degenerate input filtering, and large-dataset performance. Use statistical-analysis for test choice; shap-model-explainability for interpretability.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill nan-safe-correlation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 11 KB
Bundled scripts: none
Path: skills/sciagent/nan-safe-correlation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# NaN-Safe Correlation Computation ## Overview Computing correlations across many features (genes, proteins, variants) when missing values are present is error-prone. The most common mistake is using bulk matrix shortcuts that silently mishandle NaN, producing incorrect correlation values. This guide covers correct per-feature pairwise computation, degenerate input filtering, and performance optimization. ## Key Concepts ### Pairwise vs Listwise Deletion - **Pairwise deletion**: For each feature pair, remove only samples where either value is NaN. Each feature uses the maximum available data. - **Listwise deletion**: Remove any sample with NaN in any feature. Wastes valid data and biases results if missingness is not completely random. - **Rule**: Always use pairwise deletion for per-feature correlations. ### Why Bulk Matrix Shortcuts Fail Different features have different missing value patterns across samples. Bulk methods handle this inconsistently: | Method | Problem | |--------|---------| | `DataFrame.rank()` then `corrwith()` | `rank()` assigns NaN ranks; `corrwith()` may drop globally or per-column inconsistently | | `DataFrame.corrwith(method='spearman')` | Implementation va

What's inside
Steps it walks through
  1. Overview
  2. Key Concepts
  3. Pairwise vs Listwise Deletion
  4. Why Bulk Matrix Shortcuts Fail
  5. Impact of Incorrect Computation
  6. Degenerate Inputs
  7. Decision Framework
  8. Best Practices
  9. Common Pitfalls
  10. Workflow
  11. Reference Implementation
  12. Anti-Patterns
  13. Performance Optimization (> 10,000 features)
  14. Further Reading
More from awesome-bio-agent-skills
All skills →
About this skill
What does the nan-safe-correlation skill do?

Per-feature NaN-safe Spearman/Pearson correlation across many features (genes, proteins, variants) with missing values. Covers why bulk matrix shortcuts fail, correct pairwise deletion, degenerate input filtering, and large-dataset performance. Use statistical-analysis for test choice; shap-model-explainability for interpretability.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill nan-safe-correlation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going