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

added a multiplicative factor for branch length

parent 770c40a2
......@@ -24,6 +24,7 @@ let sim =
n_h0 = 10 ;
n_ha = 5 ;
ne_s = 8. ;
branch_factor = 1. ;
}
let sim2 =
......@@ -32,14 +33,16 @@ let sim2 =
profiles = "example/aa_fitness/263SelectedProfiles.tsv" ;
n_h0 = 40 ;
n_ha = 10 ;
ne_s = 100_000. ;
ne_s = 10. ;
branch_factor = 3. ;
}
let sim3 =
Convdet_simulation {
Bppseqgen_mixed {
tree = `NHX "example/trees_analyses/cyp_coding.Chrysithr_root.nhx" ;
profiles = "example/aa_fitness/263SelectedProfiles.tsv" ;
n_h0 = 40 ;
n_ha = 10 ;
ne_s = 1_000_000. ;
ne_s = 10. ;
seed = 42 ;
}
open Core_kernel
let%pworkflow simulator ~n_h0 ~n_ha ~ne_s ~tree ~fitness_profiles =
let%pworkflow simulator ?branch_factor ~n_h0 ~n_ha ~ne_s ~tree ~fitness_profiles () =
let n_h0 = [%param n_h0] in
let n_ha = [%param n_ha] in
let ne_s = [%param ne_s] in
let tree = Convdet.Simulator.tree_from_file [%path tree] in
let branch_factor = [%param branch_factor] in
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 10. in
......
......@@ -2,9 +2,11 @@ open Bistro
open File_formats
val simulator :
?branch_factor:float ->
n_h0:int ->
n_ha:int ->
ne_s:float ->
tree:nhx pworkflow ->
fitness_profiles:#text_file pworkflow ->
unit ->
nucleotide_fasta pworkflow
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