# Calculate the excess of indels per patient. Input dnds1 is a dndsout object generated by running dndscv on a list of known cancer genes.
calc_ex_ind = function(dnds1) {
num_patients <- length(as.vector(unique(dnds1$annotmuts$sampleID)))
excess_ind <- (dnds1$sel_cv$n_ind - dnds1$sel_cv$exp_ind) / num_patients
excess_ind <- data.frame(gene_name = dnds1$sel_cv$gene_name, ex_ind = as.numeric(as.vector(excess_ind)))
return(excess_ind)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.