
Generate parental allocations for a meiotic tetrad
Source:R/recombine_parent_ids.R
recombine_parent_ids.Rd
For a given set of per chromosome marker counts, generate per marker parental ids for a meiotic tetrad generated by sexual recombination (chromosomal crossovers followed by independent assortment). We assume
For all chromosomes, both pairs of non-sister chromatids cross over
One crossover per non-sister chromatid pair
Equal-length chromosomes (follows from above; in reality, chromosomes have different lengths, and the number of crossovers increases with length)
Equi-distributed markers (implicit)
Examples
n_chrs <- 14 # P. vivax has 14 chromosomes
n_markers <- 100 # For 100 markers
chrs_per_marker <- round(seq(0.51, n_chrs + 0.5, length.out = n_markers))
recombine_parent_ids(chrs_per_marker)
#> [,1] [,2] [,3] [,4]
#> [1,] 1 2 1 2
#> [2,] 1 2 1 2
#> [3,] 1 2 1 2
#> [4,] 1 2 2 1
#> [5,] 1 2 2 1
#> [6,] 1 2 2 1
#> [7,] 1 2 2 1
#> [8,] 1 2 2 1
#> [9,] 1 2 2 1
#> [10,] 1 2 2 1
#> [11,] 1 2 2 1
#> [12,] 1 2 2 1
#> [13,] 1 2 2 1
#> [14,] 1 2 2 1
#> [15,] 2 1 1 2
#> [16,] 1 2 1 2
#> [17,] 1 2 1 2
#> [18,] 1 2 2 1
#> [19,] 1 2 2 1
#> [20,] 1 2 2 1
#> [21,] 1 2 2 1
#> [22,] 1 2 2 1
#> [23,] 2 2 1 1
#> [24,] 2 1 1 2
#> [25,] 2 1 1 2
#> [26,] 2 1 1 2
#> [27,] 2 1 1 2
#> [28,] 1 1 2 2
#> [29,] 1 1 2 2
#> [30,] 1 1 2 2
#> [31,] 1 1 2 2
#> [32,] 1 1 2 2
#> [33,] 1 1 2 2
#> [34,] 1 2 1 2
#> [35,] 1 2 1 2
#> [36,] 1 2 1 2
#> [37,] 2 1 1 2
#> [38,] 2 1 1 2
#> [39,] 2 1 1 2
#> [40,] 2 1 1 2
#> [41,] 2 1 1 2
#> [42,] 2 1 1 2
#> [43,] 1 2 2 1
#> [44,] 2 1 1 2
#> [45,] 2 1 1 2
#> [46,] 1 2 1 2
#> [47,] 1 2 1 2
#> [48,] 1 2 2 1
#> [49,] 1 2 2 1
#> [50,] 1 2 2 1
#> [51,] 1 1 2 2
#> [52,] 1 1 2 2
#> [53,] 1 1 2 2
#> [54,] 1 2 2 1
#> [55,] 2 2 1 1
#> [56,] 2 2 1 1
#> [57,] 2 2 1 1
#> [58,] 2 2 1 1
#> [59,] 2 1 2 1
#> [60,] 2 1 2 1
#> [61,] 2 1 2 1
#> [62,] 2 1 2 1
#> [63,] 2 1 2 1
#> [64,] 1 1 2 2
#> [65,] 1 2 1 2
#> [66,] 1 2 1 2
#> [67,] 1 2 1 2
#> [68,] 2 2 1 1
#> [69,] 2 2 1 1
#> [70,] 2 2 1 1
#> [71,] 2 2 1 1
#> [72,] 1 2 1 2
#> [73,] 1 2 1 2
#> [74,] 1 2 2 1
#> [75,] 1 2 2 1
#> [76,] 1 2 2 1
#> [77,] 1 2 2 1
#> [78,] 2 1 2 1
#> [79,] 2 1 2 1
#> [80,] 2 1 2 1
#> [81,] 2 1 2 1
#> [82,] 1 1 2 2
#> [83,] 1 2 1 2
#> [84,] 1 2 1 2
#> [85,] 1 2 1 2
#> [86,] 1 2 1 2
#> [87,] 1 1 2 2
#> [88,] 1 1 2 2
#> [89,] 1 1 2 2
#> [90,] 1 1 2 2
#> [91,] 2 1 2 1
#> [92,] 2 1 2 1
#> [93,] 2 2 1 1
#> [94,] 2 2 1 1
#> [95,] 2 1 2 1
#> [96,] 2 1 2 1
#> [97,] 2 1 2 1
#> [98,] 2 1 2 1
#> [99,] 2 1 2 1
#> [100,] 1 1 2 2