Learn R Programming

customProDB (version 1.12.0)

InputVcf: Generate a list of GRanges objects from a VCF file.

Description

The InputVcf() function generates a list of GRanges object from a single VCF file.

Usage

InputVcf(vcfFile, ...)

Arguments

vcfFile
a character contains the path and name of a VCF file
...
additional arguments

Value

a list of GRanges object containing a representation of data from the VCF file

Details

Read all fields in a VCF file into GRanges object.

Examples

Run this code
## multiple samples in one VCF file

vcffile <- system.file("extdata", "test_mul.vcf", package="customProDB")
vcfs <- InputVcf(vcffile)
length(vcfs)

## single sample

vcffile <- system.file("extdata/vcfs", "test1.vcf", package="customProDB")
vcf <- InputVcf(vcffile)
length(vcf)

Run the code above in your browser using DataLab