Question: How To Create Mutation Diagram In R Or In Any Tools?
gravatar for henryvuong
4.5 years ago by
henryvuong700 wrote:

Please let me know any tools or R packages that can create a mutation diagram showing mutations in protein domains like this figure from the MSKCC cBio Cancer Genomic Portal? Thanks in advance
enter image description here

domain R mutation • 16k views
ADD COMMENTlink modified 18 months ago by zlskidmore280 • written 4.5 years ago by henryvuong700

Search your favorite search engine for "lollipop plot" or build your own, as described in another answer.

ADD REPLYlink written 4.5 years ago by Alex Reynolds19k

Thank all for the answers. Based on your suggestion, I found the R package MethVisual for visualization and exploratory statistical analysis of DNA methylation profiles by Arie Zackay and Christine Steinhoff. It will give me some direction to build my own code.

ADD REPLYlink written 4.5 years ago by henryvuong700

Hi did you come up with something good? I looked at MethVisual, but it doesn't seem really straightforward to get to the cBio picture from there... Thanks if you can share some code!

ADD REPLYlink written 3.8 years ago by zoppoli70

Please PM me your email. 

ADD REPLYlink modified 3.3 years ago • written 3.3 years ago by henryvuong700

I have been confused by the method of plotting mutations. Could you share your code with me? Thank you very much!

ADD REPLYlink written 3.2 years ago by lipeiqiang780

I'm not aware of a specific package but I have made something very similar to this just using base graphics, i.e. rect, after moving the x-axis down with mgp, plot with type="h" for the vertical lines... it was quite straightforward.

ADD REPLYlink modified 4.5 years ago • written 4.5 years ago by Ben1.9k

Could you share the code to do the same .



ADD REPLYlink written 3.0 years ago by Saurabh Baheti0

Could you share the code to do the same

Thank U


ADD REPLYlink written 3.0 years ago by Daniel Kim0
gravatar for jeffk8900
2.9 years ago by
United States
jeffk8900110 wrote:

The cBIO portal team recently released a web based tool to generate lollipop diagrams.

ADD COMMENTlink written 2.9 years ago by jeffk8900110

The problem with mutation mapper is that the mutations are mapped to the longest transcript. Meaning that if you have a gene with multiple transcripts, the mapping to the domains of the shorter transcripts will be completely wrong!

ADD REPLYlink written 19 months ago by H.Hasani570
gravatar for qiuworld.ou
20 months ago by
United States
qiuworld.ou90 wrote:

Bioconductor package trackViewer gives beautiful lolliplot.

lolliplot trackViewer circle

ADD COMMENTlink modified 14 months ago • written 20 months ago by qiuworld.ou90
gravatar for jeremy
2.9 years ago by
United States
jeremy80 wrote:

Pfam provides an online tool to not only generate the domain information in JSON format, but to draw the lollipop diagram using javascript as well. They have more information here:

IMHO, not as pretty as cBioPortal's but it gets you close to a solution.

EDIT / SHAMELESS PLUG: After seeing the data available and how easy it'd be, I made my own quick tool to fetch the data and draw the diagram for me in a style similar to cBioPortal - feel free to fork it and add features:

Example output (w/ labels per the comments)

TP53 w/ 2 mutations

ADD COMMENTlink modified 2.8 years ago • written 2.9 years ago by jeremy80

This is pretty badass.  Thanks! 

The only thing I wish it had was an option to show the mutation syntax provided on top of the lollies (perhaps at a 45 degree angle).

ADD REPLYlink written 2.8 years ago by steven.n.hart0

Just pushed an update with the labels for ya - added an image to my answer above to show it off. 

ADD REPLYlink written 2.8 years ago by jeremy80

The tool is amazing. Thank you very much! Why the counts do not show up when I specifiy @2? it turns out the 45 degree angle only work for svg file but not for png, right?

ADD REPLYlink modified 15 months ago • written 15 months ago by xrao10
gravatar for Michi
2.6 years ago by
Michi870 wrote:


We found ourselves in the same need, we wanted such a plot (JavaScript). Thus, I add our solution, Mutations Needle Plot. The library creates an SVG image (with D3), which then may be downloaded.

You will npm in order to be able to install & run the library.

Examples may be found in the snippets folder or also the index.html - The one displayed here below

Mutation Needle Plot (muts-needle-pot)



ADD COMMENTlink modified 2.6 years ago • written 2.6 years ago by Michi870

@Michi: is there a way to use snpEff VCF as input to generate mutations needle plot 

ADD REPLYlink modified 23 months ago • written 23 months ago by Rm7.5k

Short answer, No. Long answer: Of course, but you would have to format the mutations a little bit :)

ADD REPLYlink written 22 months ago by Michi870
gravatar for Pierre Lindenbaum
2.9 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum96k wrote:

My colleague @SolenaLS recently asked me to write something like this: (uniprot+SVG+javascript : )

ADD COMMENTlink written 2.9 years ago by Pierre Lindenbaum96k
gravatar for zlskidmore
18 months ago by
United States, St. Louis, Washington University
zlskidmore280 wrote:

Theres a developmental version of this type of diagram using R here, the function is called lolliplot:

also in bioconductor devel branch. An example visual can be viewed from the vignette found here:
ADD COMMENTlink modified 17 months ago • written 18 months ago by zlskidmore280
gravatar for Ibrahim Tanyalcin
20 months ago by
Ibrahim Tanyalcin750 wrote:


Colleagues have listed rectangular representations. I have recently published a circular version of such plots. Here is the website:

And here is an example:

You can also search for I-PV for the posts in Biostar. 

I hope this helps,

ADD COMMENTlink written 20 months ago by Ibrahim Tanyalcin750
gravatar for Pappu
4.5 years ago by
Pappu1.7k wrote:

Ensemble also gives similar plot.

ADD COMMENTlink written 4.5 years ago by Pappu1.7k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 796 users visited in the last hour