Skip to contents

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, QtlSumStats or H2Estimate object.

...

Class-specific selection arguments.

studyName

Character (length 1) or NULL. Restrict the selection to this study; NULL matches all studies.

context

Character (length 1) or NULL. Restrict the selection to this context; NULL matches all contexts.

trait

Character (length 1) or NULL. Restrict the selection to this trait; NULL matches all traits.

annotateSignificance

Optional correction-method name passed through to sumStats (QTL only); NULL applies none.

ranges

A GRanges or NULL (default). Return only the variants overlapping these ranges; NULL returns everything.

Value

Integer.

Examples

data(qtlSumStatsExample)
nSnps(qtlSumStatsExample)
#> [1] 200