Commit 07852306 authored by Philippe Veber's avatar Philippe Veber
Browse files

Simulator: update wrt convdet

parent e15a8d04
......@@ -9,7 +9,7 @@ let%pworkflow simulator ?branch_factor ?seed ~n_h0 ~n_ha ~ne_s ~tree ~fitness_pr
let tree = Convdet.Simulator.tree_from_file ?alpha:branch_factor [%path tree] in
let fitness_profiles = Convdet.Fitness_profiles.read [%path fitness_profiles] in
let base_param =
let p = Convdet.Simulator.Codon_model.random_param ~alpha_nucleotide:10. ~alpha_fitness:0.1 in
let p = Convdet.Mutsel.random_param ~alpha_nucleotide:10. ~alpha_fitness:0.1 in
{ p with ne_s ; omega = 1. }
in
let random_profile () =
......@@ -42,8 +42,8 @@ let%pworkflow simulator ?branch_factor ?seed ~n_h0 ~n_ha ~ne_s ~tree ~fitness_pr
let params i =
if i < n_h0 then Fn.const (random_h0_param ())
else random_ha_param () in
let root_condition = Convdet.Simulator.root_condition tree in
let ali = Convdet.Simulator.Codon_model.alignment tree ~root_condition ~n:(n_h0 + n_ha) params in
let root_condition = Convdet.Simulator.Mutsel.root_condition tree in
let ali = Convdet.Simulator.Mutsel.alignment tree ~root_condition ~n:(n_h0 + n_ha) params in
let species_name =
Phylogenetics.Tree.leaves tree
|> List.map ~f:(fun { name } -> Option.value_exn name) in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment