(use-modules (srfi srfi-1)) (define K 50) (define betas '(0 100 1000)) (define no-genotypes 1300) (define no-haplotypes (* 2 no-genotypes)) (define no-simulations 500) (define (run-simulation beta) (let ((sum 0) (markers (list (ms-marker 0.5 0 K)))) (do ((i 1 (+ i 1))) ((> i no-simulations)) (let ((arg (simulate markers no-haplotypes :beta beta))) (set! sum (+ sum (total-branch-length (car (intervals arg))))))) (/ sum no-simulations))) (define (show beta) (display "beta ")(display beta)(display ": ") (display (run-simulation beta)) (newline)) (for-each show betas)