get_pairwise_sharing: Compute the proportion of (significant) signals shared by...

Description Usage Arguments Details Examples

View source: R/mash-evaluation.R

Description

Compute the proportion of (significant) signals shared by magnitude in each pair of conditions, based on the poterior mean

Usage

1
2
3
4
5
6
7
get_pairwise_sharing(
  m,
  factor = 0.5,
  lfsr_thresh = 0.05,
  thr.r2 = NA,
  FUN = identity
)

Arguments

m

the mash fit

factor

a number between 0 and 1 - the factor within which effects are considered to be shared.

lfsr_thresh

the lfsr threshold for including an effect in the assessment

thr.r2

Numeric. Value between 0 and 1. The r^2 value above which effects are considered to be linked; in this case, only the SNP with the more significant log10Bayes Factor value in mash is kept.

FUN

a function to be applied to the estimated effect sizes before assessing sharing. The most obvious choice beside the default 'FUN=identity' would be 'FUN=abs' if you want to ignore the sign of the effects when assessing sharing.

Details

For each pair of tissues, first identify the effects that are significant (by lfsr<lfsr_thresh) in at least one of the two tissues. Then compute what fraction of these have an estimated (posterior mean) effect size within a factor factor of one another. The results are returned as an R by R matrix.

Examples

1
2
3
4
5
6
## Not run: 
get_pairwise_sharing(m) # sharing by magnitude (same sign)
get_pairwise_sharing(m, factor=0) # sharing by sign
get_pairwise_sharing(m, FUN=abs) # sharing by magnitude when sign is ignored

## End(Not run)

Alice-MacQueen/snpdiver documentation built on Dec. 17, 2021, 8:41 a.m.