Skip to contents

What makes a summary-statistics row a well-formed record: type coercion, chromosome-label normalization, dropping malformed or impossible rows, and flooring underflowed p-values.

Separate from SumstatsFilterParam on purpose. That one applies quality thresholds to valid records (INFO, N, indels, strand-ambiguous variants); this one decides whether a row is a valid record at all. All of it is applied by summaryStatsQc before any filter or screen runs.

Usage

SumstatsCleaningParam(
  coerceNumeric = TRUE,
  normalizeChr = TRUE,
  dropNonstandardChr = TRUE,
  dropMissData = TRUE,
  dropPOutOfRange = TRUE,
  clampSmallP = TRUE,
  smallPFloor = 4.94065645841247e-324,
  dropZeroEffect = TRUE,
  dropNonpositiveSe = TRUE
)

Arguments

coerceNumeric

Logical. Coerce the signed columns (Z/BETA/SE/OR/LOG_ODDS/SIGNED_SUMSTAT/P/MAF/FRQ/INFO/N) to numeric. Default TRUE.

normalizeChr

Logical. Strip the "chr" prefix, uppercase the chromosome label, and map 23->X, 24->Y, M->MT. Default TRUE.

dropNonstandardChr

Logical. Drop variants whose CHR (after normalization) is outside 1..22, X, Y, MT. Default TRUE.

dropMissData

Logical. Drop rows with NA in any vital column (chrom, pos, A1, A2, and at least one of Z / BETA). Default TRUE.

dropPOutOfRange

Logical. Drop rows where P < 0 or P > 1. Default TRUE.

clampSmallP

Logical. Floor non-negative P values below smallPFloor to smallPFloor, so -log10(P) stays finite. Applied to both input and Z-derived P values. Default TRUE.

smallPFloor

Numeric (length 1). The floor clampSmallP applies. Default 5e-324 (R's smallest positive double).

dropZeroEffect

Logical. Drop rows where any effect column is exactly 0 (BETA, LOG_ODDS, SIGNED_SUMSTAT) or OR is exactly 1. Default TRUE.

dropNonpositiveSe

Logical. Drop rows where SE <= 0. Default TRUE.

Value

A SumstatsCleaningParam object, a MethodParam.

Examples

SumstatsCleaningParam(clampSmallP = FALSE, dropZeroEffect = FALSE)
#> <SumstatsCleaningParam>
#>   coerceNumeric            TRUE
#>   normalizeChr             TRUE
#>   dropNonstandardChr       TRUE
#>   dropMissData             TRUE
#>   dropPOutOfRange          TRUE
#>   clampSmallP              FALSE
#>   smallPFloor              4.940656e-324
#>   dropZeroEffect           FALSE
#>   dropNonpositiveSe        TRUE