I tried to create a similar one using 'ggplot' and combine all of them into one plot, but it takes very long time. Is there an easier way to combine the oncoplot, different clinical information and side legends together?
Also, what is the best way to create the oncoplot clustered by groups and sort based one some value? Like the image below, it was build based on subtypes and sorted by mutations rate I guess. The link is below: https://www.researchgate.net/figure/The-mutational-landscape-of-33-cancer-genes-in-Chinese-breast-tumors-n305-Genomic_fig1_332730584
5 answers
If you are familiar with Python, you may want to check out the fuc package I wrote:
Application Programming Interface (API):
import matplotlib.pyplot as plt
>>> from fuc import common, pymaf
>>> common.load_dataset('tcga-laml')
>>> f = '~/fuc-data/tcga-laml/tcga_laml.maf.gz'
>>> mf = pymaf.MafFrame.from_file(f)
>>> mf.plot_oncoplot()
If you want to create a customized oncoplot like the one shown below, see this tutorial.
Finally, you can also use command line interface (CLI) as well:
$ fuc maf_oncoplt input.maf output.pdf
I would try the Oncoprint annotation using Complex heatmap here
https://jokergoo.github.io/ComplexHeatmap-reference/book/oncoprint.html
As mentioned by @Ahmed A complex heat map is very useful for customised oncoplot.
I used it for complex visualization,
https://www.medrxiv.org/content/10.1101/2022.01.10.22269035v2.full-text
In R, you can build this plot using ggoncoplot. Produces interactive or static versions.
Disclaimer: I built this package
Not shown in picture - but you can sort by any metadata field using the metadata_sort_cols argument.
Other options
- Maftools: great for static plots if your data is in MAF format.
- ComplexHeatmap (oncoPrint): Great tool esp. if you're already comfortable with this package or need very custom plots. Has a very different input requirement to the others. If you have long, tidy data (which is how gene mutation data is often stored in MAFs/databases/etc) - you'll need to do some data wrangling.
- GenVisR has a waterfall plot, similar to ggoncoplot in terms of input format requirements so easy to try both.
If you're comfortable using a web tool for your data - cBioportal oncoprinter is amazing.
Log in to answer this question.
might be GenVisR, not sure if that is a perfect match but it looks fairly similar How to create a mutation landscape (waterfall) plot with GenVisR