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

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.