Creates a CUSTOM_data
object from a tibble or data-frame of custom genomic features.
Details
The input data should have one row per marker, and at least the following columns:
chromosome
: character column, chromosome on which the feature is located.position
: numeric, the physical position of the feature along the chromosome (in bp) ORstart
andend
: numeric, starting and end position of the feature (in bp). If there is noposition
column, it will be constructed as the middle value (mean) betweenstart
andend
. If there is aposition
column but nostart
and/orend
columns, these will be set to the values in theposition
column.score
: numeric, score to be used for the genomic feature.
Examples
x <- get_example_data()
CUSTOM_data(x[["GWAS"]])
#> # A tibble: 35,481 × 6
#> id chromosome position score start end
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 ST4.03ch00_45467783 ST4.03ch00 45467783 0.191 45467783 45467783
#> 2 ST4.03ch01_88589716 ST4.03ch01 88589716 1.84 88589716 88589716
#> 3 ST4.03ch02_48614228 ST4.03ch02 48614228 0.381 48614228 48614228
#> 4 ST4.03ch03_62263578 ST4.03ch03 62263578 0.661 62263578 62263578
#> 5 ST4.03ch04_72139135 ST4.03ch04 72139135 0.640 72139135 72139135
#> 6 ST4.03ch05_52040302 ST4.03ch05 52040302 0.346 52040302 52040302
#> 7 ST4.03ch06_59434834 ST4.03ch06 59434834 1.13 59434834 59434834
#> 8 ST4.03ch07_56713057 ST4.03ch07 56713057 0.213 56713057 56713057
#> 9 ST4.03ch08_56937627 ST4.03ch08 56937627 0.843 56937627 56937627
#> 10 ST4.03ch09_61537423 ST4.03ch09 61537423 0.512 61537423 61537423
#> # ℹ 35,471 more rows