IniziaInizia gratis

Clustering samples

Another way to look at similarities between samples is through hierarchical clustering. This process involves two stages. First, you'll have to calculate the distance between samples based on the (normalized coverage) of peaks using the dist() function. Then you can use these pairwise distances to group similar samples together using hclust(). This will produce a dendrogram that captures the hierarchical relationship between samples. A matrix with suitably normalized coverage data is available as R object cover.

Questo esercizio fa parte del corso

ChIP-seq with Bioconductor in R

Visualizza il corso

Istruzioni dell'esercizio

  • Compute the pairwise distances between samples using dist().
  • Use hclust() to create a dendrogram from the distance matrix.
  • Plot the dendrogram.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Compute the pairwise distances between samples using `dist`
cover_dist <- ___(t(cover))

# Use `hclust()` to create a dendrogram from the distance matrix
cover_dendro <- ___(cover_dist)

# Plot the dendrogram
plot(___)
Modifica ed esegui il codice