Skip to content

laurie-tonon/mutcraft

 
 

Repository files navigation

Getting started

Mutcraft is a package of functions to read somatic mutation information from VCF files and visualize spectra, rainplots, strand bias and mutational signatures.

Installation

library(mutcraft)

Reference genome

In order to extract mutation contexts and mutation strands you need to load a reference genome

library(BSgenome)
ref_genome = "BSgenome.Hsapiens.NCBI.GRCh37"
library(ref_genome, character.only = T)

Load files

my.files <- list.files(system.file("extdata", package="mutcraft"),
                          pattern = ".vcf", full.names = TRUE)
s.names <- c("sample1", "sample2")
mutnet <- mc.loadVcfs(my.files, s.names, ref.genome=ref_genome)
#> [1] "Loading VCFs files ..."

Mutation Spectrum

mutspec <- lapply(mutnet,mc.mutSpectrum,"ref.allele","alt.allele")
mc.plotSpectrum(mutspec,"prop",print.num=F)

Spider Spectrum

mc.plotSpider(mutspec)

Add mutations context

mut.c <- lapply(mutnet, mc.mutContext, ref_genome)

Plot context histogram

mc.plotContext(mut.c)

Rainfall plots

mutrain <- lapply(mutnet, mc.mutRain, "chrom","pos", "ref.allele","alt.allele")
mc.plotRain(mutrain[[1]], chrom.to.plot = c(1))

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%