OSCA-source / OSCA.multisample

The multi-sample subbook of OSCA
5 stars 7 forks source link

Recent change to igraph::cluster_louvain() also breaks section "9.5 Combined analyses" #8

Closed hpages closed 2 years ago

hpages commented 2 years ago

@LTLA @vjcitn

After fixing issue #6, R CMD build OSCA.multisample still fails but this happens later, in the "9.5 Combined analyses" section of the OSCA.multisample book. So there's some progress :sweat_smile:

See: https://bioconductor.org/checkResults/3.14/books-LATEST/OSCA.multisample/nebbiolo2-buildsrc.html https://bioconductor.org/checkResults/3.15/books-LATEST/OSCA.multisample/nebbiolo1-buildsrc.html https://bioconductor.org/checkResults/3.16/books-LATEST/OSCA.multisample/nebbiolo2-buildsrc.html

The error is also due to this recent change in the igraph::cluster_louvain() function. The function is used internally by the call to clusterRows(reducedDim(merged), NNGraphParam(cluster.fun="louvain")). Because of the change in igraph::cluster_louvain(), the labels returned by this call are now permuted, and so are the labels of the clusters in Figure 9.2. Ultimately, this causes the following sanity checks to fail:

stopifnot(igraph::are_adjacent(pseudo.out$mst, "8", "9"))
stopifnot(igraph::are_adjacent(pseudo.out$mst, "7", "3"))
stopifnot(igraph::are_adjacent(pseudo.out$mst, "3", "8"))
stopifnot(!igraph::are_adjacent(pseudo.out$mst, "9", "7"))

I'll adjust the sanity checks accordingly. I don't see that those labels are explicitly used in the narration so no need to touch that part.

H.

hpages commented 2 years ago

Yup. The new version of igraph::cluster_louvain() not only permutes the labels of the 11 clusters seen on the UMAP plots of Figures 9.2 & 9.3 but it also affects the content of each cluster as well as the topology of the clustering itself. You'll be able to compare the old plots with the new plots when the link to the new plots finally becomes live (hopefully soon).

I adjusted the sanity checks so that they reflect the new topology and labels. This is in OSCA.multisample 1.5.2.