Calculate log bayes factors for each hypothesis (SuSIE - multiple causal variant assumption)
cophe.susie.lbf(
dataset,
querysnpid,
querytrait,
switch = TRUE,
susie.args = list(),
MAF = NULL
)
a list with specifically named elements defining the query trait dataset to be analysed.
Id of the query variant, (id in dataset$snp)
Query trait name
Set switch=TRUE to obtain single BF when credible sets not found with SuSIE
a named list of additional arguments to be passed to runsusie
Minor allele frequency vector
data frame with log bayes factors for Hn and Ha hypotheses
library(cophescan)
data(cophe_multi_trait_data)
query_trait_1 <- cophe_multi_trait_data$summ_stat[['Trait_1']]
query_trait_1$LD <- cophe_multi_trait_data$LD
querysnpid <- cophe_multi_trait_data$querysnpid
res.susie.lbf <- cophe.susie.lbf(query_trait_1, querysnpid = querysnpid,
querytrait='Trait_1', switch=T)
#> running max iterations: 100
#> converged: TRUE
res.susie.lbf
#> lBF.Ha lBF.Hc nsnps querysnp querytrait hit1
#> 1: 15.31003 11.95277 1000 chr19-11182353 Trait_1 chr19-11182353
#> hit2 typeBF idx1 idx2
#> 1: chr19-11182144 susieBF 1 1