gnomeR
gnomeR copied to clipboard
Create a vignette for copy number data
From Caroline:
I’ve been considering working on these sorts of functions/smoothing out this pipeline for my own personal use. Happy to share when complete if they belong in gnomeR or I’m happy to put them in a separate package since it’s a little different from the scope of gnomeR.
Generally, the steps to producing a good CN heatmap to look at the CN alterations across all samples/all chromosomes would be something like this:
-
Get the segmentation data (in long format)
-
Use the iClusterPlus::CNregions() function to convert this into wide format and to make a matrix where all segment breakpoints are considered. Note that this function can break if not all samples have segments on every chromosome. I’ve written some code to check for this/remove the problematic samples, and I’m very slowly in the process of turning it into a real function for others to use.
-
Plot the heatmap – I’ve done this several ways. This heatmap can go either direction, but recently I’ve had the samples as columns and the segments as rows
It’s important to know what type of data you’re downloading – I know the CN data cbioportalR pulls at this point is in the 2 = amplified, -2 = homdel, 0 = no change, etc. format which is not conducive to making a heatmap, for example.
Another important distinction is if it’s adjusted for ploidy, for example. That’s because it was adjusted for purity and ploidy, which is the gold standard. Not all segmentation files will have this.
Sometimes, it’s helpful to make a binary matrix of alteration status, when interested in specific alterations, for example, only homozygous deletions or only high-level amplifications.