Knn Imputation

Use when filtering genes with high missingness and then imputing missing values in a bulk expression matrix with group-aware KNN through DMwR2, where donor samples are restricted by one annotation column before imputation. For strata with 10 or fewer samples, the script falls back to row-wise direct filling with mean or median. NOT for: single-cell data, multi-column stratification, non-tabular inputs, network access, or interactive workflows.

2,068 stars 206 forksData & Analytics

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add aipoch/medical-research-skills --skill knn-imputation
Manual install
git clone --depth 1 https://github.com/aipoch/medical-research-skills.git /tmp/medical-research-skills
mkdir -p ~/.claude/skills
cp -r /tmp/medical-research-skills/awesome-med-research-skills/Data Analysis/knn-imputation ~/.claude/skills/knn-imputation

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# KNN Imputation

## When to Use

Use this skill when you need to remove genes with more than 50% missing values from a bulk expression matrix and then run group-aware KNN imputation, with the donor pool restricted by one grouping column.

Do not use this skill for:
- single-cell data
- multi-column stratification
- non-tabular inputs
- network-dependent workflows
- interactive analysis sessions

## When to Read External Files

| Situation | File to Read | Purpose |
|-----------|--------------|---------|
| **Need algorithm details** | `references/algorithm.md` | Group-stratified KNN method, fallback rules, and assumptions |
| **Need to run analysis** | `scripts/main.R` | Execute: `Rscript scripts/main.R --input_file ... --group_file ...` |
| **Encounter errors** | `references/troubleshooting.md` | Common errors and solutions |
| **Need CLI examples** | `references/cli-guide.md` | Detailed CLI usage examples |
| **Need sample input fixtures** | `tests/data/` | Repository fixtures for local validation and examples |

## Input Validation

This skill accepts: a bulk expression matrix CSV (features × samples) and a sample annotation CSV file with a single grouping column for KNN stratification.

If the user's request does not involve imputing missing values in a bulk expression matrix — for example, asking to impute single-cell data, use multi-column stratification, or run network-dependent workflows — do not proceed with the workflow. Instead respond:
Read the full skill on GitHub

Details

Skill name
knn-imputation
Path
awesome-med-research-skills/Data Analysis/knn-imputation/SKILL.md
License
MIT
Repo updated
17 September 2026

FAQ

What does the Knn Imputation skill do?

Use when filtering genes with high missingness and then imputing missing values in a bulk expression matrix with group-aware KNN through DMwR2, where donor samples are restricted by one annotation column before imputation. For strata with 10 or fewer samples, the script falls back to row-wise direct filling with mean or median. NOT for: single-cell data, multi-column stratification, non-tabular inputs, network access, or interactive workflows.

How do I install the Knn Imputation skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add aipoch/medical-research-skills --skill knn-imputation. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Knn Imputation popular?

It lives in aipoch/medical-research-skills, which has 2,068 GitHub stars and 206 forks.

Related skills

Clinicaltrials Database

2.1k

aipoch/medical-research-skills

Query ClinicalTrials.gov via API v2. Search trials by condition, drug, location, status, or phase. Retrieve trial details by NCT ID, export data, for clinical research and patient matching.

Research & Science206

Abstract Summarizer

2.1k

aipoch/medical-research-skills

Transform lengthy academic papers into concise, structured 250-word abstracts.

Research & Science206

Abstract Trimmer

2.1k

aipoch/medical-research-skills

Precision editing tool that reduces abstract word count through intelligent compression techniques, maintaining scientific rigor while meeting strict journal and conference requirements.

Research & Science206

Lab Budget Forecaster

2.1k

aipoch/medical-research-skills

Use lab budget forecaster for data analysis workflows that need structured execution, explicit assumptions, and clear output boundaries.

Data & Analytics206

Km Survival Curve

2.1k

aipoch/medical-research-skills

Use when generating Kaplan-Meier survival curves from tabular survival data containing time, event status, and a precomputed risk group. Supports command-line parameter input, parameter validation, automatic time-unit handling, single-file PDF figure export, and session metadata capture.

Data & Analytics206

Lamindb

2.1k

aipoch/medical-research-skills

This skill is applicable when using LaminDB. LaminDB is an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR-compliant. It is suitable for managing biological datasets (scRNA-seq, spatial transcriptomics, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological ontologies, building data lakes, or ensuring data lineage and reproducibility in biological research. It covers data management, annotation, ontologies (genes, cell types, diseases, tissues), schema validation, integration with workflow manage

Data & Analytics206

Browse the most popular Claude skills, all data & analytics skills, or write your own with the skills generator.