agentsclimarketplace

Hierarchical dendrogram interpretation

Skill HolobiomicsLab/asb-skill-collections/collections/epigenomics/v1/skills/hierarchical-dendrogram-interpretation

Use when you have a methylBase object containing aligned methylation calls across multiple samples and need to verify whether samples cluster by expected experimental condition (e.g., test vs. control) or identify unexpected sample relationships.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill hierarchical-dendrogram-interpretation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.3 KB, 985 tokens by cl100k_base, as published. Nobody here has run it

hierarchical-dendrogram-interpretation

Summary

Interpret hierarchical clustering dendrograms from methylation profiles to assess sample relatedness and grouping patterns. This skill applies distance-based clustering to reveal whether samples cluster by expected biological groups (e.g., treatment vs. control) and infers methylation-based similarity relationships.

When to use

You have a methylBase object containing aligned methylation calls across multiple samples and need to verify whether samples cluster by expected experimental condition (e.g., test vs. control) or identify unexpected sample relationships. Use this skill when sample relationships and data quality must be confirmed before downstream differential methylation analysis.

When NOT to use

  • Input is a single sample or fewer than two samples—dendrograms require at least two samples to show relationships.
  • Samples have been pre-filtered to remove low-coverage bases and you need quantitative differential methylation statistics rather than exploratory sample clustering.
  • You have already identified batch effects and corrected them; re-clustering may not reflect the corrected structure without re-running clusterSamples().

Inputs

  • methylBase object (output of unite() function containing merged methylation calls for all samples at positions covered in all samples)

Outputs

  • Dendrogram object showing hierarchical relationships among samples
  • Visual dendrogram plot with branch structure and sample labels

How to apply

Load a methylBase object from unite() containing base-pair coverage and methylation percentages across samples. Apply clusterSamples() to perform hierarchical clustering using correlation distance with Ward linkage, which produces a dendrogram showing pairwise sample relationships. Interpret the dendrogram by examining branch heights (reflecting correlation distance) and cluster membership—samples that cluster together have similar methylation profiles. Validate the dendrogram structure against expected biological groupings (e.g., test1 and test2 grouping separately from ctrl1 and ctrl2). Inspect outliers or unexpected groupings as indicators of batch effects, sample swaps, or biological heterogeneity that may require sample-level filtering via filterByCoverage() before proceeding to differential methylation testing.

Related tools

  • methylKit (Provides clusterSamples() function to perform hierarchical clustering on methylBase objects and generate dendrograms using correlation distance and Ward linkage) — https://github.com/al2na/methylKit
  • R (Execution environment for methylKit functions and dendrogram visualization)

Examples

clusterSamples(methylBase_object)

Evaluation signals

  • Dendrogram branch structure matches expected biological groupings (e.g., test samples cluster together, control samples cluster together, or known biological replicates are proximal in the tree).
  • Branch heights (correlation distances) are consistent with sample similarity expectations—greater distances between treatment and control groups suggest robust methylation differences.
  • No unexpected outliers or sample swaps are visible; all samples from the same experimental condition are more similar to each other than to samples from different conditions.
  • Comparison with PCASamples() scatter plot (PC1 vs PC2) shows consistent clustering patterns—samples that cluster in the dendrogram should occupy similar regions in PC space.

Limitations

  • Dendrogram clustering depends on correlation distance computed from methylation percentages; samples with low coverage or high noise may produce misleading cluster patterns. Pre-filter using filterByCoverage() (default 10X minimum, removing >99.9th percentile) before clustering.
  • Ward linkage emphasizes variance within clusters and may suppress detection of small, biologically important sample subgroups if their methylation profiles are globally similar.
  • Dendrograms reflect only pairwise correlation structure; they do not quantify statistical significance of differences or distinguish samples with gradual methylation drift from those in discrete biological states.
  • CpG methylation context only: methylKit's default clustering analyzes CpG dinucleotides; non-CpG methylation in embryonic stem cells and other tissues requires separate preprocessing and may not be captured in standard CpG-focused methylBase objects.

Evidence

  • [intro] clusterSamples() produces a dendrogram showing sample clustering by correlation distance with Ward linkage: "clusterSamples() produces a dendrogram showing sample clustering by correlation distance with Ward linkage"
  • [intro] By default methRead requires a minimum coverage of 10 reads per base to ensure good quality of the data: "By default methRead requires a minimum coverage of 10 reads per base to ensure good quality of the data and a high confidence methylation percentage"
  • [intro] Merge samples across all bases using unite() function to create methylBase objects for comparative analysis: "In order to do further analysis, we will need to get the bases covered in all samples. The following function will merge all samples to one object for base-pair locations that are covered in all"
  • [readme] Sample correlation and clustering is a current feature for assessing sample relationships: "Sample correlation and clustering"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.