Creates a QTL_data
object from a tibble or data-frame of QTL mapping
results.
Details
The input data should have one row per QTL region, and at least the following columns:
chromosome
: character column, chromosome on which the QTL region is located.start
andend
: numeric, starting and end position of the QTL region (in bp). A columnposition
will be constructed as the middle value (mean) betweenstart
andend
.score
orpadj
: numeric, the QTL score or adjusted p-value of the QTL region. If columnscore
column is missing, will be constructed as-log10(padj)
.
Examples
x <- get_example_data()
QTL_data(x[["QTL"]])
#> # A tibble: 7 × 7
#> id chromosome start end score name position
#> <chr> <chr> <dbl> <dbl> <dbl> <chr> <dbl>
#> 1 qtl_1 ST4.03ch01 5600000 11300000 4.1 QTL 1 8450000
#> 2 qtl_2 ST4.03ch01 9500000 14000000 5.5 QTL 2 11750000
#> 3 qtl_3 ST4.03ch04 12700000 17600000 4.3 QTL 3 15150000
#> 4 qtl_4 ST4.03ch05 37600000 39900000 3.2 QTL 4 38750000
#> 5 qtl_5 ST4.03ch07 49900000 51700000 5.1 QTL 5 50800000
#> 6 qtl_6 ST4.03ch08 45000000 47000000 5.8 QTL 6 46000000
#> 7 qtl_7 ST4.03ch11 21400000 26700000 2.1 QTL 7 24050000