helperMut provides basic functionalities and helper functions to work with mutational and genomic data in R. It builds up on pre-existing tools from bioc to set up a framework for analysis. I mostly use it for my work in cancer genomics but in principle any other field working in mutations or population diversity could be used.
In order to install the package use:
## If still private, make sure that there is a enviroment variable (.Renviron)
## with the token (PAT). The name of the variable should be GITHUB_PAT
remotes::install_github("davidmasp/helpermut@develop")
You need to first install the remotes
mutations = c("TCA>T","TGA>A")
simplify_muts(mutations)
#> [1] "TCA>T" "TCA>T"
# generate 3 random sigs
set.seed(42)
de_novo_sig = runif(n = 96*3,min = 0,max = 1)
de_novo_sig = matrix(de_novo_sig, ncol = 3)
rownames(de_novo_sig) = generate_mut_types(k = 1)
colnames(de_novo_sig) = LETTERS[1:3]
cosmic_sigs = download_signature_set(version = "v2")
res = compare_signature_sets(x = de_novo_sig,y = cosmic_sigs)
heatmap(res)
The standard colors used for mutational profiles in papers are available as a variable.
tr_colors
#> C>G C>A C>T A>T A>G A>C
#> "#000000" "#00ceff" "#ff2926" "#c9c9c9" "#95d230" "#ffbebe"
tr_colors_ct = tr_colors
names(tr_colors_ct) = simplify_muts(names(tr_colors_ct),
simplify_set = c("C","T"))
tr_colors_ct
#> C>G C>A C>T T>A T>C T>G
#> "#000000" "#00ceff" "#ff2926" "#c9c9c9" "#95d230" "#ffbebe"
Some functionalities implemented in this packages are also available in other packages from bioconductor. Hopefully, the current implementation in this package will have an added value to the user.
- SomaticSignatures It extracts Mutation Subtype information from VCFs (restricted to a defined ctx). It also performs NMF/PCA signature extraction which is not covered in helperMut.
- MutationalPatterns Same as somaticSignatures.
- YAPSA Yet Another Package for Signature Analysis
- signature.tools.lib
If you want to contribute to the package, please fork the repo and submit a PR. Currently the package is under development so no features are explicitily requested.