Giter Site home page Giter Site logo

Heatmaps? about seaborn HOT 11 CLOSED

mwaskom avatar mwaskom commented on May 18, 2024
Heatmaps?

from seaborn.

Comments (11)

mwaskom avatar mwaskom commented on May 18, 2024

Hey, this looks really cool! I'm not going to get a chance to give it a closer look until tonight (busy day of actual obligations... :/), but definitely seems like something that would be great to have. More soon.

from seaborn.

mwaskom avatar mwaskom commented on May 18, 2024

OK sorry for the delay. This looks like a cool function, and I agree it sounds like it would fit in nicely to seaborn. But I have to admit...I'm not sure I understand what it's showing? It's not a visualization I've run into before in my field. But those are exactly the kind of contributions I'd welcome!

I don't think heatmap is the best name for this kind of plot, though? It looks like it's doing something much more complicated than just mapping values to colors in a matrix -- originally when I aw the title of this PR I expected it to be something different. I gather that's the name of the function in R, although I'm not sure "follow what R does" is the best policy in general for naming things :)

from seaborn.

mwaskom avatar mwaskom commented on May 18, 2024

PS, Re nogrid spines: is there a way to set that by default? I couldn't find anything about it in the rcParams. Or do you mean just call despine() within all of the plotting functions?

from seaborn.

olgabot avatar olgabot commented on May 18, 2024

This heatmap is also called a clustergram or clustered heatmap. The way I use them is to look at gene expression or splicing across many genes (30-50k) and samples (100-200)

Currently, there's no way to control spines with rcParams so it would have to be calling despine after all the plotting functions. That is, until I figure out how to add an rcparam :)

from seaborn.

mwaskom avatar mwaskom commented on May 18, 2024

Ah I figured it was some kind of gene thing. What are the dendrogams showing? I guess I could just look at the code :)

I think an upstream PR for "Allow axis spines to be configurable" in matplotlib would curry lots of support.

from seaborn.

mwaskom avatar mwaskom commented on May 18, 2024

In terms of names, for seaborn I'd like to to have every function that draws something be called <something>plot (note issue #34 keeping track of the fact that I am going to rename violin for consistency). clustergramplot seems too wordy though. Hmm.

from seaborn.

olgabot avatar olgabot commented on May 18, 2024

clusterplot maybe?

from seaborn.

olgabot avatar olgabot commented on May 18, 2024

The dendrograms are showing the (pairwise) hierarchical clustering of associations between genes, which is really useful for finding sub-modules of expression of certain genes. I look at these things all day :)

A major TODO for this is to implement optimal leaf ordering which correctly orders the dendrogram leaf nodes after clustering. I wouldn't consider this finished until this is done.

from seaborn.

mwaskom avatar mwaskom commented on May 18, 2024

Hm very cool. I wonder if this kind of thing would be useful for fMRI data.

In terms of the algorithm to support it, is that something you'd imagine being wrapped in with the plotting interface? Or is it otherwise useful? When seaborn was just a personal project the way I had kept things organized was

  • high level plot interface in seaborn
  • lower level algorithm implementation in moss (things like the bootstrapping, correlation permutation, etc.)

(these are actually part of a broader ecosystem of packages I use for my research)

I'm starting to think this makes less sense, though, because it's annoying to have a separate package with core functions that seaborn depends on, especially if people are going to be contributing things that rely on algorithms I don't fully understand. So maybe going forward something like seaborn.algorithms would be better. Then again, I use. e.g., bootstrapping often outside the context of plotting, and it would be strange to be importing them from a plotting library.

Of course if you had plans to submit the algorithm to, e.g., scipy, this discussion could be punted for a while.

from seaborn.

lbeltrame avatar lbeltrame commented on May 18, 2024

Chiming in (I'm a pandas user with a few contributions and a day-to-day bioinformatician). I would decouple the algorithm from plotting, because you can visualize heatmaps using dendrograms generated from different algorithms (e.g. you may want to use "plain" algorithms, do some bootstrap resampling....).

@olgabot Somehow that publication slipped under my radar. Would be very nice to have in, indeed.

from seaborn.

mwaskom avatar mwaskom commented on May 18, 2024

I'm going to close this as we have a WIP PR open on heatmaps (#73)

from seaborn.

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.