Creates a GWAS_data
object from a tibble or data-frame of GWAS results.
Details
The input data should have one row per marker, and at least the following columns:
chromosome
: character column, chromosome on which the marker is located.position
: numeric, the physical position of the marker along the chromosome (in bp).score
orpadj
: numeric, the GWAS score or adjusted p-value of the marker. If columnscore
column is missing, will be constructed as-log10(padj)
.
Examples
x <- get_example_data()
GWAS_data(x[["GWAS"]])
#> # A tibble: 35,481 × 4
#> id chromosome position score
#> <chr> <chr> <dbl> <dbl>
#> 1 ST4.03ch00_45467783 ST4.03ch00 45467783 0.191
#> 2 ST4.03ch01_88589716 ST4.03ch01 88589716 1.84
#> 3 ST4.03ch02_48614228 ST4.03ch02 48614228 0.381
#> 4 ST4.03ch03_62263578 ST4.03ch03 62263578 0.661
#> 5 ST4.03ch04_72139135 ST4.03ch04 72139135 0.640
#> 6 ST4.03ch05_52040302 ST4.03ch05 52040302 0.346
#> 7 ST4.03ch06_59434834 ST4.03ch06 59434834 1.13
#> 8 ST4.03ch07_56713057 ST4.03ch07 56713057 0.213
#> 9 ST4.03ch08_56937627 ST4.03ch08 56937627 0.843
#> 10 ST4.03ch09_61537423 ST4.03ch09 61537423 0.512
#> # ℹ 35,471 more rows