import.vcf: Import VCF file

View source: R/handle-vcf.R

import.vcfR Documentation

Import VCF file

Description

A wrapper for the VCF import function in the vcfR package that formats VCF data for PGS application with apply.polygenic.score().

Usage

import.vcf(vcf.path, info.fields = NULL, format.fields = NULL, verbose = FALSE)

Arguments

vcf.path

A character string indicating the path to the VCF file to be imported.

info.fields

A character vector indicating the INFO fields to be imported.

format.fields

A character vector indicating the FORMAT fields to be imported.

verbose

A logical indicating whether verbose output should be printed by vcfR.

Value

A list containing a tibble of VCF meta data and a tibble data.frame containing the parsed VCF data in long form.

Examples

# Example VCF
vcf <- system.file(
    'extdata',
    'HG001_GIAB.vcf.gz',
    package = 'ApplyPolygenicScore',
    mustWork = TRUE
    );
vcf.data <- import.vcf(vcf.path = vcf);

ApplyPolygenicScore documentation built on April 4, 2025, 12:18 a.m.