Skip to contents

Groups significant variants into independent loci. The lead variant (most significant) for each locus is identified first; all other significant variants on the same chromosome within `window_kb` kilobases are assigned to that locus. No LD information is used.

Usage

identify_loci(x, window_kb = 500, pvalue_threshold = 5e-08, ...)

# S3 method for class 'data.frame'
identify_loci(x, window_kb = 500, pvalue_threshold = 5e-08, ...)

# S3 method for class 'tbl_df'
identify_loci(x, window_kb = 500, pvalue_threshold = 5e-08, ...)

# S3 method for class 'GWASFormatter'
identify_loci(x, window_kb = 500, pvalue_threshold = 5e-08, ...)

Arguments

x

A GWASFormatter object, data.frame, or tibble.

window_kb

Window size in kilobases. Variants within this distance of the lead variant on the same chromosome are assigned to the same locus. Default is 500.

pvalue_threshold

P-value significance threshold. Default is 5e-8.

...

Additional arguments (unused).

Value

A tibble/data.frame of significant variants with added columns:

  • `locus_id` - Integer locus identifier

  • `is_lead` - Logical, TRUE for the lead (most significant) variant per locus

Methods (by class)

  • identify_loci(data.frame): Method for data.frame/tibble objects

  • identify_loci(tbl_df): Alias for data.frame method

  • identify_loci(GWASFormatter): Method for GWASFormatter objects