% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shaPRS.R
\name{shaPRS_blend_overlap}
\alias{shaPRS_blend_overlap}
\title{Blended shaPRS (with overlapping datasets): produce summary statistics according to a continuous weighting scheme}
\usage{
shaPRS_blend_overlap(
proximal,
adjunct,
blendingFactors,
rho = 0,
discardAmbiguousSNPs = T
)
}
\arguments{
\item{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}
\item{adjunct}{dataframe for adjunct dataset of the same signature}
\item{blendingFactors}{a 3 column table of: SNP lFDR Qval, (produced by shaPRS_adjust)}
\item{rho}{(optional) sample overlap between studies}
\item{discardAmbiguousSNPs}{(optional) if ambiguous SNPs (G/C and A/T) should be discarded (default TRUE)}
}
\value{
returns an LDPred formatted summary statistics table
}
\description{
This function continuously blends the two sub-phenotype statistics
and generates an LDPred formatted 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)
}