pneuvial / adjclust

Adjacency-constrained hierarchical clustering of a similarity matrix
https://pneuvial.github.io/adjclust/
16 stars 8 forks source link

plot function #5

Closed pneuvial closed 7 years ago

pneuvial commented 7 years ago

Currently the output of adjClust can only be plotted as a dendrogram, using the fact that this output is of class hclust. We should add a function that plots the similarity matrix as a triangular heatmap (+ the dendrogram if desired).

Such plot functions already exist for specific applications, see:

Can we have something generic?

pneuvial commented 7 years ago

NB: triangular dendrogram with:

data("ld.example", package="snpStats")
geno <- ceph.1mb[, -316]  ## drop one SNP leading to one missing LD value
p <- ncol(geno)
ld.ceph <- ld(geno, stats="R.squared", depth=p-1)
fit <- snpClust(geno, h=p-1, stats="R.squared")
plot(as.dendrogram(fit), type="triangle")
tuxette commented 7 years ago

Closed issue: plot.chac has been implemented in the current (S3) version.