Compute Between-Credible-Set Correlation On Demand
Source:R/AllGenerics.R, R/fineMappingWrappers.R
computeCsCorrelation.RdCompute the between-credible-set correlation matrix for a
fineMappingRow on demand from an LD source. The correlation
is a view over the fit-time LD, which lives on the data object — a
QtlDataset's genotypes or a QtlSumStats / GwasSumStats
LD sketch — and is deliberately never stored on the fit. An
ldSource is therefore always required.
Usage
computeCsCorrelation(x, ldSource, ...)
# S4 method for class 'FineMappingResultBase,SumStatsBase'
computeCsCorrelation(x, ldSource, ...)
# S4 method for class 'FineMappingResultBase,QtlDataset'
computeCsCorrelation(x, ldSource, ...)
# S4 method for class 'FineMappingResultBase,ANY'
computeCsCorrelation(x, ldSource, ...)Arguments
- x
A
fineMappingRowcarrying the fit (credible-set membership and PIP) and its variant ids.- ldSource
The object supplying the LD: a
QtlDataset(individual-level; genotypes viagetGenotypes) or aQtlSumStats/GwasSumStats(summary statistics; LD viagetLdSketch). Any other type is an error.- ...
Passed to methods.
Value
A numeric m x m between-credible-set correlation matrix
(m = number of credible sets), or NULL when the fit has
fewer than two credible sets.
Examples
data(qtlFineMappingPairedExample)
data(qtlSumStatsExample)
fe <- getFineMappingResult(qtlFineMappingPairedExample)
computeCsCorrelation(fe, qtlSumStatsExample)
#> L2 L3
#> L2 1.00000000 -0.08404977
#> L3 -0.08404977 1.00000000