Supply or overwrite one per-variant column of a
GwasSumStats / QtlSumStats entry after construction –
the usual case being an effect-allele frequency the source file did not
carry. Dispatch is on value:
numericpositional: the vector is in the entry's own variant order and must have exactly one value per variant. Length is checked hard, because a recycled or truncated vector is otherwise silently wrong.
GRangesmatched: paired to the entry on
(chrom, pos, A1, A2)viamatchVariants, so ordering does not matter.A1/A2are required inmcols()so an allele swap can be detected, and exactly one othermcolscolumn carries the values. Entry variants the replacement does not name are setNA.
An allele swap sends af to 1 - af, so af<-
complements a flipped match. maf is min(af, 1 - af) and
nSamples is a count, both swap-invariant, so neither is
complemented.
Usage
af(x, ...) <- value
maf(x, ...) <- value
nSamples(x, ...) <- value
# S4 method for class 'SumStatsBase,numeric'
af(x, studyName = NULL, context = NULL, trait = NULL, ...) <- value
# S4 method for class 'SumStatsBase,GRanges'
af(x, studyName = NULL, context = NULL, trait = NULL, ...) <- value
# S4 method for class 'SumStatsBase,numeric'
maf(x, studyName = NULL, context = NULL, trait = NULL, ...) <- value
# S4 method for class 'SumStatsBase,GRanges'
maf(x, studyName = NULL, context = NULL, trait = NULL, ...) <- value
# S4 method for class 'SumStatsBase,numeric'
nSamples(x, studyName = NULL, context = NULL, trait = NULL, ...) <- value
# S4 method for class 'SumStatsBase,GRanges'
nSamples(x, studyName = NULL, context = NULL, trait = NULL, ...) <- value