Skip to content

Commit

Permalink
Address #1069 and #1065
Browse files Browse the repository at this point in the history
  • Loading branch information
PoisonAlien committed Nov 4, 2024
1 parent 79e5cd5 commit 7c08a05
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 33 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions R/oncoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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"
}
}

Expand Down Expand Up @@ -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)){
Expand Down Expand Up @@ -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))

Expand Down
8 changes: 4 additions & 4 deletions R/print_mat.R
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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))
Expand Down
27 changes: 3 additions & 24 deletions inst/NEWS.md
Original file line number Diff line number Diff line change
@@ -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)
28 changes: 28 additions & 0 deletions inst/old_news
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 7c08a05

Please sign in to comment.