|
Hey folks, This week I want to share with you a figure that resembles many a type of figure that I see in a lot of genomics papers. I’d consider it a data visualization meme - kind of like how you’re “required” to have a stacked bar plot if you’re doing microbiome research or a dynamite plot if you’re publishing in Nature :) This figure was included in the paper, “Impact of intensive control on malaria population genomics under elimination settings in Southeast Asia” that was published earlier this week in Nature Microbiology. I’ve been wanting to look at this type of figure for a while, but haven’t because rarely do the authors make the underlying data available. This group of authors did, so we’ll be able to recreate it in a livestream next Wednesday. Yippee! I often feel bad that I only seem to put people’s figures under a microscope if they Do The Right Thing and make their papers open and data accessible. The basic structure of these figure is a tree (i.e., a dendrogram) linked to one or more heat maps. In the figure above, you can see there’s a dendrogram on the left and the structure of the tree roughly matches the red blocks along the diagonal of the matrix to its right. Red indicates the malaria parasite genomes are more similar and yellow that they are quite different. There are nearly 3 million data points in that heat map. On top of the large heat map are three strips indicating whether the genome was sampled from a location before or after using “mass drug administration” (MDA) or not using it at all; the year; and the genotype of the kelch13 gene, which can confer resistance to artemisinin. Those three strips are actually heat maps - they only have one value on the y-axis and 1700 on the x-axis. Often I see the three horizontal bands as vertical columns. But this is a similar idea. How would we build this? I see this as 5 figures - the dendrogram, the large red/yellow heat map, and the three horizontal bands. Similar to last week, we compose this figure using the Let’s start with the dendrogram. Using the relatedness matrix, we can generate the data for a dendrogram using the base R Next, let’s consider the large heat map. Heat maps can be created using the Similar to the large heat map, we can use One thing I notice about the legends in this panel is that they’re organized in a somewhat haphazard manner. The gradient legend is not vertically aligned with the legends for the three bands. To me, this looks weird. Using On Monday, I’ll present a critique of this figure. Something I already foresee doing is moving those horizontal bands to be vertical and on the right side. What else would you do to improve the appearance of this figure?
|
Hey folks, I appreciated the emails I received from people after last week’s newsletter. I hope that even if people didn’t agree with what I had to say, it was thought-provoking. Regardless of how a plot is made - R, Prism, Excel (gasp!), or AI (oh my!) - we need to train our eyes and sense of taste to make the most compelling visualization of our data. If you’re interested in working with me on an individual or group level to achieve this goal, let me know. I am offering consultation...
Hey folks, If you’ve watched any of my livestreams when someone asks why I don’t get ChatGPT or something to do a task for me, you probably saw a pained expression come across my face. Part of me dies every time someone tells me that they used some LLM chatbot to solve a problem. I have many reasons for despising the fascination with AI-based tools. I even wrote a commentary that I submitted to mBio in the fall of 2024. Yes, I wrote it. By hand. Then I typed it. No really, I typed it on a...
Hey folks, It has been great to see the high level of engagement with my weekly critique videos on YouTube. I have really enjoyed making them and have learned a lot about current practices in data visualization. The one problem with these videos is that they’re a bit like an autopsy. We can figure out what went well or what didn’t work in a published figure. But we can’t do much to improve the published figure. What if we could do critiques before submitting our papers, preparing a...