Question: How To Create Mutation Diagram In R Or In Any Tools?
gravatar for henryvuong
5.4 years ago by
henryvuong720 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 • 20k views
ADD COMMENTlink modified 2.4 years ago by zlskidmore280 • written 5.4 years ago by henryvuong720

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

ADD REPLYlink written 5.4 years ago by Alex Reynolds24k

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 5.4 years ago by henryvuong720

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 4.7 years ago by zoppoli70

Please PM me your email. 

ADD REPLYlink modified 4.2 years ago • written 4.2 years ago by henryvuong720

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

ADD REPLYlink written 4.1 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 5.4 years ago • written 5.4 years ago by Ben1.9k

Could you share the code to do the same .



ADD REPLYlink written 3.9 years ago by Saurabh Baheti0

Could you share the code to do the same

Thank U


ADD REPLYlink written 3.9 years ago by Daniel Kim0
gravatar for jeremy
3.8 years ago by
United States
jeremy100 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 3.7 years ago • written 3.8 years ago by jeremy100

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 3.7 years ago by steven.n.hart20

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

ADD REPLYlink written 3.7 years ago by jeremy100

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 2.2 years ago • written 2.2 years ago by xrao10
gravatar for jeffk8900
3.8 years ago by
United States
jeffk8900110 wrote:

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

ADD COMMENTlink written 3.8 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 2.5 years ago by H.Hasani590
gravatar for qiuworld.ou
2.6 years ago by
United States
qiuworld.ou90 wrote:

Bioconductor package trackViewer gives beautiful lolliplot.

lolliplot trackViewer circle

ADD COMMENTlink modified 2.1 years ago • written 2.6 years ago by qiuworld.ou90
gravatar for Michi
3.5 years ago by
Michi930 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 3.5 years ago • written 3.5 years ago by Michi930

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

ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by Rm7.7k

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

ADD REPLYlink written 2.8 years ago by Michi930
gravatar for Pierre Lindenbaum
3.8 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum108k wrote:

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

ADD COMMENTlink written 3.8 years ago by Pierre Lindenbaum108k
gravatar for zlskidmore
2.4 years 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 2.3 years ago • written 2.4 years ago by zlskidmore280

Hi, do you know how to change protein framework by yourself rather than the default version from ensembl? Because I think the default version is too complicated and not simple and direct enough.

ADD REPLYlink written 8 months ago by junkaiwang19950
gravatar for Ibrahim Tanyalcin
2.6 years ago by
Ibrahim Tanyalcin880 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 2.6 years ago by Ibrahim Tanyalcin880
gravatar for Pappu
5.4 years ago by
Pappu1.8k wrote:

Ensemble also gives similar plot.

ADD COMMENTlink written 5.4 years ago by Pappu1.8k
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: 1081 users visited in the last hour