Skip to content

Commit

Permalink
update NEWS, vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
PoisonAlien committed Oct 23, 2019
1 parent 2a0a2c6 commit 6d9b8bd
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 35 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ unsrturl.bst
.settings
.tm_properties
.cloud
.icloud
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: maftools
Type: Package
Title: Summarize, Analyze and Visualize MAF Files
Version: 2.1.31
Version: 2.1.32
Date: 2015-12-14
Authors@R:
person(given = "Anand",
Expand Down
2 changes: 1 addition & 1 deletion R/dashboard.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dashboard = function(maf, color = NULL, rmOutlier = TRUE, log_conv = FALSE, titv
vcs = t(vcs)

lo = matrix(data = 1:6, nrow = 2, byrow = TRUE)
layout(mat = lo, heights = c(3.5, 3), widths = c(3, 2, 2))
graphics::layout(mat = lo, heights = c(3.5, 3), widths = c(3, 2, 2))
par(cex.axis = fontSize, font = 3, cex.main = titleSize[1], lwd = 1.2)

#--------------------------- variant classification plot -----------------
Expand Down
2 changes: 1 addition & 1 deletion R/forestPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ forestPlot = function(mafCompareRes, pVal = 0.05, fdr = NULL, color = NULL,
names(color) = c(m1Name, m2Name)
}

layout(mat = matrix(c(1, 2, 3, 4, 5, 5, 5, 5), byrow = TRUE, ncol = 4, nrow = 2), widths = c(4, 1, 1), heights = c(6, 1.2))
graphics::layout(mat = matrix(c(1, 2, 3, 4, 5, 5, 5, 5), byrow = TRUE, ncol = 4, nrow = 2), widths = c(4, 1, 1), heights = c(6, 1.2))
par(mar = c(3, 1, 3, 5))
plot(rep(0, nrow(m.sigs)), 1:nrow(m.sigs), xlim = c(-lim, lim), axes = FALSE, pch = NA, xlab = "", ylab = "", ylim = c(0.5, nrow(m.sigs)))
segments(x0 = m.sigs$log10OR_low, y0 = 1:nrow(m.sigs), x1 = m.sigs$log10OR_high, y1 = 1:nrow(m.sigs), lwd = lineWidth, color[m.sigs$flow])
Expand Down
4 changes: 2 additions & 2 deletions R/gisticOncoPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ gisticOncoPlot = function(gistic = NULL, top = NULL,
#Plot layout
if(is.null(clinicalFeatures)){
mat_lo = matrix(data = c(1,2), nrow = 2, ncol = 1, byrow = TRUE)
lo = layout(mat = mat_lo, heights = c(12, 2))
lo = graphics::layout(mat = mat_lo, heights = c(12, 2))
}else{
mat_lo = matrix(data = c(1,2,3), nrow = 3, ncol = 1, byrow = TRUE)
lo = layout(mat = mat_lo, heights = c(12, 1, 4))
lo = graphics::layout(mat = mat_lo, heights = c(12, 1, 4))
}

if(is.null(clinicalFeatures)){
Expand Down
2 changes: 1 addition & 1 deletion R/lollipopPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ lollipopPlot = function(maf, gene = NULL, AACol = NULL, labelPos = NULL, labPosS
col = col[unique(as.character(prot.snp.sumamry[,Variant_Classification]))]

lo = matrix(data = c(1, 1, 2, 2), nrow = 2, byrow = TRUE)
layout(mat = lo, heights = c(4, 1.25))
graphics::layout(mat = lo, heights = c(4, 1.25))

par(mar = c(1, 2.5, 2, 1))
plot(0, 0, pch = NA, ylim = c(0, 6.5), xlim = c(0, len), axes = FALSE, xlab = NA, ylab = NA)
Expand Down
2 changes: 1 addition & 1 deletion R/lollipopPlot2.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ lollipopPlot2 = function(m1, m2, gene = NULL, AACol1 = NULL, AACol2 = NULL, m1_n
col2 = col[as.character(m2.lp[[1]][,Variant_Classification])]

lo = matrix(data = c(1, 1, 2, 2), nrow = 2, byrow = TRUE)
layout(mat = lo, heights = c(4, 1.25))
graphics::layout(mat = lo, heights = c(4, 1.25))

par(mar = c(2, 2.5, 2, 1))
plot(0, 0, xlim = c(0, max(m1.lp[[2]], na.rm = TRUE)+10), ylim = c(-6.5, 6.5), axes = FALSE, pch = NA, xlab = "", ylab = "")
Expand Down
2 changes: 1 addition & 1 deletion R/plotApobecDiff.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ plotApobecDiff = function(tnm, maf, pVal = 0.05, title_size = 1, axis_lwd = 1, f

pieCol = c("#084594", "#9ECAE1")

layout(matrix(c(1,2,3,1,4,4), 2, 3, byrow = TRUE), widths=c(2, 2, 2))
graphics::layout(matrix(c(1,2,3,1,4,4), 2, 3, byrow = TRUE), widths=c(2, 2, 2))
par(bty="n", mgp = c(0.5,0.5,0), mar = c(2,3.5,4,0) + 0.1, las=1, tcl=-.25, font.main=4, xpd=NA)

yp = as.integer(pretty(log10(sub.tbl[,n_mutations])))
Expand Down
2 changes: 1 addition & 1 deletion R/plotClusters.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ plotClusters = function(clusters, tsb = NULL, genes = NULL, showCNvars = FALSE,
tsb_nclust = as.numeric(unique(tsb.dat[!cluster %in% c("outlier", "CN_altered"),cluster]))
lo_mat = matrix(c(tsb_nclust, max(tsb_nclust)+1) , ncol = 1)
#return(lo_mat)
layout(mat = lo_mat, heights = c(rep(0.5, length(tsb_nclust)), 4))
graphics::layout(mat = lo_mat, heights = c(rep(0.5, length(tsb_nclust)), 4))

tsb.dat.spl = split(tsb.dat, as.factor(as.character(tsb.dat$cluster)))
for(cl in seq_along(tsb_nclust)){
Expand Down
2 changes: 1 addition & 1 deletion R/plotMafSummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ plotmafSummary = function(maf, rmOutlier = TRUE, dashboard = TRUE, titvRaw = TRU

#--------------------------- variant per sample plot -----------------

layout(mat = matrix(c(1, 1, 2, 2, 3, 3), nrow = 3, byrow = TRUE), heights = c(4, 4, 3))
graphics::layout(mat = matrix(c(1, 1, 2, 2, 3, 3), nrow = 3, byrow = TRUE), heights = c(4, 4, 3))
if(showBarcodes){
par(mar = c(7, 2, 3, 1))
b = barplot(vcs, col = col[rownames(vcs)], border = NA, axes = FALSE, names.arg = rep("", ncol(vcs)))
Expand Down
4 changes: 2 additions & 2 deletions R/plotSignatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ plotSignatures = function(nmfRes = NULL, contributions = FALSE, color = NULL, pa
cols = RColorBrewer::brewer.pal(n = 8, name = 'Set2')

if(show_barcodes){
lo = layout(mat = matrix(data = c(1, 2), nrow = 2), heights = c(6, 2))
lo = graphics::layout(mat = matrix(data = c(1, 2), nrow = 2), heights = c(6, 2))
par(mar = c(6, 4, 2, 1))
b = barplot(contrib, axes = FALSE, horiz = FALSE, col = cols, border = NA, names.arg = rep("", ncol(contrib)))
axis(side = 1, at = b, labels = colnames(contrib), lwd = 2, cex.axis = font_size,
Expand All @@ -53,7 +53,7 @@ plotSignatures = function(nmfRes = NULL, contributions = FALSE, color = NULL, pa
border = NA, bty = "n", pch = 15, xpd = TRUE, ncol = 1,
cex = 1.2, pt.cex = 1.5, horiz = TRUE)
}else{
lo = layout(mat = matrix(data = c(1, 2), nrow = 2), heights = c(6, 2))
lo = graphics::layout(mat = matrix(data = c(1, 2), nrow = 2), heights = c(6, 2))
par(mar = c(3, 4, 2, 1))
b = barplot(contrib, axes = FALSE, horiz = FALSE, col = cols, border = NA, names.arg = rep("", ncol(contrib)))
axis(side = 2, at = seq(0, 1, 0.25), lwd = 3, font = 1, las = 2, cex.axis = 0.9)
Expand Down
4 changes: 2 additions & 2 deletions R/plotTiTv.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ plotTiTv = function(res = NULL, plotType = 'both', sampleOrder = NULL,
add_legend(x = "topright", legend = names(col), col = col, bty = "n", pch = 15, y.intersp = 0.7, text.font = 1)

} else if(plotType == 'box'){
layout(matrix(data = c(1, 2), nrow = 1), widths = c(4, 2))
graphics::layout(matrix(data = c(1, 2), nrow = 1), widths = c(4, 2))
par(mar = c(2, 4, 2, 2))
b = boxplot(value ~ variable, data = titv.frac.melt, axes = FALSE, xlab = "", ylab = "", col = col[levels(titv.frac.melt[,variable])],
names=NA, lty = 1, staplewex = 0, pch = 16, xaxt="n", notch = plotNotch,
Expand All @@ -109,7 +109,7 @@ plotTiTv = function(res = NULL, plotType = 'both', sampleOrder = NULL,

} else if(plotType == 'both'){

layout(mat = matrix(data = c(1, 2, 3, 3), byrow = TRUE, nrow = 2), widths = c(4, 2), heights = c(5, 4))
graphics::layout(mat = matrix(data = c(1, 2, 3, 3), byrow = TRUE, nrow = 2), widths = c(4, 2), heights = c(5, 4))
par(mar = c(2, 4, 2, 1))
plot(NA, axes = FALSE, xlim = c(0.25, 6.25), ylim = c(0, 100), xlab = NA, ylab = NA)
abline(h = seq(0, 100, 25), v = 1:6, col = grDevices::adjustcolor(col = "gray70", alpha.f = 0.5), lty = 2, lwd = 0.6)
Expand Down
2 changes: 1 addition & 1 deletion R/plot_vaf.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' Plots vaf distribution of genes
#' @description Plots vaf distribution of genes as a boxplot.
#' @description Plots vaf distribution of genes as a boxplot. Each dot in the jitter is a variant.
#'
#' @param maf an \code{\link{MAF}} object generated by \code{\link{read.maf}}
#' @param vafCol manually specify column name for vafs. Default looks for column 't_vaf'
Expand Down
2 changes: 1 addition & 1 deletion R/rainfallPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ rainfallPlot = function(maf, tsb = NULL, detectChangePoints = FALSE,

ylims = round(seq(min(summary(maf.snp[,diff]), na.rm = TRUE),
max(summary(maf.snp[,diff]), na.rm = TRUE), length.out = 4), 2)
layout(mat = matrix(data = c(1, 2), nrow = 2, byrow = T), heights= c(4, 1))
graphics::layout(mat = matrix(data = c(1, 2), nrow = 2, byrow = T), heights= c(4, 1))
par(mar = c(1, 4, 2, 0))
plot(NA, NA,
axes = FALSE, xlab = NA, ylab = NA,
Expand Down
17 changes: 10 additions & 7 deletions inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
CHANGES IN VERSION 2.2.0
-------------------------
NEW FUNCTIONS
o survGroup - Predict genes/genesets associated with survival. Issue: #396
o `survGroup`, `mafSurvGroup` - Predict genes/genesets associated with survival. Issue: #396

DEPRECATED
o `oncotate` - Oncotator is no longer supported by Broad. Issue: #403 #384 #381
o `findPathways` argument in `somaticInteractions` function has been deprecated

SIGNIFICANT USER-LEVEL IMPROVEMENT
o Signature analysis has been modified to be more flexible. It now consits of three functions namely:
o `estimateSignatures` - which measures cophenetic correlation metric (a measure of goodness of fit) for a range of values
o `plotCophenetic` - which draws an elbow plot of cophenetic correlation metric from `estimateSignatures` and helps to decide an optimal number of signature `(n)`.
o `extractSignatures` - which then extracts final `n` signatures
o `compareSignatures` now has two databases of known signatures. Classic 30 signatures and newer 67 SBS signatures from COSMIC.
o `findPathways` argument in `somaticInteractions` function has been deprecated

BUG FIX
o gisticChromPlot bug fix. Issue: #392
o annovarToMaf bug fix for results without exonic variants. Issue: #388
o Avoid conflict with plotly::layout with graphcis::layout. Issue: #387
o `gisticChromPlot` bug fix. Issue: #392
o `annovarToMaf` bug fix for results without exonic variants. Issue: #388
o Avoid conflict with `plotly::layout` with `graphcis::layout`. Issue: #387 #202
o Fix side-bar heights in Oncoplot with copy-number data. Issue: #383
o Update y-axis label for tcgaCompare plot. Issue: #366
o annovarToMaf annotating variants with MNPs. Issue: #335
o Update y-axis label for `tcgaCompare` plot. Issue: #366
o `annovarToMaf` annotating variants with MNPs. Issue: #335
2 changes: 1 addition & 1 deletion man/plotVaf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 3 additions & 11 deletions vignettes/maftools.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,6 @@ Many disease causing genes in cancer are co-occurring or show strong exclusivene
somaticInteractions(maf = laml, top = 25, pvalue = c(0.05, 0.1))
```

We can visualize the above results using `oncostrip`. For example, in above analysis, gene set TP53, FLT3 and RUNX1 show a strong exclusiveness with each other a p-value of 4.8e-5.

```{r, fig.height=2.3,fig.width=8,fig.align='center'}
oncostrip(maf = laml, genes = c('TP53', 'FLT3', 'RUNX1'))
```


## Detecting cancer driver genes based on positional clustering
maftools has a function `oncodrive` which identifies cancer genes (driver) from a given MAF. `oncodrive` is a based on algorithm [oncodriveCLUST](http://bg.upf.edu/group/projects/oncodrive-clust.php) which was originally implemented in Python. Concept is based on the fact that most of the variants in cancer causing genes are enriched at few specific loci (aka hot-spots). This method takes advantage of such positions to identify cancer genes. If you use this function, please cite [OncodriveCLUST article](http://bioinformatics.oxfordjournals.org/content/early/2013/07/31/bioinformatics.btt395.full) [7](#references).

Expand Down Expand Up @@ -505,7 +498,7 @@ arrows(x0 = 5, y0 = 4, x1 = 5, y1 = 1, length = 0.1, lwd = 2)
text(x = 5, y = 0, labels = "plotSignatures()", font = 3)
```

Note: In previous versions, `extractSignatures` used to take care of above steps automatically. After versions 2.2.0, main function is split inot above 5 stpes for user flexibility.
***Note:*** In previous versions, `extractSignatures` used to take care of above steps automatically. After versions 2.2.0, main function is split inot above 5 stpes for user flexibility.

To keep vignette run time minimal, below example is run with `nTry = 4`.
```{r, fig.height=5, fig.width=5, eval=FALSE, message=FALSE}
Expand Down Expand Up @@ -552,7 +545,7 @@ Finally plot signatures
maftools::plotSignatures(nmfRes = laml.sig, title_size = 0.8)
```

NOTE:
***NOTE:***

1. Should you receive an error while running `extractSignatures` complaining `none of the packages are loaded`, please manually load the `NMF` library and re-run.

Expand Down Expand Up @@ -662,7 +655,6 @@ devtools::install_github(repo = "PoisonAlien/TCGAmutations")
3. Mermel, C.H. et al. GISTIC2.0 facilitates sensitive and confident localization of the targets of focal somatic copy-number alteration in human cancers. Genome Biol 12, R41 (2011).
4. Olshen, A.B., Venkatraman, E.S., Lucito, R. & Wigler, M. Circular binary segmentation for the analysis of array-based DNA copy number data. Biostatistics 5, 557-72 (2004).
5. Alexandrov, L.B. et al. Signatures of mutational processes in human cancer. Nature 500, 415-21 (2013).
6. Leiserson, M.D., Wu, H.T., Vandin, F. & Raphael, B.J. CoMEt: a statistical approach to identify combinations of mutually exclusive alterations in cancer. Genome Biol 16, 160 (2015).
7. Tamborero, D., Gonzalez-Perez, A. & Lopez-Bigas, N. OncodriveCLUST: exploiting the positional clustering of somatic mutations to identify cancer genes. Bioinformatics 29, 2238-44 (2013).
8. Dees, N.D. et al. MuSiC: identifying mutational significance in cancer genomes. Genome Res 22, 1589-98 (2012).
9. Lawrence MS, Stojanov P, Mermel CH, Robinson JT, Garraway LA, Golub TR, Meyerson M, Gabriel SB, Lander ES, Getz G: Discovery and saturation analysis of cancer genes across 21 tumour types. Nature 2014, 505:495-501.
Expand All @@ -687,7 +679,7 @@ sessionInfo()
If you have any issues, bug reports or feature requests please feel free to raise an [issue](https://github.com/PoisonAlien/maftools/issues) on [GitHub](https://github.com/PoisonAlien/maftools) page.

## acknowledgements

* Thanks to [Shixiang Wang](https://github.com/ShixiangWang) fot many bug fixes, improvements, feature requests, and contribution to overall package maintenance
* Thanks to [Ryan Morin](https://github.com/rdmorin) for crucial bug fixes
* Thanks to [Peter Ellis](https://twitter.com/ellis2013nz) for beautiful [markdown template](http://ellisp.github.io/blog/2017/09/09/rmarkdown)
* `somaticInteractions` plot is inspired from the article [Combining gene mutation with gene expression data improves outcome prediction in myelodysplastic syndromes](https://www.nature.com/articles/ncomms6901). Thanks to authors for making source code available.

0 comments on commit 6d9b8bd

Please sign in to comment.