Gallery: ICGC-TCGA DREAM Somatic Mutation Calling Challenge

True positives, green, and false positives, purple, called by the top six algorithms submitted to the ICGC-TCGA DREAM Somatic Mutation Calling Challenge were plotted by their genomic position and their proximity to the nearest 5' SNV. Alternating gray bands indicate chromosomes cut-offs.

### PREAMBLE #################################################################################################
library(BoutrosLab.plotting.general)
 
# read in data
plot.data <- read.table('waterfall_plot_data.txt')
chrom.start <- read.table('chrom_start_data.txt')
 
# ensure chrosomes are ordered from 1 to Y 
plot.data$CHROM <- factor(plot.data$CHROM, 
                          levels = c(1:22,
                                     'X',
                                     'Y'), 
                          ordered = TRUE
                          );
plot.data <- plot.data[order(plot.data$CHROM),];
 
# ensure that plots are plotted from best to worst algorithm
plot.data$submission <- factor(plot.data$submission, 
                               levels = c('4th Place',
                                          '5th Place',
                                          '6th Place',
                                          'Winning Submission', 
                                          '2nd Place',
                                          '3rd Place'), 
                               ordered = TRUE
                               );
 
 
### PLOTTING ############################################################################################
create.scatterplot(
  formula = log10(distance) ~ genomePos | submission,
  data = plot.data,
  filename = "waterfallKataegis.tiff",
  groups = plot.data$TP.FP,
  xlab.label = "Position in Genome (in Mbp)",
  xlab.cex = 1,
  xaxis.tck = 0,
  xlimits = c(0, 3095677412),
  xat = c(1000000000, 2000000000, 3000000000),
  xaxis.lab = c(1000,2000,3000),
  xaxis.cex = 0.8,
  ylab.label = expression(bold("Distance to 5' SNV")),
  ylab.cex = 1,
  yaxis.cex = 0.8,
  ylimits = c(0,8),
  yat = seq(0,8,2),
  yaxis.lab = c(
    expression(bold('0')),
    expression(bold(paste('10'^'2'))), 
    expression(bold(paste('10'^'4'))), 
    expression(bold(paste('10'^'6'))), 
    expression(bold(paste('10'^'8')))
  ),
  strip.cex = 1,
  col = c('chartreuse4','darkorchid4'),
  alpha = c(0.5,1),
  pch = 21,
  add.rectangle = TRUE,
  xleft.rectangle = unlist(chrom.start)[seq(2,24,2)],
  xright.rectangle = c(unlist(chrom.start)[seq(3,24,2)],3095677412),
  ytop.rectangle = 8,
  ybottom.rectangle = 0,
  col.rectangle = 'grey80',
  cex = 0.3,
  layout = c(3,2),
  axis.key.padding = -1,
  legend = list(
    inside = list(
      fun = draw.key,
      args = list(
        key = list(
          points = list(
            pch = 21,
            col = c('chartreuse4','darkorchid4'),
            fill = c('chartreuse4','darkorchid4'),
            cex = 1.2,
            alpha = c(0.5,1)
          ),
          text = list(
            lab = c('True Positives','False Positives'),
            cex = 1.2,
            col = 'black'
          ),
          padding.text = 4,
          cex = 0.8
        )
      ),
      x = 1.02,
      y = 0.11,
      corner = c(0,0)
    )
  ),
  right.padding = 21,
  height = 5,
  width = 9,
  resolution = 600
);
 

Created by Pretty R at inside-R.org