Computes the length (in bp) of each chromosome as the maximum position of markers or genes on the chromosome.
Usage
compute_chrom_length(x)
# S3 method for class 'GWAS_data'
compute_chrom_length(x)
# S3 method for class 'DE_data'
compute_chrom_length(x)
# S3 method for class 'CAN_data'
compute_chrom_length(x)
# S3 method for class 'CUSTOM_data'
compute_chrom_length(x)
Value
A tibble with two columns: chromosome
(chromosome name) and
length
(chromosome length in base pair).
Examples
x <- get_example_data()
compute_chrom_length(GWAS_data(x[["GWAS"]]))
#> # A tibble: 13 × 2
#> chromosome length
#> <chr> <dbl>
#> 1 ST4.03ch00 45467783
#> 2 ST4.03ch01 88589716
#> 3 ST4.03ch02 48614228
#> 4 ST4.03ch03 62263578
#> 5 ST4.03ch04 72139135
#> 6 ST4.03ch05 52040302
#> 7 ST4.03ch06 59434834
#> 8 ST4.03ch07 56713057
#> 9 ST4.03ch08 56937627
#> 10 ST4.03ch09 61537423
#> 11 ST4.03ch10 59687482
#> 12 ST4.03ch11 45409344
#> 13 ST4.03ch12 61148638
compute_chrom_length(DE_data(x[["DE"]]))
#> # A tibble: 13 × 2
#> chromosome length
#> <chr> <dbl>
#> 1 ST4.03ch00 45813526
#> 2 ST4.03ch01 88627702
#> 3 ST4.03ch02 48578978
#> 4 ST4.03ch03 62258929
#> 5 ST4.03ch04 72170119
#> 6 ST4.03ch05 52040326
#> 7 ST4.03ch06 59476545
#> 8 ST4.03ch07 56715111
#> 9 ST4.03ch08 56849780
#> 10 ST4.03ch09 61539681
#> 11 ST4.03ch10 59684952
#> 12 ST4.03ch11 45409456
#> 13 ST4.03ch12 61152223
compute_chrom_length(CAN_data(x[["CAN"]]))
#> # A tibble: 7 × 2
#> chromosome length
#> <chr> <dbl>
#> 1 ST4.03ch02 44537572
#> 2 ST4.03ch03 57469946
#> 3 ST4.03ch04 63041935
#> 4 ST4.03ch05 42525912
#> 5 ST4.03ch07 51457407
#> 6 ST4.03ch08 45907390
#> 7 ST4.03ch12 55092326