All functions

AutocorrelationPlot()

Autocorrelation plot for model selection. Model inclusion of each predictor is represented across all iterations as a black and white heatmap.

CredibleSet()

Infer credible sets of predictors

FLASHFMZEROwithJAMd()

Wrapper for flashfm Multi-Trait Fine-Mapping with JAM (when trait correlation is zero) - this is the dynamic number of max causal variant version

FLASHFMwithFINEMAP()

Wrapper to run single-trait fine-mapping with FINEMAP on each trait, followed by flashfm and then constuct SNP groups for each approach and summarises results

FLASHFMwithJAM()

Wrapper to run single-trait fine-mapping with JAMexpandedCor.multi on each trait, followed by flashfm and then constuct SNP groups for each approach and summarises results

FLASHFMwithJAMd()

Wrapper for flashfm Multi-Trait Fine-Mapping with JAM - this is the dynamic number of max causal variant version

FLASHFMwithJAMhat()

Wrapper to run single-trait fine-mapping with JAMexpandedCor.multi on each trait, followed by flashfm (using fast approximation version) and then constuct SNP groups for each approach and summarises results

FMconfig

List of FINEMAP config file contents for two simulated traits

GetBetaBinomMuSd()

Derives the beta-binomial mean and standard deviation

GetBetaBinomParams()

Derives the beta-binomial parameters for target mean and standard deviation

JAM()

JAM (Joint Analysis of Marginal statistics)

JAMPred()

JAMPred

JAMPred_ParallelBlockIndices()

List of which LD blocks are to be analysed on which CPU core

JAMPred_SplitIntoPositiveDefiniteBlocks()

Splits a list of SNPs into positive definite blocks.

JAM_LogisticToLinearEffects()

Logistic to linear effect conversion for JAM

JAM_PointEstimates() JAM_PosteriorSampler()

JAM (Joint Analysis of Marginal statistics) multivariate point estimator.

JAM_PointEstimates_Xcov()

internal function for multibeta, modified from JAM_PointEstimates_Package_Simplified of R2BGLiMS package

JAM_PointEstimates_updated()

internal function for multibeta, modified from JAM_PointEstimates_Package_Simplified of R2BGLiMS package (Paul Newcombe)

JAM_RankCheck()

JAM rank check.

JAMdwithGroups()

Wrapper for JAMdynamic single-trait fine-mapping that also outputs SNP groups; PP and credible sets include SNP group information

JAMdynamic()

Expanded version of JAM (a single-trait fine-mapping approach) that first runs on thinned SNPs and then expands models on tag SNPs This version starts at a low upper bound for max causal variants and decides on max upper bound based on data

JAMexpandedCor.multi()

Expanded version of JAM (a single-trait fine-mapping approach) that first runs on thinned SNPs and then expands models on tag SNPs; this can run independently on multiple traits

JAMexpandedCor.multi2()

Expanded version of JAM (a single-trait fine-mapping approach) that first runs on thinned SNPs and then expands models on tag SNPs; this can run independently on multiple traits This version is more stable than JAMexpandedCor.multi, but slower, so is run only if JAMexpandedCor.multi fails

ManhattanPlot()

Manhattan Plot

ModelSizeBayesFactors()

Infer credible sets of predictors

Neff()

Approximate effective sample size from GWAS of related samples

NormInvGamPosteriorSample()

Generate conjugate posterior sample of coefficients for a particular linear model.

PPsummarise()

Summarise PP and MPP results from single-trait fine-mapping and flashfm, by SNP and by SNP group

PrettyResultsTable()

A pretty summary results table for reports. NOTE: This function outputs a table formatted with character strings. A numeric representation of the results are stored in the slot 'posterior.summary.table'.

R2BGLiMS()

Call BGLiMS from R

R2BGLiMS_Results-class R2BGLiMS_Results,R2BGLiMS_Results-class

The R2BGLiMS_Results class

show(<R2BGLiMS_Results>)

'show' method for R2BGLiMS-R2BGLiMS_Results-class objects

SMIM1.N

Sample size for the subset of the INTERVAL data that has no missing trait measurements Original INTERVAL GWAS data are available in Astle et al. (2016) and Akbari et al. (2023)

SMIM1.corX

SNP correlation matrix for the subset of the INTERVAL data that has no missing trait measurements Original INTERVAL GWAS data are available in Astle et al. (2016) and Akbari et al. (2023)

SMIM1.gwas.list.interval.fa25

GWAS data for three latent traits from a subset of the INTERVAL data that has no missing trait measurements This is a list of three latent trait GWAS data.frames, where each data.frame has columns rsID, beta, EAF, P_value These latent traits (ML4, ML12, ML14) are all related to red blood cell traits and our analyses suggest that rs1175550 is the causal variant for all three traits, which is in agreement with UKBB fine-mapping (Vuckovic et al. 2020) previous studies (Cvejic et al. 2013) Original INTERVAL GWAS data are available in Astle et al. (2016) and Akbari et al. (2023)

StrongestPairwiseCorrelation()

Strongest Pairwise Correlation

Sxy.hat()

estimates cross-product of each SNP with one trait

TopModels()

Table of top models

TracePlots()

Parameter posterior trace plots for a R2BGLiMS results object

Vres.all()

variance of model residuals for trait T1 at all models that have joint effect estimates

Vres.hat()

variance of model residuals for trait T1 at model index imod

Vx.hat()

Internal function, Vx.hat

snps() tags()

Accessors for groups objects

allC12()

internal function for calcAdjPP for that gives list of covariance matrix of residuals for all trait pairs

allcredsets()

Construct a credible set for each trait and under each of single and multi-trait fine-mapping

allcredsetsPP()

Construct a credible set for each trait and under each of single and multi-trait fine-mapping, and provide SNP PP details

best.models.cpp()

Best models from a snpmpd object by cpp or maximum number of models - modification of best.models from GUESSFM by Chris Wallace

best.snps()

Best SNPs

calc.maxmin()

calculate max or min of subset of a matrix

calcABF()

Calculate approximate Bayes' factor (ABF)

calcAdjPP()

Calculates trait-adjusted posterior probabilities for all traits at sharing parameter kappa

calcCres12()

covariance between residuals of a pair of models for a trait pair

calcD12()

internal function for calcAdjPP for the 2-trait case

calcDcon()

internal function for calcAdjPP that gives constant term for delta

calcQ12()

internal function for calcAdjPP for a pair of traits

convert()

Convert from old definitions of groups, tags classes to new

cor.refdata.fn()

Thin genotype correlation matrix for JAM input

cor2cov()

Correlation Matrix to Covariance Matrix Conversion

credset()

Construct a credible set for a trait

.ApproxPostProbsByModelEnumeration()

Enumertated approximate posterior probabilities

.BayesFactor()

Calculates a Bayes Facotor, give a prior and posterior probabilities.

.BetaBinomialProbabilitySpecificModel()

Calculates a Beta-Binomial prior probability for a SPECIFIC model. From Bottolo et al. This is not the prior on a particular dimension (that would required the binomial co-efficient).

.ConfounderAdjustedResiduals()

Replaces the outcome variable with residuals from a linear regression on the confounders. I.e. removes effect of confounders for the conjugate models.

.ModelSpaceProbs()

Calculates prior probababilities for x, and >=x causal variables, when a truncated Poisson prior is used for model space

.ModelSpaceSpecProb()

Calculates prior probabability of causality for a particular variable, when a Poisson prior is used for model space

.ReadData()

Read formatted data file

.ReweightSnpEffectsAccordingToBlockCorrelations()

This function is used by JAMPred_Step2AdjustmentAndPredictions

.WriteData()

Write Java MCMC format data file

expand.mod()

internal function for expanding models by tag SNPs in JAMexpanded.multi

finemap()

Wrapper to run FINEMAP (Benner et al. 2016) in R

flashfm()

Marginal PP for models of a set of traits, sharing information between the traits

flashfm.input()

Key input for flashfm - constructs snpmod object list and joint effect estimates list for all trait if have external single trait fine-mapping results

flashfmZero()

Marginal PP for models of a set of traits, sharing information between the traits, when trait correlation is zero

flashfmZero.input()

Key input for flashfm - constructs snpmod object list and joint effect estimates list for all trait if have external single trait fine-mapping results, when trait correlation is zero

groupIDs.fn()

Find SNP group ids for a set of SNPs

groupmulti()

Group SNPs; adapted from group.multi by Chris Wallace

groupmultiU()

Group SNPs; adapted from group.multi by Chris Wallace

groups-class

Group focused class for holding information about sets of SNPs defined by their mutual LD

tagsof() taggedby() `[`(<groups>,<character>,<missing>,<missing>) `[`(<groups>,<numeric>,<missing>,<missing>) `[`(<groups>,<logical>,<missing>,<missing>) `[`(<tags>,<character>,<missing>,<missing>) `[[`(<groups>,<numeric>) `[[`(<groups>,<logical>) `[[`(<groups>,<character>)

tagsof shows tags for a named character vector of SNPs

logsum()

logsum

makeNlist()

Sample size information needed for flashfm

makeNlist.rel()

Sample size information needed for flashfm, when samples are related and have effective sample sizes for each trait

makeSNPgroups()

Make SNP groups using fine-mapping information from all of the traits

makeSNPgroups2()

Make two sets of SNP groups using fine-mapping information from all of the traits using two sets of results and maps the names between them

makeSNPgroups2U()

Make two sets of SNP groups using fine-mapping information from all of the traits using two sets of results and maps the names between them

makeSNPgroupsU()

Make SNP groups using fine-mapping information from all of the traits

makemod()

internal function makemod

marg.snps()

internal function marg.snps

marg.snps.vecs()

internal function marg.snps.vec

marginalpp()

Marginal PP for models sharing information between traits

marginalpp0()

Marginal PP for models sharing information between traits, when trait correlation is zero

mod.fn()

internal processing function for JAMexpanded.multi

multiJAMd()

Wrapper for JAMdynamic single-trait fine-mapping applied to a set of traits, and output SNP groups

multiJAMdCS()

Return credible sets from single-trait fine-mapping of several traits

multibeta()

Using summary statistics, calculates joint effect estimates

overlap()

overlap

ppnsnp-class

Class to hold results of pp.nsnp

show(<snpmod>) show(<snppicker>) show(<ppnsnp>) show(<tags>) show(<groups>)

Show

snpin()

Check whether a snp is in a snppicker, groups or tags object

snpmod-class

Class to hold data relating to multiple models fitted to SNP data

snppicker-class

Class to hold results of snp.picker algorithm

summary(<snppicker>) summary(<groups>)

Summaries

summaryStats()

Summary statistics needed for flashfm input

tagexpand.mod()

internal function for expanding models by tag SNPs in JAMexpandedCor.multi

tags-class

Tags focused class for holding information about sets of SNPs defined by their mutual LD

union()

Create a union of groups, snppicker or tags objects