meyer-lab / systemsSerology

Dissecting systems serology with a tensor factorization
https://asmlab.org
3 stars 2 forks source link

Figure 3 subjects plot #112

Closed aarmey closed 3 years ago

aarmey commented 3 years ago

It should be possible to see, from this plot, which rows are each class (EC, VC, etc). Additionally, the ordering of the rows is arbitrary, so it'd be an improvement to cluster patients based on similar factor values. Something like this might be useful to look at:

jupyter_widget_nbviewer

See how category is shown by color, so you can see where it starts and ends.

scottdtaylor95 commented 3 years ago

I've looked at this a bit - to get it to look like this (aka the easier method), each heatmap would need to be a separate figure due to how clustermap works. However I can play around with gridspec and make one figure, although without clustering, although it's a bit more work. Which would you prefer? If the latter is okay, would you prefer a colorbar legend for the different categories, or just labels on the axis, since all of our categories are grouped?

aarmey commented 3 years ago

I think just cleaning up the axis is fine, rather than using cluster map. It still could be useful to group similar items next to each other, so that it's easier to interpret the components. You can access the ordering of cluster map (even without plotting it) this way: https://github.com/mwaskom/seaborn/issues/1207

scottdtaylor95 commented 3 years ago

What do you mean by cleaning up the axis? Trying to add the colored bars like the above figure?

aarmey commented 3 years ago

Yes, exactly.

scottdtaylor95 commented 3 years ago

Okay, the only way I could find to do that without clustermap is to create a second heatmap plot for the colored bar and move it right next to the actual plot. It's a little weird but looks okay I think.

aarmey commented 3 years ago

The people working with the LINCS data figured out how to do this. Check with them first.

scottdtaylor95 commented 3 years ago

I believe they switched the plot type to a clustermap, but I can double check.

scottdtaylor95 commented 3 years ago

Yeah, it looks like the changed figure 2 from a heatmap to a clustermap to add the feature, unless I'm looking at the wrong thing. Unless you'd like me to swap to that, I can go ahead with the other strategy.

aarmey commented 3 years ago

Ok, sounds good.

scottdtaylor95 commented 3 years ago

Which of the subplots would you like to have the added legend? Just the subject plot?

aarmey commented 3 years ago

What do you mean by legend?

scottdtaylor95 commented 3 years ago

Sorry the category color bar, not sure what to call it.

aarmey commented 3 years ago

I think the other plots could be improved, but yes, lets just change the patient one for now.