Code Monkey home page Code Monkey logo

Comments (2)

david-barnett avatar david-barnett commented on June 14, 2024

Hi Brigitte,

Not currently possible unfortunately, but could be a nice feature for the future.
If you really need it, the code from inside ps_seriate can get you the seriation object which has the clustering dendrogram inside it. You could then plot this alongside the bar chart with ggdendro or dendextend http://andrie.github.io/ggdendro/

(but indeed this would be a bit of manual work)

Code below adapted from inside ps_seriate

method = "OLO_ward"
dist = "bray"
tax_transform = "identity"

# transform taxa for ordering 
ps_transformed <- ps_get(tax_transform(ps, trans = tax_transform))

# calculate distance between samples
distMat <- dist_get(dist_calc(data = ps_transformed, dist = dist))
ser <- seriation::seriate(x = distMat, method = method)

Out of interest, why do you want the clustering dendrogram?

from microviz.

BrigittevdG avatar BrigittevdG commented on June 14, 2024

Hi David,
Thanks for the suggestion! I want the clustering to see if there are some groups visible based on the microbiome composition. I am going to try to use your suggestion. Thanks!

from microviz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.