Skip to contents

Return the genomic interval each row was analysed over, as a GRanges with one range per row – the trait's own region for a TwasWeights, and for a fine-mapping result the window the fit was run over (the requested region, or the trait's cis-window when the fit was driven by traitId + cisWindow). This is location provenance (e.g. for cTWAS LD-block placement).

This is the window that was ANALYSED, not the span of the variants that survived into the fit: QC and screening drop variants first, so a fit over chr22:10000000-18000000 may contain variants spanning only chr22:10414272-16916492. The window is stored because it cannot be recovered from the object; the span can, and is simply range(x).

Being a record of what was analysed, it deliberately does NOT change under subsetRegion() or row subsetting – a subset of a fit's variants was still produced by a fit over the original window. Use range(x) when you want the current content instead.

Collections built before the window was recorded fall back to the derived span, so the accessor always returns a range.

Usage

genomicRegion(x, ...)

# S4 method for class 'FineMappingResultBase'
genomicRegion(x)

# S4 method for class 'TwasWeights'
genomicRegion(x)

Arguments

x

The object.

...

Reserved for future use.

Value

A GRanges with one range per row of x, or an empty GRanges when the collection has no rows.

See also

traitPosition for the trait's own coordinates.

Examples

data(qtlFineMappingExample)
genomicRegion(qtlFineMappingExample)
#> GRanges object with 1 range and 0 metadata columns:
#>       seqnames            ranges strand
#>          <Rle>         <IRanges>  <Rle>
#>   [1]    chr22 32119788-33114493      *
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths