Get Per-Row Trait Positions
Source:R/AllGenerics.R, R/AllClasses.R, R/qtlSumStats.R, and 2 more
traitPosition.RdReturn the molecular feature's OWN genomic coordinates (the gene
/ peak range; TSS = start()) for each row of a per-tuple collection,
as a GRanges with one range per row. Distinct from
genomicRegion (the window a fine-mapping result was fit
over): the true trait position cannot be inferred from
summary statistics, so it is threaded from the QtlDataset rowRanges
or an explicit QtlSumStats trait-position and carried as provenance onto
QtlFineMappingResult and TwasWeights.
Usage
traitPosition(x, ...)
# S4 method for class 'FineMappingResultBase'
traitPosition(x)
# S4 method for class 'QtlSumStats'
traitPosition(x, traitId = NULL)
# S4 method for class 'QtlDataset'
traitPosition(x, traitId = NULL)
# S4 method for class 'TwasWeights'
traitPosition(x)Value
A GRanges with one range per row of x, or an empty
GRanges when the collection carries no trait-position provenance.
Examples
data(qtlDatasetExample)
traitPosition(qtlDatasetExample)
#> GRanges object with 1 range and 0 metadata columns:
#> seqnames ranges strand
#> <Rle> <IRanges> <Rle>
#> ENSG_example chr22 15680768-15681267 *
#> -------
#> seqinfo: 1 sequence from an unspecified genome; no seqlengths