import.pgs.weight.file {ApplyPolygenicScore}R Documentation

Import PGS weight file

Description

Import a PGS weight file formatted according to PGS catalog guidelines, and prepare for PGS application with apply.polygenic.score().

Usage

import.pgs.weight.file(pgs.weight.path, use.harmonized.data = TRUE)

Arguments

pgs.weight.path

A character string indicating the path to the pgs weight file.

use.harmonized.data

A logical indicating whether the file should be formatted to indicate harmonized data columns for use in future PGS application.

Value

A list containing the file metadata and the weight data.

Examples

# Example pgs weight file
pgs.weight.path <- system.file(
    'extdata',
    'PGS000662_hmPOS_GRCh38.txt.gz',
    package = 'ApplyPolygenicScore',
    mustWork = TRUE
    );
import.pgs.weight.file(pgs.weight.path);

# Note, harmonized data is used by default. To disable set `use.harmonized.data = FALSE`
import.pgs.weight.file(pgs.weight.path, use.harmonized.data = FALSE);

[Package ApplyPolygenicScore version 3.0.1 Index]