pgs: This is to enable S3 parsing by the second argument

Description Usage Arguments Details Value Note

View source: R/pgs.R

Description

This is to enable S3 parsing by the second argument

Computes polygenic scores as a genotype matrix multiplied by a matrix of weights

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
pgs(bfile, weights, ...)

.pgs(...)

## Default S3 method:
.pgs(
  weights,
  bfile,
  keep = NULL,
  extract = NULL,
  exclude = NULL,
  remove = NULL,
  chr = NULL,
  cluster = NULL,
  trace = 0,
  sparse = TRUE
)

Arguments

bfile

A plink bfile stem

weights

The weights for the SNPs (β)

keep

samples to keep (see parseselect)

extract

SNPs to extract (see parseselect)

exclude

SNPs to exclude (see parseselect)

remove

samples to remove (see parseselect)

chr

a vector of chromosomes

cluster

A cluster object from the parallel package. For parallel processing.

trace

Level of output

sparse

Assumes sparse weights matrix

Details

A function to calculate where X is the genotype matrix in the plink bfile.

Value

A matrix of Polygenic Scores

Note


yingxi-kaylee/ssCTPR documentation built on Nov. 14, 2021, 5:24 a.m.