generate_mutations: Generating base substitutions based on silent mutation rate

Description Usage

Description

This function generates mutations in a set of genes given the mutation probabilities for a particular process, total number of mutations in samples, numbers of silent mutations per gene and total numbers of silent mutations per sample. Mutations are annotated, and numbers of silent and non-silent mutations calculated per iteration. @param geneset A vector of characters containing a set of gene names in HUGO Symbols (http://www.genenames.org/) @param mutations Matrix with mutations; may be any format, but needs to contain columns 'Chrom' for chromosomes, 'Pos' for substitution position, 'Ref' for reference allele, 'Mut' for alternative allele, and 'Sample' for sample names. If it contains 'Effect' column, the effects will be taken from there, with silent mutations looking for 'silent' or 'synonymous' entry, otherwise an initial annotation will be generated. @param signature Numeric vector of 96 probabilities for mutations of 6 types in 16 contexts. @param N Integer, number of iterations for simulations. Default is 100. @param genome BSgenome object with relevant genome built. @param transcripts A [TxDb](http://127.0.0.1:11491/help/library/GenomicFeatures/html/TxDb.html) object which serves as the annotation for distinguishing synonymous and non-synonymous variants. @param samples Names of samples to generate mutations for. @param all_silent Number of silent mutations in the dataset. @param silent_mutations_per_gene Single numeric value, or a named vector of numbers reflecting expected number of silent mutations per gene. Same length as geneset. @param total_mutations Single numeric value, or a named vector of numbers reflecting expected total number of mutations per sample. Same length as samples. @param targets Genomic ranges reflecting the sequencing regions. @details Mutations are generated per gene according to a Poisson process with the following expected value: $λ = silent_{i} \frac{∑_{k in G} silent_{G}}{∑_{j in S} silent_{j}} ≤ft( \frac{silent_{i} + nonsilent_{i}}{silent_{i}} \right). The mutational process is adjusted to trinucleotide frequencies in the exons of the genes under consideration. @return variants A list of N matrices with variants generated for the geneset per simulation. @return silent Number of silent mutations generated in the geneset per simulation. @return nonsilent Number of non-silent mutations generated in the geneset per simulation. @examples library(BSgenome.Hsapiens.UCSC.hg19) library(TxDb.Hsapiens.UCSC.hg19.knownGene) txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene genome <- BSgenome.Hsapiens.UCSC.hg19 data(sample_cancer_mutations) res <- generate_mutations(geneset = c('TP53','BRAF'), mutations = mutations, signature = rep(1/96,96), N = 100, type='exome',genome=genome,trascripts=txdb)

generate_mutations()

Usage

1
2
3
4
generate_mutations(geneset = NULL, N = 100, samples = NULL,
  all_silent = NULL, silent_mutations_per_gene = NULL,
  total_mutations = NULL, signature = NULL, genome = NULL,
  transcripts = NULL, targets = NULL)

nvolkova/MutSim documentation built on May 15, 2019, 4:48 p.m.