5 Star 26 Fork 5

王诗翔 / sigminer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.Rmd 11.70 KB
一键复制 编辑 原始数据 按行查看 历史
王诗翔 提交于 2022-05-12 12:47 . Add gitter
output
github_document
```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", warning = FALSE ) ``` # Sigminer: Mutational Signature Analysis and Visualization in R logo [![CRAN status](https://www.r-pkg.org/badges/version/sigminer)](https://cran.r-project.org/package=sigminer) [![lifecycle](https://img.shields.io/badge/lifecycle-stable-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![R-CMD-check](https://github.com/ShixiangWang/sigminer/workflows/R-CMD-check/badge.svg)](https://github.com/ShixiangWang/sigminer/actions) [![Coverage status](https://codecov.io/gh/ShixiangWang/sigminer/branch/master/graph/badge.svg)](https://codecov.io/github/ShixiangWang/sigminer?branch=master) [![](https://cranlogs.r-pkg.org/badges/grand-total/sigminer?color=orange)](https://cran.r-project.org/package=sigminer) [![Closed issues](https://img.shields.io/github/issues-closed/ShixiangWang/sigminer.svg)](https://github.com/ShixiangWang/sigminer/issues?q=is%3Aissue+is%3Aclosed) [![Lines Of Code](https://tokei.rs/b1/github/ShixiangWang/sigminer?category=code)](https://github.com/ShixiangWang/sigminer) [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FShixiangWang%2Fsigminer&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com) ![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square) [![check in Biotreasury](https://img.shields.io/badge/Biotreasury-collected-brightgreen)](https://biotreasury.rjmart.cn/#/tool?id=10043) [![Gitter](https://badges.gitter.im/ShixiangWang/community.svg)](https://gitter.im/ShixiangWang/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) ## :bar_chart: Overview The cancer genome is shaped by various mutational processes over its lifetime, stemming from exogenous and cell-intrinsic DNA damage, and error-prone DNA replication, leaving behind characteristic mutational spectra, termed **mutational signatures**. This package, **sigminer**, helps users to extract, analyze and visualize signatures from genome alteration records, thus providing new insight into cancer study. For pipeline tool, please see its co-evolutionary CLI [sigflow](https://github.com/ShixiangWang/sigflow). **SBS signatures**: ```{r, fig.width=12, fig.height=5, echo=FALSE, message=FALSE} library(sigminer) load(system.file("extdata", "toy_mutational_signature.RData", package = "sigminer", mustWork = TRUE )) # Show signature profile p1 % as.matrix(), mode = "DBS", style = "cosmic", check_sig_names = FALSE) p3 ``` **INDEL (i.e. ID) signatures**: ```{r fig.width=12, fig.height=5, echo=FALSE} ID = system.file("extdata", "ID_signatures.rds", package = "sigminer", mustWork = TRUE) ID = readRDS(ID) # Show signature profile p4 % as.matrix(), mode = "ID", style = "cosmic", check_sig_names = FALSE) p4 ``` **Genome rearrangement signatures**: ```{r fig.width=10, fig.height=5, echo=FALSE, message=FALSE} p5 . All functions are well organized and documented at . For usage of a specific function `fun`, run `?fun` in your R console to see its documentation. ## :paperclip: Citation If you use **sigminer** in academic field, please cite one of the following papers. ------------------------------------------------------------------------ - ***Wang S, Li H, Song M, Tao Z, Wu T, He Z, et al. (2021) Copy number signature analysis tool and its application in prostate cancer reveals distinct mutational processes and clinical outcomes. PLoS Genet 17(5): e1009557.*** - ***Shixiang Wang, Ziyu Tao, Tao Wu, Xue-Song Liu, Sigflow: An Automated And Comprehensive Pipeline For Cancer Genome Mutational Signature Analysis, Bioinformatics, btaa895***. ------------------------------------------------------------------------ ## :arrow_down: Download Stats ```{r, echo=FALSE, warning=FALSE, message=FALSE, dpi=300} library("ggplot2") library("cranlogs") library("dplyr") library("spiralize") library("ComplexHeatmap") library("lubridate") df 0])) df$diff = log2(df$count/year_mean[as.character(lubridate::year(df$date))]) df$diff[is.infinite(df$diff)] = 0 q = quantile(abs(df$diff), 0.99) # adjust outliers df$diff[df$diff > q] = q df$diff[df$diff < -q] = -q spiral_initialize_by_time(xlim = range(df[, 1]), padding = unit(2, "cm"), verbose = FALSE) spiral_track(height = 0.8) spiral_horizon(df$date, df$diff, use_bars = TRUE) spiral_highlight("start", "2019-12-31", type = "line", gp = gpar(col = 1)) spiral_highlight("2020-01-01", "2020-12-31", type = "line", gp = gpar(col = 2)) spiral_highlight("2021-01-01", "2021-12-31", type = "line", gp = gpar(col = 3)) spiral_highlight("2022-01-01", "end", type = "line", gp = gpar(col = 4)) s = current_spiral() d = seq(15, 360, by = 30) %% 360 for(i in seq_along(d)) { foo = polar_to_cartesian(d[i]/180*pi, (s$max_radius + 1)*1.05) grid.text(month.name[i], x = foo[1, 1], y = foo[1, 2], default.unit = "native", rot = ifelse(d[i] > 0 & d[i] < 180, d[i] - 90, d[i] + 90), gp = gpar(fontsize = 10)) } lgd = packLegend( Legend(title = "Difference to\nyearly average", at = c("higher", "lower"), legend_gp = gpar(fill = c("#D73027", "#313695"))), Legend(title = "Year", type = "lines", at = 2019:2022, legend_gp = gpar(col = 1:4)) ) draw(lgd, x = unit(1, "npc") + unit(10, "mm"), just = "left") } ``` ## :page_with_curl: References Please properly cite the following references when you are using any corresponding features. The references are also listed in the function documentation. Very thanks to the works, **sigminer** cannot be created without the giants. 1. Mayakonda, Anand, et al. "Maftools: efficient and comprehensive analysis of somatic variants in cancer." Genome research 28.11 (2018): 1747-1756. 2. Gaujoux, Renaud, and Cathal Seoighe. "A Flexible R Package for Nonnegative Matrix Factorization."" BMC Bioinformatics 11, no. 1 (December 2010). 3. H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016. 4. Kim, Jaegil, et al. "Somatic ERCC2 mutations are associated with a distinct genomic signature in urothelial tumors." Nature genetics 48.6 (2016): 600. 5. Alexandrov, Ludmil B., et al. "Deciphering signatures of mutational processes operative in human cancer." Cell reports 3.1 (2013): 246-259. 6. Degasperi, Andrea, et al. "A practical framework and online tool for mutational signature analyses show intertissue variation and driver dependencies." Nature cancer 1.2 (2020): 249-263. 7. Alexandrov, Ludmil B., et al. "The repertoire of mutational signatures in human cancer." Nature 578.7793 (2020): 94-101. 8. Macintyre, Geoff, et al. "Copy number signatures and mutational processes in ovarian carcinoma." Nature genetics 50.9 (2018): 1262. 9. Tan, Vincent YF, and Cédric Févotte. "Automatic relevance determination in nonnegative matrix factorization with the/spl beta/-divergence." IEEE Transactions on Pattern Analysis and Machine Intelligence 35.7 (2012): 1592-1605. 10. Bergstrom EN, Huang MN, Mahto U, Barnes M, Stratton MR, Rozen SG, Alexandrov LB: SigProfilerMatrixGenerator: a tool for visualizing and exploring patterns of small mutational events. BMC Genomics 2019, 20:685 ## :page_facing_up: LICENSE The software is made available for non commercial research purposes only under the [MIT](https://github.com/ShixiangWang/sigminer/blob/master/LICENSE.md). However, notwithstanding any provision of the MIT License, the software currently may not be used for commercial purposes without explicit written permission after contacting patents' authors. Related patents: - [CN202011516653.7](https://kms.shanghaitech.edu.cn/handle/2MSLDSTB/127042) MIT © 2019-Present Shixiang Wang, Xue-Song Liu MIT © 2018 Anand Mayakonda ------------------------------------------------------------------------ Sigminer v1-v2 are supported by [**Cancer Biology Group**](https://github.com/XSLiuLab) **\@ShanghaiTech** ![Alt](https://repobeats.axiom.co/api/embed/7cd2cf8a196dde9d8d1e13c9b23bc2f157d8254e.svg "Repobeats analytics image")
R
1
https://gitee.com/ShixiangWang/sigminer.git
git@gitee.com:ShixiangWang/sigminer.git
ShixiangWang
sigminer
sigminer
master

搜索帮助