readVcfFiles: Read VCF files

Description Usage Arguments Value Author(s) Examples

View source: R/readVcfFiles.R

Description

This function takes in input a (list of) VCF file name(s), reads and process them by setting UCSC style and allowed chromosome names.

Usage

1
readVcfFiles(vcfFiles, assembly)

Arguments

vcfFiles

list of one or more character strings corresponding to the vcf file names. Each element of the list should be named with the sample name. If no name is provided, the .vcf file name will be used.

assembly

human genome assembly: hg19 or hg38

Value

a (list of) CollapsedVCF object(s) containing variants

Author(s)

Laura Fancello

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Read in input name of vcf files (provide them as a list even if you only have
# one file)
vcf_files <- list(Horizon5="Horizon5_ExamplePanel.vcf", 
                  HorizonFFPEmild="HorizonFFPEmild_ExamplePanel.vcf")
                  
# For each vcf file, get the absolute path
vcf_files <- lapply(vcf_files,
                    function(x) system.file("extdata", x, package = "TMBleR", mustWork = TRUE))

# Read in the files
vcfs <- readVcfFiles(vcfFiles = vcf_files, assembly = "hg19")

acc-bioinfo/TMBleR documentation built on Dec. 18, 2021, 10:21 p.m.