diff --git a/DESCRIPTION b/DESCRIPTION index 18d26fd..865f77a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: maftools Title: Summarize, Analyze and Visualize MAF Files -Version: 2.21.2 +Version: 2.22.10 Date: 2021-04-30 Authors@R: person(given = "Anand", diff --git a/R/oncoplot.R b/R/oncoplot.R index 8183b1b..e0e3ac5 100644 --- a/R/oncoplot.R +++ b/R/oncoplot.R @@ -591,6 +591,7 @@ oncoplot = oncoplot = function(maf, top = 20, minMut = NULL, genes = NULL, alter if(drawRowBar){ if(is.null(rightBarData)){ side_bar_lims = c(0, max(unlist(apply(numMat, 1, function(x) cumsum(table(x[x!=0])))), na.rm = TRUE)) + rightBarTitle = "No. of samples" }else{ rightBarTitle = colnames(rightBarData)[2] colnames(rightBarData) = c('genes', 'exprn') @@ -621,7 +622,6 @@ oncoplot = oncoplot = function(maf, top = 20, minMut = NULL, genes = NULL, alter plot(x = NA, y = NA, type = "n", axes = FALSE, xlim = side_bar_lims, ylim = c(0, 1), xaxs = "i") - rightBarTitle = "No. of samples" } } @@ -761,8 +761,8 @@ oncoplot = oncoplot = function(maf, top = 20, minMut = NULL, genes = NULL, alter } #Add grids - abline(h = (0:ncol(nm)) + 0.5, col = borderCol, lwd = sepwd_genes) - abline(v = (0:nrow(nm)) + 0.5, col = borderCol, lwd = sepwd_samples) + abline(h = (0:ncol(nm)) + 0.5, col = borderCol, lwd = sepwd_genes, xpd = FALSE) + abline(v = (0:nrow(nm)) + 0.5, col = borderCol, lwd = sepwd_samples, xpd = FALSE) #Add boxes if pathways are opted if(!is.null(pathways)){ @@ -1067,7 +1067,7 @@ oncoplot = oncoplot = function(maf, top = 20, minMut = NULL, genes = NULL, alter #Add grids rect(xleft = 0.5, ybottom = (0:(ncol(annotation))) + 0.5, xright = nrow(annotation)+0.5, ytop = (0:(ncol(annotation))) + 0.5, border = annoBorderCol, lwd = 0.7) - abline(v = (0:(nrow(nm))) + 0.5, col = annoBorderCol, lwd = sepwd_samples) + abline(v = (0:(nrow(nm))) + 0.5, col = annoBorderCol, lwd = sepwd_samples, xpd = FALSE) mtext(text = colnames(annotation), side = 4, font = 1, line = 0.4, cex = fontSize, las = 2, at = 1:ncol(annotation)) diff --git a/R/print_mat.R b/R/print_mat.R index ba54cba..221dfc7 100644 --- a/R/print_mat.R +++ b/R/print_mat.R @@ -243,8 +243,8 @@ print_mat = function(maf, genes, removeNonMutated = TRUE, colors = NULL, } #Add grids - abline(h = (1:ncol(nm)) + 0.5, col = borderCol, lwd = sepwd_genes) - abline(v = (1:nrow(nm)) + 0.5, col = borderCol, lwd = sepwd_samples) + abline(h = (1:ncol(nm)) + 0.5, col = borderCol, lwd = sepwd_genes, xpd = FALSE) + abline(v = (1:nrow(nm)) + 0.5, col = borderCol, lwd = sepwd_samples, xpd = FALSE) title(title, cex.main = title_size, outer = FALSE, font = 2) # mtext(text = colnames(nm), side = 2, at = 1:ncol(nm), @@ -330,8 +330,8 @@ print_mat = function(maf, genes, removeNonMutated = TRUE, colors = NULL, } #Add grids - abline(h = (1:ncol(nm)) + 0.5, col = "white", lwd = sepwd_genes) - abline(v = (1:nrow(nm)) + 0.5, col = "white", lwd = sepwd_samples) + abline(h = (1:ncol(nm)) + 0.5, col = "white", lwd = sepwd_genes, xpd = FALSE) + abline(v = (1:nrow(nm)) + 0.5, col = "white", lwd = sepwd_samples, xpd = FALSE) if(plot2){ mtext(text = colnames(annotation), side = 4, font = 1, line = 0.4, cex = fontSize, las = 2, at = 1:ncol(annotation)) diff --git a/inst/NEWS.md b/inst/NEWS.md index 444e6ae..de61bb1 100644 --- a/inst/NEWS.md +++ b/inst/NEWS.md @@ -1,26 +1,5 @@ -# CHANGES IN VERSION 2.21.2 +# CHANGES IN VERSION 2.22.10 ## BUG FIXES -- Bug fix in using `keepGeneOrder` in `coOncoplot()`. Issue: [1061](https://github.com/PoisonAlien/maftools/issues/1061) -- Bug fix in using `selectedPathways` in `oncoplot()`. Issue: [1041](https://github.com/PoisonAlien/maftools/issues/1041) -- Add an error message when bai files are missing `sampleSwaps()`. Issue: [1028](https://github.com/PoisonAlien/maftools/issues/1028) -- Bug fix in `tmb` while handling multiple MAFs. Issue: [1018](https://github.com/PoisonAlien/maftools/issues/1018) -- Handle missing `NA`s while sub-setting for ranges. Issue: [1013](https://github.com/PoisonAlien/maftools/issues/1013) -- Better error handling when zero mutated samples are encountered in `clinicalEnrichment`. Issue: [1010](https://github.com/PoisonAlien/maftools/issues/1010) -- MAJOR: `read.maf` by default coerces clinical data columns to character. This bug fix avoids it and is auto detected. Issue: [997](https://github.com/PoisonAlien/maftools/issues/997) - -## ENHANCEMENTS -- Better handling of color codes for continuous variable annotations [1053](https://github.com/PoisonAlien/maftools/issues/1053) -- Add `right_mar` to `gisticOncoPlot`[1043](https://github.com/PoisonAlien/maftools/issues/1043) -- Added `PPDPFL` to protein domain database Issue: [1025](https://github.com/PoisonAlien/maftools/issues/1025) -- Better sorting of oncoplot with `collapsePathway` -- Changed default background for oncoplot from `gray` to `#ecf0f1` -- Changed default signature database to SBS_v3.4 (from legacy) -- Update `tmb` function - -## BREAKING CHNAGES -- Column order required for `pathways()` function changed from Pathway,Gene to Gene,Pathway. Issue: [1041](https://github.com/PoisonAlien/maftools/issues/1041) - -## NEW FUNCTIONS -- `gisticCompare()` for comparing two GISTIC objects -- `segSummarize()` for summarizing DNAcopy segments +- Avoid grid lines crossing over the plotting window in `oncoplot`. Issue: [1069](https://github.com/PoisonAlien/maftools/issues/1069) +- Fix the title for naming the right bar data. Issue: [1065](https://github.com/PoisonAlien/maftools/issues/1065) diff --git a/inst/old_news b/inst/old_news index 23f67cc..b6ddd8d 100644 --- a/inst/old_news +++ b/inst/old_news @@ -1,3 +1,31 @@ +# CHANGES IN VERSION 2.22.0 + +## BUG FIXES +- Bug fix in using `keepGeneOrder` in `coOncoplot()`. Issue: [1061](https://github.com/PoisonAlien/maftools/issues/1061) +- Bug fix in using `selectedPathways` in `oncoplot()`. Issue: [1041](https://github.com/PoisonAlien/maftools/issues/1041) +- Add an error message when bai files are missing `sampleSwaps()`. Issue: [1028](https://github.com/PoisonAlien/maftools/issues/1028) +- Bug fix in `tmb` while handling multiple MAFs. Issue: [1018](https://github.com/PoisonAlien/maftools/issues/1018) +- Handle missing `NA`s while sub-setting for ranges. Issue: [1013](https://github.com/PoisonAlien/maftools/issues/1013) +- Better error handling when zero mutated samples are encountered in `clinicalEnrichment`. Issue: [1010](https://github.com/PoisonAlien/maftools/issues/1010) +- MAJOR: `read.maf` by default coerces clinical data columns to character. This bug fix avoids it and is auto detected. Issue: [997](https://github.com/PoisonAlien/maftools/issues/997) + +## ENHANCEMENTS +- Better handling of color codes for continuous variable annotations [1053](https://github.com/PoisonAlien/maftools/issues/1053) +- Add `right_mar` to `gisticOncoPlot`[1043](https://github.com/PoisonAlien/maftools/issues/1043) +- Added `PPDPFL` to protein domain database Issue: [1025](https://github.com/PoisonAlien/maftools/issues/1025) +- Better sorting of oncoplot with `collapsePathway` +- Changed default background for oncoplot from `gray` to `#ecf0f1` +- Changed default signature database to SBS_v3.4 (from legacy) +- Update `tmb` function + +## BREAKING CHNAGES +- Column order required for `pathways()` function changed from Pathway,Gene to Gene,Pathway. Issue: [1041](https://github.com/PoisonAlien/maftools/issues/1041) + +## NEW FUNCTIONS +- `gisticCompare()` for comparing two GISTIC objects +- `segSummarize()` for summarizing DNAcopy segments + + # CHANGES IN VERSION 2.18.0 (Bioconductor release branch - 2.20.0)