Skip to contents

Creates a CUSTOM_data object from a tibble or data-frame of custom genomic features.

Usage

CUSTOM_data(dat, keep_rownames_as = NULL)

Arguments

dat

Tibble of custom genomic features. See Details.

keep_rownames_as

Character, the name of the column in which to save the rownames of the input data-frame. Default value is NULL, i.e. rownames will be discarded.

Value

A CUSTOM_data object, i.e. a tibble.

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).

  • score: numeric, score to be used for the genomic feature.

Examples

x <- get_example_data()

CUSTOM_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