Question: How To Plot Clustered Mutation Profiles Using Tcga Mutation Data
6
6.7 years ago by
J.F.Jiang800
China
J.F.Jiang800 wrote:

Hi all,

TCGA has offered us a great resource to analyze the genomic features of different cancers. The somatic mutations in their reported papers were of great interest.

And I am attracted by those fancy figures in the papers, I want to know how can I plot this kind of figure using TCGA mutation profiles. It seems like a cluster method to make the samples with same mutation gene located in same block to significantly display the whole profile of mutation pattern.

Example figure:

tcga mutation • 15k views
modified 4.1 years ago by zlskidmore290 • written 6.7 years ago by J.F.Jiang800
5
6.7 years ago by
Chris Miller21k
Washington University in St. Louis, MO
Chris Miller21k wrote:

It's not fancy clustering, just sorting.

To get that effect:

1) create a matrix with samples as rows and genes as columns.

2) Fill in each position with either 1 or 0 for presence or absence of a mutation.

3) Order the genes columns by their frequency (most frequent = first)

4) sort by each column consecutively. (For columns 1-N: sort -k 1,1r -k 2,2r ... -k N,Nr)

Import the data into your favorite plotting tool (like R) and you've got something like that.

Thanks, more helpful to use in batch plot in R

I had a same question same to J.F.Jiang.

However, I have some confusions regarding the example figure showed above.

1) create a matrix with samples as rows and genes as columns.

Which software was used to create the matrix you mentioned ? Excel or other?

2) Fill in each position with either 1 or 0 for presence or absence of a mutation.

3) Order the genes columns by their frequency (most frequent = first)

4) sort by each column consecutively. (For columns 1-N: sort -k 1,1r -k 2,2r ... -k N,Nr)

I am sorry I don't know what the mean by "For columns 1-N: sort -k 1,1r -k 2,2r ... -k N,Nr". And how to  do this?

Thanks.

I understand how to make a heatmap from a pre-sorted matrix (using R, etc.), but I am not sure how make a high-resolution figure like the one shown above.  Any recommendations?  In other words, are there any recommendations for a "favorite plotting tool"?

1

Try to install the ghostscript, which could be embeded in R to generate high res. figure. You can choose any format, such as eps or tiff.

And even you did not install such tool, you can still output of high quality tiff by adjusting the parameters of R.

4
4.1 years ago by
zlskidmore290
United States, St. Louis, Washington University
zlskidmore290 wrote:

There have been a few new resources developed to create these plots recently. MAGI is a web resource built on D3, the plot on there is called aberration and will produce something very similar, here's a link: http://magi.brown.edu/

The bioconductor package GenVisR can also produce these using ggplot2, the devel repo is here: https://github.com/griffithlab/GenVisR

Example output from the vignette:

Hi Zachary, I am using this package for waterfall plots. Can we add deletion status to the output along with mutation status? Do we have to specify the order for that separately?

Thanks Ron

1

Hi Ron,

If you set the fileType param to "custom" you can add additional mutation status's via the "variant_class_order" param. Currently the function can only plot a single mutation type in a given cell and uses a hierarchy to choose, however you can choose the order of preference via the param mentioned above "variant_class_order", So you could give preference to "deletions".

See section 1.1.1 of the waterfall vignette linked below for more details: https://bioconductor.org/packages/release/bioc/vignettes/GenVisR/inst/doc/waterfall_introduction.html

Hi Zachary,

Could you please check this error. C: How to create a mutation landscape (waterfall) plot with GenVisR

Thank you

2
6.7 years ago by
Washington University School of Medicine, St. Louis, USA
Malachi Griffith18k wrote:

The MSKCC cBioPortal for Cancer Genomics will help you do some of this.

Try going to that URL, selecting the cancer type of interest from the drop down list and enter your genes of interest in the box and start the search. You will be presented with various tabs, summarizing different types of mutations in the selected genes for the selected cancer type(s). One of the plots is an 'OncoPrint' very similar in idea to the one in the figure you provided.

You can export these plots as an SVG and then modify them for your own publication purposes.