Get Per-Row Trait Positions
Source:R/AllGenerics.R, R/AllClasses.R, R/QtlDataset.R, and 2 more
getTraitPosition.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
getRegion (the fine-mapping window for a
FineMappingResult): 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
getTraitPosition(x, ...)
# S4 method for class 'FineMappingResultBase'
getTraitPosition(x, ...)
# S4 method for class 'QtlDataset'
getTraitPosition(x, traitId = NULL, ...)
# S4 method for class 'QtlSumStats'
getTraitPosition(x, traitId = NULL, ...)
# S4 method for class 'TwasWeights'
getTraitPosition(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)
getTraitPosition(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