stat-cluster-samples
Skill4 starsChanged 12 days agoMITView on GitHub
Cluster samples or features using k-means or hierarchical clustering, evaluate cluster quality with silhouette scores, and produce a dendrogram or cluster plot.
In this repository56 other files it gives its agents.
- bioinformatics-env-setupSkill
- design-thermostable-mutationsSkill
- download-gdcSkill
- download-geoSkill
- download-sraSkill
- source-summarizerSkill
- genome-alignment-qcSkill
- genome-read-alignmentSkill
- genome-variant-annotationSkill
- genome-variant-callingSkill
- genome-variant-filteringSkill
- metagenome-assemblySkill
- metagenome-binningSkill
- metagenome-functional-profilingSkill
- metagenome-host-removalSkill
- metagenome-taxonomic-profilingSkill
- ncbi-eutilities-assistantSkill
- ngs-quality-controlSkill
- ngs-read-preprocessingSkill
- paper-to-briefSkill
- predict-protein-heat-stabilitySkill
- researchSkill
- rnaseq-alignment-qcSkill
- rnaseq-differential-expressionSkill
- rnaseq-functional-enrichmentSkill
- rnaseq-read-alignmentSkill
- rnaseq-read-countingSkill
- rnaseq-transcript-quantificationSkill
- rpsblast-assistantSkill
- scrnaseq-cellranger-countSkill
- scrnaseq-cell-type-annotationSkill
- scrnaseq-clusteringSkill
- scrnaseq-differential-expressionSkill
- scrnaseq-integrationSkill
- scrnaseq-quality-controlSkill
- scrnaseq-trajectory-analysisSkill
- search-enaSkill
- search-geoSkill
- search-gsaSkill
- search-ncbi-datasetsSkill
- search-sraSkill
- stat-analyze-distributionSkill
- stat-assess-data-qualitySkill
- stat-bayesian-estimationSkill
- stat-compare-multiple-groupsSkill
- stat-compare-two-groupsSkill
- stat-fit-glmSkill
- stat-fit-linear-modelSkill
- stat-learn-bayesian-networkSkill
- stat-logistic-regressionSkill
- stat-nonlinear-embeddingSkill
- stat-pairwise-correlationSkill
- stat-pcaSkill
- stat-survival-analysisSkill
- structured-intelligence-skill-creatorSkill
- <skill-id>Skill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use cases: gene expression pattern discovery, cell type grouping, patient stratification
- Distinctive: line 31
Read data matrix; scale features if requested.
- Distinctive: line 42
Write cluster assignments (TSV), silhouette scores (TSV), heatmap or cluster plot (PDF) to output directory.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Sample Clustering
Use When
- User wants to discover groups of similar samples or features in high-dimensional data
- User wants to create a heatmap with hierarchical clustering of genes and samples
- User wants to determine the optimal number of clusters for k-means
- Use cases: gene expression pattern discovery, cell type grouping, patient stratification
Inputs
- Required:
- Data matrix (CSV or TSV): rows = samples (or features), columns = features (or samples)
- Optional:
- Matrix orientation:
samples_as_rows(default) orsamples_as_columns - Clustering method:
hierarchical(default) orkmeans - For hierarchical: linkage method (
warddefault,complete,average,single) - Distance metric:
euclidean(default),correlation, orcosine - For k-means: number of clusters k (default: auto-select using elbow method, k = 2–10)
- Scale features before clustering:
true(default) orfalse - Metadata table for heatmap annotation (optional)
- Output directory (default:
./cluster_output)
- Matrix orientation:
Workflow
- Read data matrix; scale features if requested.
- If hierarchical clustering: a. Compute distance matrix using specified metric. b. Perform hierarchical clustering on both rows (samples) and columns (features). c. Generate a clustered heatmap with dendrogram.
- If k-means: a. If k not specified: compute within-cluster sum of squares for k = 2–10; plot elbow curve; select k at elbow. b. Fit k-means with selected k; report cluster assignments. c. Generate PCA-based cluster scatter plot.
- Compute silhouette score for final cluster solution; report mean and per-sample scores.
- Assign and report cluster labels for each sample.
- Write cluster assignments (TSV), silhouette scores (TSV), heatmap or cluster plot (PDF) to output directory.
- Save the executable analysis script (
analysis_code.pyoranalysis_code.R) and software version manifest (session_info.txt) used to produce results.
Output Contract
- Cluster assignments table (TSV): sample_id, cluster_label
- Silhouette scores table (TSV): sample_id, silhouette_score, cluster_label
- Clustered heatmap (PDF, hierarchical) or cluster scatter plot (PDF, k-means)
- Elbow curve (PDF, k-means only when k is auto-selected)
- Mean silhouette score (printed to stdout)
- Reproducibility artifacts:
analysis_code.pyoranalysis_code.R, plussession_info.txt
Limits
- K-means assumes spherical, similarly sized clusters; performs poorly on elongated or irregular shapes.
- Hierarchical clustering with Ward linkage and Euclidean distance is sensitive to outliers; remove outliers before clustering.
- Very large matrices (> 10k samples or > 50k features) may be slow; consider subsampling or running PCA first.
- Common failure: data with many zero entries (e.g., single-cell) — apply dimensionality reduction first.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

