Forum:Tips and tricks to improve data visualization in bioinformatics
3
5
Entering edit mode
2.8 years ago
Papyrus ★ 3.0k

Dear community,

across our everlasting journey in bioinformatics, data visualization can eat up a significant portion of our time and efforts (and is also a major source of procrastination opportunities). Over time, one can discover certain tools which turn out to be of great help in facilitating the preparation of figures (whose statistical and aesthetic quality is continually increasing in publications).

So, I wanted ask/start a discussion on examples of tools or organization techniques which you have incorporated into your routines and have helped you be much more productive in the generation of figures in our field. I’m talking more about unspecific tools rather than specific visualizations. For instance, here are 2 examples which have helped me a lot and I have since continually used in figure preparation, in the context of using R/ggplot2 to plot data:

  • Using tools to produce perfectly-aligned and same-size plots: even when using the same graphics device size, ggplots are often squeezed to different sizes because of the figure labels, etc. Plots can be aligned with e.g. the cowplot, gridExtra packages to avoid this problem (ref1).
  • Using tools to rasterize plots with lots of data elements: for example, plotting a scatter plot with thousands of points (and not wanting to do a smoothed/2D density plot) will generate PDF images which take a long time to renderize. Packages like ggrastr (ref2) can rasterize parts of plots while keeping others in vector format; or ComplexHeatmap for heatmaps specifically (ref3).
  • Using graphical tools for post-editing of vector figures: when there is no solution at the programming level, e.g. Inkscape.

which tools, organization tricks, educational resources, are you particularly fond of, or routinely use, to help you to produce publication-quality figures?

visualization ggplot2 plot • 2.2k views
ADD COMMENT
4
Entering edit mode
2.8 years ago

A few additional points on R.

  • I've taken a liking to patchwork as a newer alternative to cowplot.
  • plotgardener for publication quality gene tracks.
  • ggrepel to avoid text and labels from overlapping on plots.
  • ggplotify to convert most non-ggplot format plots to ggplot.
ADD COMMENT
2
Entering edit mode
2.8 years ago
Mensur Dlakic ★ 28k

I use custom python scripts (mostly matplotlib) for figures based on numerical data. PyMol for molecular graphics, but that's an old version back from the days when the program was free for academic research. UCSD Chimera is free and also works well for molecular graphics. CorelDraw and Adobe Illustrator for figure touch-ups, though neither is free. We have a subsidized version that students and faculty can get through the university for under $100, and I think they are certainly worth it. Inkscape works as well. I strongly recommend IrfanView for visualizations (not for editing) as it is free, ultrafast, and can open almost all types of images.

One thing many people don't understand, at least in my experience, is the value of saving everything in some kind of a vector format. It doesn't matter exactly whether it is .svg, .eps, .pdf or any other vector format. The point is that once a figure is vectorized, it can be manipulated easily to move the blocks around, change font sizes, types and locations. Not to mention that vector files scale natively to any resolution required for downstream applications.

ADD COMMENT
1
Entering edit mode

PyMol for molecular graphics, but that's an old version back from the days when the program was free for academic research.

Is this version here not free for academic use?

Adding to what Mensur Dlakic said, I'd also really recommend LibreOffice. Open source, free to use, and LibreOffice Impress and LibreOffice Draw are quite good for creating figures. I'd rather give a couple of bucks to the LibreOffice devs than to Microsoft or Apple or one of them profit chasing goons.

ADD REPLY
0
Entering edit mode

Is this version here not free for academic use?

That version is free, but it isn't recent and requires compilation. I think their most recent (and compiled) version is free for teachers and students, but not for research use. It is worth checking, as I am no authority on licensing issues.

ADD REPLY
0
Entering edit mode

You're correct. Seems like the open source version is quite gimped. I couldn't find anything about usage restrictions though. I'm guessing the open source version is fine if you don't care about the bells and whistles. I've never seen a watermark or anything of that sort on outputs from the open source version.

ADD REPLY
0
Entering edit mode

Dunois in the US most educational institutions (from elementary schools through Universities) have access to free or subsidized licenses for MSFT Office (and some other) software. AFAIK Apple's suite of productivity software is also free as a part of your icloud account.

ADD REPLY
1
Entering edit mode

I think that's true for much of the world.

That said, I just want to encourage folks to go open source, and also not support profit-seeking corporations blindly. Shouldn't take something and run with it just because it's free/subsidized. I think that's partly how we've slid into quite a few of our ongoing global catastrophes. And if there's a community of individuals out there that needs to walk the talk, it's the scientists and such learned folk. Can't go on Twitter and raise a storm about Apple treating laborers poorly (or bemoan outrageous APCs), and turn around to continue working on an Excel file. Let's all at least implement the small changes, encourage everyone else to follow suit, and endure the minor inconvenience(s) for a slightly better world.

ADD REPLY
1
Entering edit mode

I agree with your general sentiment. In fact, I spend about half an hour in one of my courses explaining why we will use only open source programs. That said, I do make an exception when an alternative is considerably better or saves time, and most people I know are in the same category. It is difficult, if not impossible, to be principled all the way and in all facets of life. Because if we were, we wouldn't have smartphones, or computers, or a bunch of other gadgets that are also made by profit-seeking corporations.

I vowed a long time ago never to buy an Apple product, and for the most part have been true to that. Still, after about 5 years of watching my family members enjoy their iPhones while I was fumbling around with inferior products, a practical side of me won over my principles. To those who are better than me and do not support imperialistic profiteers, I salute you!

ADD REPLY
0
Entering edit mode

Yes, I totally agree about the importance of using vector formats. Thanks for the IrfanView reference, I didn't know the tool!!

ADD REPLY
1
Entering edit mode
2.8 years ago

Adobe Illustrator, OmniGraffle, R

ADD COMMENT

Login before adding your answer.

Traffic: 1900 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6