View source: R/get_mutational_vector.R
| get_mutational_vector | R Documentation |
Get the mutational vector from a vcf file
get_mutational_vector(vcf.file) get_mutational_vectors(vcf.files)
vcf.data |
The name of the vcf file |
A vector of mutation strings
library(MutationalPatterns)
library(tidyverse)
library(vcfR)
library(Biostrings)
library(BSgenome.Hsapiens.UCSC.hg38)
# Load file for testing
file <- system.file("extdata", "SIMULATED_SAMPLE_SBS4_1.vcf", package = "excerno")
# Load in correct output
cosmic.sigs <- get_known_signatures()
cosmic.sig4 <- as.matrix(cosmic.sigs[, 4])
ffpe.sig <- get_ffpe_signature()
sample.ffpe <- create_signature_sample_vector(ffpe.sig, 500)
sample.sig4 <- create_signature_sample_vector(cosmic.sig4, 500)
test.vector <- c(sample.ffpe, sample.sig4)
vcf.vector <- get_mutational_vector(file)
# Load files for inputing multiple vcfR objects
vcf.files <- list.files(
system.file("extdata", package = "excerno"),
pattern = "SIMULATED_SAMPLE_SBS4_\\d.vcf", full.names = TRUE)
sample.vectors <- get_mutational_vectors(vcf.files)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.