📣 An issue occured with the embedded container registry on October 25 2021, between 10:30 and 12:10 (UTC+2). Any persisting issues should be reported to CC-IN2P3 Support. 🐛

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

Simulation_dataset: renaming

parent b295e9ff
......@@ -4,7 +4,7 @@ open Codepi
let main ~n_h0 ~n_ha ~seed:i () =
let open Simulation_dataset in
let sim =
bppseqgen_mixed_simulation
bppseqgen_mixed
~tree:(NHX (Bistro.Workflow.input "example/trees_analyses/cyp_coding.Chrysithr_root.nhx"))
~profiles:"example/aa_fitness/263SelectedProfiles.tsv"
~n_h0 ~n_ha ~ne_s:4. ~seed:i ()
......
......@@ -22,7 +22,7 @@ let tree_workflow = function
npairs } ->
Simulator.pair_tree ~branch_length1 ~branch_length2 ~npairs
module Convdet_simulation_param = struct
module Mutsel_param = struct
type t = {
tree : tree ;
branch_scale : float ;
......@@ -52,7 +52,7 @@ module Convdet_simulation_param = struct
end
type t =
| Bppseqgen_simulation of {
| Bppseqgen of {
hypothesis : Convergence_hypothesis.t ;
tree : tree ;
profiles : string ;
......@@ -67,9 +67,9 @@ type t =
n_ha : int ;
ne_s : float ;
}
| Convdet_simulation of Convdet_simulation_param.t
| Mutsel of Mutsel_param.t
let bppseqgen_mixed_simulation ?(ne_s = 1.) ?(seed = 0) ~tree ~profiles ~n_h0 ~n_ha () =
let bppseqgen_mixed ?(ne_s = 1.) ?(seed = 0) ~tree ~profiles ~n_h0 ~n_ha () =
Bppseqgen_mixed {
tree ;
profiles ;
......@@ -79,8 +79,8 @@ let bppseqgen_mixed_simulation ?(ne_s = 1.) ?(seed = 0) ~tree ~profiles ~n_h0 ~n
ne_s ;
}
let bppseqgen_simulation ~hyp ~tree ~profiles ~nb_sites ~seed =
Bppseqgen_simulation {
let bppseqgen ~hyp ~tree ~profiles ~nb_sites ~seed =
Bppseqgen {
hypothesis = hyp ;
tree ;
profiles ;
......@@ -88,21 +88,21 @@ let bppseqgen_simulation ~hyp ~tree ~profiles ~nb_sites ~seed =
seed ;
}
let convdet_simulation ?branch_scale ?ne_s ?gBGC ?seed ~tree ~profiles ~n_h0 ~n_ha () =
Convdet_simulation (Convdet_simulation_param.make ?branch_scale ?ne_s ?gBGC ?seed ~tree ~profiles ~n_h0 ~n_ha ())
let mutsel ?branch_scale ?ne_s ?gBGC ?seed ~tree ~profiles ~n_h0 ~n_ha () =
Mutsel (Mutsel_param.make ?branch_scale ?ne_s ?gBGC ?seed ~tree ~profiles ~n_h0 ~n_ha ())
let convdet_simulation_of_param p = Convdet_simulation p
let of_mutsel_param p = Mutsel p
let tree ~branch_length_unit:_ = function
| Bppseqgen_simulation { tree ; _ }
| Bppseqgen { tree ; _ }
| Bppseqgen_mixed { tree ; _ }
| Convdet_simulation { tree ; _ } ->
| Mutsel { tree ; _ } ->
tree_workflow tree
let seed = function
| Bppseqgen_mixed s -> s.seed
| Bppseqgen_simulation s -> s.seed
| Convdet_simulation s -> s.seed
| Bppseqgen s -> s.seed
| Mutsel s -> s.seed
let profile ~nb_sites ~profiles ~seed =
Profile.profile_l_of_splitted_profile
......@@ -111,7 +111,7 @@ let profile ~nb_sites ~profiles ~seed =
profiles
~seed:(calc_fixed_seed ~str:profiles seed)
let bppseqgen sim ~hypothesis ~nb_sites ~profiles =
let bppseqgen_simulation sim ~hypothesis ~nb_sites ~profiles =
let model_prefix = Convergence_hypothesis.string_of_model hypothesis in
let descr = sprintf ".%s" model_prefix in
let profile = profile ~nb_sites ~profiles ~seed:(seed sim) in
......@@ -123,15 +123,15 @@ let bppseqgen sim ~hypothesis ~nb_sites ~profiles =
~hypothesis ~profile_f ~profile_c ~seed:(seed sim)
let rec nucleotide_alignment = function
| Bppseqgen_simulation { hypothesis ; nb_sites ; profiles ; _ } as sim ->
bppseqgen sim ~hypothesis ~nb_sites ~profiles
| Bppseqgen { hypothesis ; nb_sites ; profiles ; _ } as sim ->
bppseqgen_simulation sim ~hypothesis ~nb_sites ~profiles
|> Bppsuite.Bppseqgen.alignment
| Bppseqgen_mixed { profiles ; seed ; n_h0 ; n_ha ; ne_s ; tree } ->
let h0 = nucleotide_alignment (Bppseqgen_simulation { hypothesis = H0 (Fixed ne_s) ; profiles ; seed ; nb_sites = n_h0 ; tree }) in
let ha = nucleotide_alignment (Bppseqgen_simulation { hypothesis = HaPC (Fixed ne_s) ; profiles ; seed ; nb_sites = n_ha ; tree }) in
let h0 = nucleotide_alignment (Bppseqgen { hypothesis = H0 (Fixed ne_s) ; profiles ; seed ; nb_sites = n_h0 ; tree }) in
let ha = nucleotide_alignment (Bppseqgen { hypothesis = HaPC (Fixed ne_s) ; profiles ; seed ; nb_sites = n_ha ; tree }) in
Utils.fasta_cappend h0 ha
| Convdet_simulation param ->
Convdet_simulation_param.simulation param
| Mutsel param ->
Mutsel_param.simulation param
|> Simulator.alignment_of_simulation
include Detection_pipeline.Make(struct
......@@ -150,13 +150,13 @@ let alignment_plot d =
let oracle d =
let n_h0, n_ha =
match d with
| Bppseqgen_simulation { nb_sites ; hypothesis ; _ } -> (
| Bppseqgen { nb_sites ; hypothesis ; _ } -> (
match hypothesis with
| H0 _ -> nb_sites, 0
| HaPC _ | HaPCOC _ -> 0, nb_sites
)
| Bppseqgen_mixed { n_h0 ; n_ha ; _ }
| Convdet_simulation { n_h0 ; n_ha ; _ } -> n_h0, n_ha
| Mutsel { n_h0 ; n_ha ; _ } -> n_h0, n_ha
in
Convergence_detection.oracle ~n_h0 ~n_ha
......@@ -353,7 +353,7 @@ let explore_params ~(f: param_t -> _) =
let simu_of_param ?n_h0:(n_h0=50) (p: param_t) =
let bf, gbgc = p in
convdet_simulation
mutsel
~tree:(NHX (Workflow.input "example/trees_analyses/C4AmaranthaceaePolyroot.nhx"))
~profiles:"example/aa_fitness/263SelectedProfiles.tsv"
~branch_scale:bf
......
......@@ -11,7 +11,7 @@ type tree =
type t
val bppseqgen_mixed_simulation :
val bppseqgen_mixed :
?ne_s:float ->
?seed:int ->
tree:tree ->
......@@ -21,7 +21,7 @@ val bppseqgen_mixed_simulation :
unit ->
t
val bppseqgen_simulation :
val bppseqgen :
hyp:Convergence_hypothesis.t ->
tree:tree ->
profiles:string ->
......@@ -29,7 +29,7 @@ val bppseqgen_simulation :
seed:int ->
t
module Convdet_simulation_param : sig
module Mutsel_param : sig
type t
val make :
?branch_scale:float ->
......@@ -47,7 +47,7 @@ module Convdet_simulation_param : sig
Codepitk.Simulator.Site_independent_mutsel.simulation workflow
end
val convdet_simulation :
val mutsel :
?branch_scale:float ->
?ne_s:float * float ->
?gBGC:float * float ->
......@@ -59,7 +59,7 @@ val convdet_simulation :
unit ->
t
val convdet_simulation_of_param : Convdet_simulation_param.t -> t
val of_mutsel_param : Mutsel_param.t -> t
include Detection_pipeline.Query with type t := t
......
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