tcga_oncoplot_data <- onc_enrich_report[["data"]][["tcga"]][["aberration"]][["table"]][["snv_indel"]] ## oncoplot arguments gene_mar <- 10 annotationFontSize <- 2.5 sepwd_genes <- 0.7 fontSize <- 1.5 legendFontSize <- 2.4 legend_height <- 5 anno_height <- 0.6 fheight <- 26 fwidth <- 18 for(n in names(tcga_oncoplot_data)){ tcga_oncoplot_data[[n]]$fheight <- fheight n_genes <- NROW(tcga_oncoplot_data[[n]][['top_mutated_genes']]) if(n_genes < 40){ tcga_oncoplot_data[[n]]$fheight <- 24 } if(n_genes < 30){ tcga_oncoplot_data[[n]]$fheight <- 21 } if(n_genes < 20){ tcga_oncoplot_data[[n]]$fheight <- 17 } if(n_genes < 10){ tcga_oncoplot_data[[n]]$fheight <- 14 } }
code <- tcga_oncoplot_data[["Breast"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Breast"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Colon/Rectum"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Colon/Rectum"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis","MSI_status"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Lung"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Lung"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Skin"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Skin"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Esophagus/Stomach"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Esophagus/Stomach"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis","MSI_status"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Cervix"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Cervix"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, draw_titv = T, bgCol = "gray93", clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Prostate"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Prostate"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Ovary/Fallopian Tube"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Ovary/Fallopian Tube"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Uterus"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Uterus"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis","MSI_status"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Pancreas"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Pancreas"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Soft Tissue"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Soft Tissue"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Myeloid"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Myeloid"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["CNS/Brain"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["CNS/Brain"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Liver"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Liver"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, draw_titv = T, bgCol = "gray93", clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Kidney"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Kidney"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Lymphoid"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Lymphoid"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Head and Neck"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Head and Neck"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Biliary Tract"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Biliary Tract"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, draw_titv = T, bgCol = "gray93", clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Bladder/Urinary Tract"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Bladder/Urinary Tract"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, draw_titv = T, bgCol = "gray93", annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Pleura"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Pleura"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, draw_titv = T, bgCol = "gray93", clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
code <- tcga_oncoplot_data[["Thyroid"]][['code']] maf <- tcga_maf_datasets[[code]] maftools::oncoplot(maf, genes = tcga_oncoplot_data[["Thyroid"]][['top_mutated_genes']]$symbol, drawRowBar = F, drawColBar = F, sortByAnnotation = T, draw_titv = T, bgCol = "gray93", clinicalFeatures = c("Diagnosis"), showTitle = F, gene_mar = gene_mar, annotationFontSize = annotationFontSize, sepwd_genes = sepwd_genes, fontSize = fontSize, legendFontSize = legendFontSize, legend_height = legend_height, anno_height = anno_height)
cat('<br><br>\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>Too few genes (n < 5) </b> with significant SNV/InDel mutation frequency for oncoplot </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
missing_recurrent_tcga_variants <- TRUE if(nrow(onc_enrich_report[['data']][['tcga']][['recurrent_variants']]) > 0){ missing_recurrent_tcga_variants <- FALSE }
vars <- onc_enrich_report[['data']][['tcga']][['recurrent_variants']] |> dplyr::mutate(SITE_RECURRENCE = as.integer(SITE_RECURRENCE)) mutation_hotspot_levels <- levels(as.factor( vars$MUTATION_HOTSPOT)) vars <- vars |> dplyr::arrange( dplyr::desc(SITE_RECURRENCE), dplyr::desc(LOSS_OF_FUNCTION), PROTEIN_CHANGE) |> dplyr::mutate(CONSEQUENCE = stringr::str_replace_all( CONSEQUENCE, "&", ", " )) |> head(2500) if(length(mutation_hotspot_levels) > 0){ vars <- vars |> dplyr::arrange(MUTATION_HOTSPOT, dplyr::desc(SITE_RECURRENCE)) } recurrent_vars_tcga <- crosstalk::SharedData$new( vars) crosstalk::bscols( list( crosstalk::filter_select("SYMBOL","Gene symbol",recurrent_vars_tcga, ~SYMBOL), crosstalk::filter_select("CONSEQUENCE", "Variant consequence", recurrent_vars_tcga, ~CONSEQUENCE), crosstalk::filter_select("PRIMARY_SITE", "Primary site/tissue", recurrent_vars_tcga, ~PRIMARY_SITE), crosstalk::filter_select("MUTATION_HOTSPOT", "Cancer mutation hotspot", recurrent_vars_tcga, ~MUTATION_HOTSPOT) ), list( crosstalk::filter_checkbox("LOSS_OF_FUNCTION", "Loss-of-function status", recurrent_vars_tcga, ~LOSS_OF_FUNCTION), crosstalk::filter_slider("TOTAL_RECURRENCE", "Pancancer variant recurrence", recurrent_vars_tcga, ~TOTAL_RECURRENCE), crosstalk::filter_slider("SITE_RECURRENCE", "Site/tissue variant recurrence", recurrent_vars_tcga, ~SITE_RECURRENCE) ) ) htmltools::br() dt <- DT::datatable(recurrent_vars_tcga, escape = F, extensions=c("Buttons","Responsive"), width = "100%", options=list(buttons = c('csv','excel'),dom = 'Bfrtip') ) if(length(mutation_hotspot_levels) > 0){ dt <- dt |> DT::formatStyle( "MUTATION_HOTSPOT","MUTATION_HOTSPOT", color = "white", fontWeight = "bold", backgroundColor = DT::styleEqual( mutation_hotspot_levels, rep("black", length(mutation_hotspot_levels))) ) } dt htmltools::br() htmltools::br()
cat('\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> <b>NO</b> query proteins with recurrent coding somatic variants in TCGA were found. </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
suppressMessages(library(plotly)) gene_aberration_top_mat <- onc_enrich_report[['data']][['tcga']][['aberration']][['matrix']][['cna_ampl']] #plotly_colors <- "YlGn" fig <- plotly::plot_ly( colors = "YlGn", width = 800, height = 400 + (14.67 * NROW(onc_enrich_report$data$tcga$aberration$matrix$cna_ampl))) |> plotly::add_heatmap( y = rownames(gene_aberration_top_mat), x = colnames(gene_aberration_top_mat), z = gene_aberration_top_mat, hovertext = "Percent mutated", yaxis = "y") |> plotly::layout( title = "Amplifications", xaxis = list(tickfont = list(size = 13, family = "Helvetica"), tickangle = -50), yaxis = list(tickfont = list(size = 12, family = "Helvetica")), margin = list(l = 75, r = 20, b = 150, t = 30, pad = 4), legend = list(orientation = 'h') ) |> plotly::colorbar( nticks = 10, title = list(text = "Percent mutated",side = "bottom"), limits = c(0, plyr::round_any(max(gene_aberration_top_mat), 10, ceiling))) rm(gene_aberration_top_mat) fig
cat('\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> Heat map not shown - limited number of genes in the queryset are involved in copy number amplifications (<b>< 3, as reported in TCGA cohorts</b>) </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
suppressMessages(library(plotly)) gene_aberration_top_mat <- onc_enrich_report[['data']][['tcga']][['aberration']][['matrix']][['cna_homdel']] #plotly_colors <- "YlOrRd" fig <- plotly::plot_ly( colors = "YlOrRd", width = 800, height = 400 + (14.67 * NROW(gene_aberration_top_mat))) |> plotly::add_heatmap( y = rownames(gene_aberration_top_mat), x = colnames(gene_aberration_top_mat), z = gene_aberration_top_mat, hovertext = "Percent mutated", yaxis = "y") |> plotly::layout( title = 'Homozygous deletions', xaxis = list(tickfont = list(size = 13, family = "Helvetica"), tickangle = -50), yaxis = list(tickfont = list(size = 12, family = "Helvetica")), margin = list(l = 75, r = 20, b = 150, t = 30, pad = 4) ) |> plotly::colorbar( nticks = 10, title = list(text = "Percent mutated",side = "bottom"), limits = c(0, plyr::round_any(max(gene_aberration_top_mat), 10, ceiling))) rm(gene_aberration_top_mat) fig
cat('\n <ul><li> <i> <span style="font-size: 105%; padding: 3px; background-color:#989898; color:white"> Heatmap not shown - limited number of genes in the queryset are involved in homozygous deletions (<b>< 3, as reported in TCGA cohorts</b>) </span></i></li></ul>',sep='\n') cat('\n') cat('<br><br>')
all_targets_vtypes <- onc_enrich_report[['data']][['tcga']][['aberration']][['table']][['cna_homdel']] |> dplyr::bind_rows( onc_enrich_report[['data']][['tcga']][['aberration']][['table']][['cna_ampl']] ) |> dplyr::arrange(dplyr::desc(percent_mutated)) |> head(2500)
oe_targets_tcga <- crosstalk::SharedData$new(all_targets_vtypes) crosstalk::bscols( list( crosstalk::filter_select("primary_site", "Primary site/tissue", oe_targets_tcga, ~primary_site), crosstalk::filter_select("variant_type", "Aberration type", oe_targets_tcga, ~variant_type), crosstalk::filter_slider("percent_mutated", "Percent mutated", oe_targets_tcga, ~percent_mutated, step = 10, min = 0, max = 100) ), list( crosstalk::filter_select("primary_diagnosis", "Diagnosis", oe_targets_tcga, ~primary_diagnosis), crosstalk::filter_slider("cohort_size", "Cohort Size", oe_targets_tcga, ~cohort_size) ) ) htmltools::br() DT::datatable(oe_targets_tcga, escape = F, extensions=c("Buttons","Responsive"), width = "100%", options=list(buttons = c('csv','excel'),dom = 'Bfrtip') )
cat('<i>No genes with tcga aberrations were found.</i>',sep='\n') cat('\n')
Citation Note : If you use the output of the Tumor aberration frequencies module of oncoEnrichR in your research, please cite the following resources and tools:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.