excerno_vcf | R Documentation |
excerno_vcf() produces filtered vcf files. It uses NMF or nonnegative linear combination of mutation signatures to determine contribution of signatures in samples. Then Bayes' Theroem is used to classify each variant.
excerno_vcf(files, method = "nmf", num.signatures = 2, target.sigs = c())
files |
VCF files |
method |
A string. The method used to determine the signatures (if not given) and calculate the contributions of each signature |
num.signatures |
Number of signatures. Necessary arugment for when method "linear" is choosen. |
target.sig |
Matrix of the target signatures.Necessary arugment for when method "linear" is choosen. |
Object containing the vcf objects and classification data frame
library(MutationalPatterns) library(tidyverse) library(vcfR) library(Biostrings) library(BSgenome.Hsapiens.UCSC.hg38) library(R.utils) # Load in correct signatures cosmic.sigs <- get_known_signatures() cosmic.sig4 <- as.matrix(cosmic.sigs[, 4]) ffpe.sig <- get_ffpe_signature() # Load in files files <- list.files( system.file("extdata", package = "excerno"), pattern = "SIMULATED_SAMPLE_SBS4_\\d.vcf", full.names = TRUE) # Using nmf excerno_vcf(files) excerno_vcf(files, num.signatures = 3) # Using linear method target.sigs <- matrix(nrow = 96, ncol = 2) target.sigs[,1] <- cosmic.sig4 target.sigs[,2] <- ffpe.sig rownames(target.sigs) <- get_mutation_types() colnames(target.sigs) <- c("SBS4", "FFPE") excerno_vcf(files, "linear", 2, target.sigs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.