shaPRS_blend_overlap: Blended shaPRS (with overlapping datasets): produce summary...

View source: R/shaPRS.R

shaPRS_blend_overlapR Documentation

Blended shaPRS (with overlapping datasets): produce summary statistics according to a continuous weighting scheme

Description

This function continuously blends the two sub-phenotype statistics and generates an LDPred formatted table.

Usage

shaPRS_blend_overlap(
  proximal,
  adjunct,
  blendingFactors,
  rho = 0,
  discardAmbiguousSNPs = T
)

Arguments

proximal

Proximal LDPred formatted GWAS summary statistics table that has header with the following columns: chr pos SNP A1 A2 Freq1.Hapmap b se p N

adjunct

dataframe for adjunct dataset of the same signature

blendingFactors

a 3 column table of: SNP lFDR Qval, (produced by shaPRS_adjust)

rho

(optional) sample overlap between studies

discardAmbiguousSNPs

(optional) if ambiguous SNPs (G/C and A/T) should be discarded (default TRUE)

Value

returns an LDPred formatted summary statistics table

Examples

proximalLoc <- system.file("extdata", "phenoA_sumstats", package = "shaPRS")
adjunctLoc <- system.file("extdata", "phenoB_sumstats", package = "shaPRS")
blendFactorLoc <- system.file("extdata", "myOutput_SNP_lFDR", package = "shaPRS")
proximal= read.table(proximalLoc, header = TRUE)
adjunct= read.table(adjunctLoc, header = TRUE)
blendingFactors= read.table(blendFactorLoc, header = TRUE)
blendedSumstats = shaPRS_blend_overlap(proximal, adjunct, blendingFactors)


mkelcb/shaprs documentation built on Feb. 7, 2023, 7:16 p.m.