@description This function generates mutations in a set of genes given the 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 variants Matrix of type character; needs to contain columns
Chrom for chromosomes, Pos for substitution position,
Ref for reference allele, Mut for alternative allele, and
Sample for sample names.
@param genome BSgenome object with relevant genome built.
@param txdb 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 current_source seqSource argument for [predictCoding](http://127.0.0.1:11491/help/library/VariantAnnotation/help/predictCoding)
annotation function. Default is "Hsapiens".
@details Modifies the matrix with variants and makes it suitable for annotation using [predictCoding](http://127.0.0.1:11491/help/library/VariantAnnotation/help/predictCoding)
function. Returns a matrix with additional column - Effect - which contains
the prediction (unknown, synonymous, non-synonymous, or nonsense).
@examples
library(BSgenome.Hsapiens.UCSC.hg19)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
genome <- BSgenome.Hsapiens.UCSC.hg19
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
variants <- as.matrix(data.frame(Sample = c('T1','T2'),
Chrom = c('chr2','chr2'),
Pos = c(1764958, 19845736),
Ref = c('A', 'G'),
Mut = c('T', 'A')))
annotate_simulated_variants(variants, txdb, genome)
1 2 | annotate_simulated_variants(variants, txdb, genome,
current_source = Hsapiens)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.