Assemble a single row's payload for
TwasWeights: the variants, their weights and the fit
payload. Pass a list of these as the collection's entry argument.
Usage
twasWeightsRow(
variantIds,
weights,
fits = NULL,
cvResult = NULL,
standardized = FALSE,
dataType = NULL
)Arguments
- variantIds
Character vector of variant ids, each encoding coordinates (
chrom:pos:ref:alt).- weights
Per-variant weights, aligned to
variantIds(a vector, or a matrix with one column per condition).- fits
Optional per-method fit payload.
- cvResult
Optional cross-validation payload.
- standardized
Whether the weights are already on the standardized scale.
- dataType
Optional data-type label.
Examples
row <- twasWeightsRow(
variantIds = c("chr1:100:A:G", "chr1:200:C:T"),
weights = c(0.4, -0.2)
)
TwasWeights(
study = "s1", context = "brain", trait = "g1", method = "lasso",
entry = list(row)
)
#> TwasWeights: 1 entries
#> 1 studies, 1 contexts, 1 traits, 1 methods
#> LD sketch: NULL (individual-level fit)