Skip to contents

Extract credible set assignments at the requested coverage.

Usage

getCs(x, ...)

# S4 method for class 'FineMappingResultBase'
getCs(
  x,
  study = NULL,
  context = NULL,
  trait = NULL,
  method = NULL,
  region = NULL,
  coverage = 0.95,
  minPurity = NULL,
  ...
)

Arguments

x

A FineMappingRow or FineMappingResult.

...

Class-specific selection arguments plus coverage.

study

Character (length 1) or NULL. Restrict the selection to this study; NULL matches all studies.

context

Character (length 1) or NULL. Restrict the selection to this context; NULL matches all contexts.

trait

Character (length 1) or NULL. Restrict the selection to this trait; NULL matches all traits.

method

Character (length 1) or NULL. Restrict the selection to this fine-mapping / weight method; NULL matches all methods.

region

Character (length 1, "chr:start-end") or NULL. Restrict variants to this region; NULL uses the full cis window / all regions.

coverage

Numeric in (0, 1). Credible-set coverage level. Default 0.95.

minPurity

Numeric or NULL. Minimum credible-set purity to retain; NULL applies no purity filter.

Value

A data.frame of credible set information.

Examples

data(qtlFineMappingExample)
getCs(qtlFineMappingExample)
#> # A tibble: 42 × 27
#>    study  context trait blockId method variant_id chrom    pos A1    A2        N
#>    <chr>  <chr>   <chr> <chr>   <chr>  <chr>      <chr>  <int> <chr> <chr> <dbl>
#>  1 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 C     T       415
#>  2 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 A     C       415
#>  3 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 A     G       415
#>  4 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 C     T       415
#>  5 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 A     G       415
#>  6 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 G     A       415
#>  7 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 T     C       415
#>  8 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 G     A       415
#>  9 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 C     T       415
#> 10 study… contex… gene… NA      susie  chr22:327… chr22 3.27e7 C     A       415
#> # ℹ 32 more rows
#> # ℹ 16 more variables: af <dbl>, beta <dbl>, se <dbl>, pip <dbl>, logBF <dbl>,
#> #   cs_95 <chr>, cs_70 <chr>, cs_50 <chr>, cs_95_purity <dbl>,
#> #   cs_70_purity <dbl>, cs_50_purity <dbl>, within_cs_pip <dbl>, gene <chr>,
#> #   event <chr>, grange_start <int>, grange_end <int>