microbiome / miaViz

Microbiome Analysis Plotting and Visualization
https://microbiome.github.io/miaViz
Artistic License 2.0
10 stars 12 forks source link

neatsort & neatmap #40

Closed antagomir closed 2 years ago

antagomir commented 2 years ago

Convert neatsort.R and neat.R from phyloseq/microbiome to miaverse.

These are related to visualization, miaViz is a good starting point. We can consider afterwards if they fit better mia or another package. Or if we keep it in miaViz.

The idea is explained in Rajaram & Oono (2010) and I have found these quite handy in pratice. The sorted matrices can then be visualized with ordinary heatmap techniques (with no additional row/col sorting!), and an example on this should be added as well.

Add citation to the original work, and check if there are recent works that have applied or customized this for microbiome data.

Perhaps good to cross check first that there are no SE wrappers for this available already.

FelixErnst commented 2 years ago

This package it is based on is not on CRAN anymore. I am not sure, this is worth the effort.

In addition, the reference implementations you linked to are just about the sorting and not the plotting, isn't it? With this is mind, ti would require additions to mia and miaViz in a concerted effort. Both patches would need to have the same quality to be added at the same time.

antagomir commented 2 years ago

This is useful as a visualization tool. A basic implementation is straightforward: pick a common ordination method (multiple options can be readily provided; PCA, PCoA, UMAP etc) and reduce data to a single dimension. Then order the samples based on their location on this 1D continuum. If the neatmap pkg is not in CRAN anymore, this can be easily re-implemented. It would be handy to have a dedicated method for this.

The priority may be lower than for some other open issues, though.

Re: visualization / miaViz: I think the existing heatmap visualization techniques are sufficient and there is not necessarily a need for a new visualization method. An example showing how neatsort can be linked to heatmap plotting would be good to add.

antagomir commented 2 years ago

Row/col sorting based on angle on MDS projection in fact seems to be already implemented in SEtools R package, which is even good fit with the SE class.

The vignette says "By default, rows are sorted not with hierarchical clustering, but from the angle on a MDS plot, which tends to give nicer results than bottom-up hierarchical clustering."

To check how to use this. Probably this removes the need to implement our own functions for this.

FelixErnst commented 2 years ago

Whats the status on this? Can this be closed?

antagomir commented 2 years ago

The necessary methods are now available via SEtools, I have opened a new OMA issue to add an example there.