Skip to contents

Assemble and clean a per-condition effect-size / z-score matrix for mashr, dropping variants with invalid or insufficiently-observed statistics.

Usage

filterInvalidSummaryStat(
  datList,
  bhat = NULL,
  sbhat = NULL,
  z = NULL,
  btoz = FALSE,
  sigPCutoff = 1e-06,
  filterByMissingRate = 0.2
)

Arguments

datList

A named list of summary-statistic data frames / matrices.

bhat

Optional name of the effect-size element in datList.

sbhat

Optional name of the standard-error element in datList.

z

Optional name of the z-score element in datList.

btoz

Logical. If TRUE, derive z-scores from bhat/sbhat.

sigPCutoff

Numeric. Significance p-value cutoff for selecting strong signals. Default 1e-6.

filterByMissingRate

Numeric in [0, 1]. Drop variants observed in fewer than this fraction of conditions. Default 0.2.

Value

A cleaned list of summary-statistic matrices suitable for mash.

Examples

datList <- list(strong = list(z = matrix(rnorm(9), 3, 3)))
filterInvalidSummaryStat(datList)
#> $strong
#> $strong$z
#>            [,1]       [,2]       [,3]
#> [1,] 0.31704223 -0.5524282 -0.2359337
#> [2,] 0.05931153 -0.5008878  0.1834518
#> [3,] 1.08363152 -0.1834515  0.9728970
#> 
#>