project_basis: This function projects an aligned trait onto the basis...

Description Usage Arguments Value

View source: R/cupfunc.R

Description

This function projects an aligned trait onto the basis project_basis projects an external trait into basis space

Usage

1
2
3
4
5
6
7
project_basis(
  gwas.DT,
  shrink.DT,
  pc,
  traitname = "test_trait",
  apply.shrinkage = TRUE
)

Arguments

gwas.DT

data.table object representing summary statistics from external GWAS with columns as defined in get_gwas_data

shrink.DT

data.table object of matching shrinkage estimates returned by compute_shrinkage_metrics

pc

prcomp object returned by create_basis

traitname

character label for this trait defaults to 'test_trait'

apply.shrinkage

- boolean value on whether to apply shrinkage prior to projection.

Value

a matrix of PC scores for the projection.


ollyburren/cupcake documentation built on July 30, 2020, 9:58 a.m.