variantsFromVcf: Extract relevant variant info for extracting SNV, indel, and...

View source: R/variantsFromVcf.R

variantsFromVcfR Documentation

Extract relevant variant info for extracting SNV, indel, and SV signatures.

Description

Extract relevant variant info for extracting SNV, indel, and SV signatures.

Usage

variantsFromVcf(
  vcf.file,
  vcf.filter = NA,
  vcf.fields = c("CHROM", "POS", "REF", "ALT", "FILTER"),
  keep.chroms = NULL,
  chrom.name.style = "UCSC",
  merge.consecutive = F,
  verbose = F
)

Arguments

vcf.file

Path to the vcf file

vcf.filter

A character or character vector to specifying which variants to keep, corresponding to the values in the vcf FILTER column

vcf.fields

A character vector specifying the vcf columns to retrieve

keep.chroms

A character vector specifying which chromosomes to keep (chromosome names should be in the style of the vcf). To keep autosomal and sex chromosomes for example use: keep.chroms=c(1:22,'X','Y')

chrom.name.style

A string indicating the chromosome naming style. This can be for example 'UCSC' ('chrX') or 'NCBI' ('X'). See the documentation for 'GenomeInfoDb::seqlevelsStyle()' for more details.

merge.consecutive

Some vcfs report MNVs as consecutive variants. For these vcfs, such rows need to be merged into one row for proper function of downstream mutSigExtractor functions.

verbose

Print progress messages?

Value

A data frame with each vcf field as a column


UMCUGenetics/mutSigExtractor documentation built on Aug. 30, 2024, 2:12 p.m.