Learn R Programming

ApplyPolygenicScore (version 4.0.1)

import.pgs.weight.file: 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)

Value

A list containing the file metadata and the weight data.

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.

Examples

Run this code
# 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);

Run the code above in your browser using DataLab