read_vcf: Read VCF Files as MAF Object

View source: R/read_vcf.R

read_vcfR Documentation

Read VCF Files as MAF Object

Description

MAF file is more recommended. In this function, we will mimic the MAF object from the key c(1, 2, 4, 5, 7) columns of VCF file.

Usage

read_vcf(
  vcfs,
  samples = NULL,
  genome_build = c("hg19", "hg38", "T2T", "mm10", "mm9", "ce11"),
  keep_only_pass = FALSE,
  verbose = TRUE
)

Arguments

vcfs

VCF file paths.

samples

sample names for VCF files.

genome_build

genome build version like "hg19".

keep_only_pass

if TRUE, keep only 'PASS' mutation for analysis.

verbose

if TRUE, print extra info.

Value

a MAF.

See Also

read_maf, read_copynumber

Examples

vcfs <- list.files(system.file("extdata", package = "sigminer"), "*.vcf", full.names = TRUE)

maf <- read_vcf(vcfs)
maf <- read_vcf(vcfs, keep_only_pass = TRUE)


sigminer documentation built on May 29, 2024, 3:11 a.m.