Simulating Switched Alleles and Segregation Distortion

7 views
Skip to first unread message

Joshua Havill

unread,
Apr 18, 2024, 9:42:49 AMApr 18
to R/qtl discussion
Hello all,

I'm wondering if in the process of simulating a cross, it is also possible to simulate both switched alleles and segregation distortion on a random subset of markers?

Thanks,
Josh

Karl Broman

unread,
Apr 18, 2024, 11:53:12 AMApr 18
to R/qtl discussion
You can simulate most anything, provided you have a probability model. And you'll need to write your own code.

To simulate switched alleles, you could sample some set of markers and then apply switchAlleles():

    # switch alleles at a random third of markers
    data(hyper)
    some_markers <- sample( markernames(hyper), round( totmar(hyper)/3 ), replace=FALSE)
    hyper <- switchAlleles(hyper, some_markers)


To simulate segregation distortion, the simplest model is maybe partial lethality of alleles at some position, and the simplest way is simulate this is probably "rejection sampling": Simulate a bunch extra of individuals, and then retain just a portion of them, based on genotype at the locus under selection. You could simulate a "QTL" genotype to use as the locus under selection, if you don't want it to be a specific marker. Maybe even easier: you could simulate some underlying "frailty" phenotype, and save just the individuals that have phenotype < some threshold.

    data(map10)
    n.ind <- 1000
    x <- sim.cross(map10, model=rbind(c(1, 45, 2, -2)), type="f2", n.ind=n.ind)
    x <- subset(x, ind = x$pheno[,1] < 0)
    geno.table(x, chr=1)


karl
Reply all
Reply to author
Forward
0 new messages