Number of SNPs in a GwasSumStats or QtlSumStats
entry, selected by its identity tuple, or the number of variants an
H2Estimate was computed over.
Usage
nSnps(x, ...)
# S4 method for class 'SumStatsBase'
nSnps(
x,
studyName = NULL,
context = NULL,
trait = NULL,
annotateSignificance = NULL,
ranges = NULL
)
# S4 method for class 'H2Estimate'
nSnps(x)Arguments
- x
A
GwasSumStats,QtlSumStatsorH2Estimateobject.- ...
Class-specific selection arguments.
- studyName
Character (length 1) or
NULL. Restrict the selection to this study;NULLmatches all studies.- context
Character (length 1) or
NULL. Restrict the selection to this context;NULLmatches all contexts.- trait
Character (length 1) or
NULL. Restrict the selection to this trait;NULLmatches all traits.- annotateSignificance
Optional correction-method name passed through to
sumStats(QTL only);NULLapplies none.- ranges
A
GRangesorNULL(default). Return only the variants overlapping these ranges;NULLreturns everything.
Examples
data(qtlSumStatsExample)
nSnps(qtlSumStatsExample)
#> [1] 200