plotmafSummary(maf = dataForReport[["maf"]], rmOutlier = TRUE, addStat = 'median', dashboard = TRUE, titvRaw = FALSE)
clinicalFeatures=dataForReport[["clinicalFeatures"]] clinicalFeaturesSize=length(unique(unlist(dataForReport[["mafProcessed"]]$variantMafOncoPlot@data[,..clinicalFeatures]))) if (clinicalFeaturesSize>99) { print(paste0("clinicalFeature ",paste(clinicalFeatures,collapse=", ")," has too many groups. Reduce it to less than 99 groups for Oncoplots")) clinicalFeatures=NULL } oncoplot(maf = dataForReport[["mafProcessed"]]$variantMafOncoPlot, top = 10,removeNonMutated=FALSE,showTumorSampleBarcodes=TRUE,clinicalFeatures=clinicalFeatures,barcode_mar=9,gene_mar=9)
if (dataForReport[["performVaf"]]) { cat("### VAF\n") # plotVaf(maf = dataForReport[["maf"]], vafCol = dataForReport[["vafCol"]]) ##variant level plotVaf(maf = dataForReport[["mafProcessed"]]$variantMafOncoPlot, vafCol = dataForReport[["vafCol"]]) }
mafContent.titv = titv(maf = dataForReport[["maf"]], plot = FALSE, useSyn = TRUE) plotTiTv(res = mafContent.titv,showBarcodes=TRUE)
if (dataForReport[["genome"]] %in% c("hg18","hg19","hg38")) { cat("### Rainfall plots\n") rainfallPlot(maf = dataForReport[["maf"]],ref.build=dataForReport[["genome"]]) }
mafMutload = tcgaCompare(maf = dataForReport[["maf"]])
suppressWarnings(geneCloud(input = dataForReport[["maf"]], top = 15))
clinicalFeatures=dataForReport[["clinicalFeatures"]] clinicalFeaturesSize=length(unique(unlist(dataForReport[["maf"]]@data[,..clinicalFeatures]))) if (clinicalFeaturesSize>99) { print(paste0("clinicalFeature ",paste(clinicalFeatures,collapse=", ")," has too many groups. Reduce it to less than 99 groups for Oncoplots and Oncostrip")) clinicalFeatures=NULL } try(oncoplot(maf = dataForReport[["maf"]], top = 10,removeNonMutated=FALSE,showTumorSampleBarcodes=TRUE,clinicalFeatures=clinicalFeatures,barcode_mar=9))
try(oncostrip(maf = dataForReport[["maf"]], top=10,genes=dataForReport[["interestedGenes"]],removeNonMutated=FALSE,showTumorSampleBarcodes=TRUE,clinicalFeatures=clinicalFeatures,barcode_mar=9))
if (dataForReport[["performVaf"]]) { cat("### Gene VAF\n") plotVaf(maf = dataForReport[["maf"]], vafCol = dataForReport[["vafCol"]]) }
#check if the interestedGenes were recorded in protein_domains.RDs gff = readRDS(file = system.file("extdata", "protein_domains.RDs", package = "maftools")) data.table::setDT(x = gff) interestedGenesInDb=intersect(dataForReport[["interestedGenes"]],gff[,HGNC]) if (length(dataForReport[["interestedGenes"]])>length(interestedGenesInDb)) { temp=setdiff(dataForReport[["interestedGenes"]],interestedGenesInDb) warning(paste0(length(temp), " interestedGenes were not recored in protein_domains database, removed from Lollipop plots")) print(paste0("Interested Genes removed: ", paste(temp,collapse=";"))) } if (length(interestedGenesInDb)>0) { for (i in 1:length(interestedGenesInDb)) { try(print(lollipopPlot(maf = dataForReport[["maf"]], gene = interestedGenesInDb[i], AACol = dataForReport[["AACol"]], showMutationRate = TRUE))) } } else { warning(paste0("Zero genes recored in protein_domains database, no Lollipop plots")) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.