Commit 87b4f2e6 authored by Philippe Veber's avatar Philippe Veber
Browse files

renaming

parent c3de289d
...@@ -22,7 +22,7 @@ let simulation ?branch_scale ?seed ~n_h0 ~n_ha ~ne_s:(ne_s0, ne_s1) ~gBGC:(gBGC0 ...@@ -22,7 +22,7 @@ let simulation ?branch_scale ?seed ~n_h0 ~n_ha ~ne_s:(ne_s0, ne_s1) ~gBGC:(gBGC0
|> to_fitness |> to_fitness
|> Array.map ~f: Amino_acid.Vector.of_array_exn |> Array.map ~f: Amino_acid.Vector.of_array_exn
) in ) in
Codepitk.Simulator.Site_independent_mutsel.simulation Codepitk.Mutsel_simulator.Site_independent.simulation
?branch_scale ?seed ~n_h0 ~n_ha ~gBGC:(gBGC0, gBGC1) ?branch_scale ?seed ~n_h0 ~n_ha ~gBGC:(gBGC0, gBGC1)
~ne_s:(ne_s0, ne_s1) ~tree ~fitness_profiles () ~ne_s:(ne_s0, ne_s1) ~tree ~fitness_profiles ()
in in
...@@ -30,7 +30,7 @@ let simulation ?branch_scale ?seed ~n_h0 ~n_ha ~ne_s:(ne_s0, ne_s1) ~gBGC:(gBGC0 ...@@ -30,7 +30,7 @@ let simulation ?branch_scale ?seed ~n_h0 ~n_ha ~ne_s:(ne_s0, ne_s1) ~gBGC:(gBGC0
let alignment_of_simulation sim = let alignment_of_simulation sim =
let f = fun%workflow dest -> let f = fun%workflow dest ->
let sim : Codepitk.Simulator.Site_independent_mutsel.simulation = let sim : Codepitk.Mutsel_simulator.Site_independent.simulation =
[%eval sim] [%eval sim]
in in
let species_name = Phylogenetics.Tree.leaves sim.tree in let species_name = Phylogenetics.Tree.leaves sim.tree in
...@@ -45,7 +45,7 @@ let alignment_of_simulation sim = ...@@ -45,7 +45,7 @@ let alignment_of_simulation sim =
let fitness_histogram sim = let fitness_histogram sim =
let f = fun%workflow dest -> let f = fun%workflow dest ->
let open Phylogenetics in let open Phylogenetics in
let sim : Codepitk.Simulator.Site_independent_mutsel.simulation = let sim : Codepitk.Mutsel_simulator.Site_independent.simulation =
[%eval sim] [%eval sim]
in in
let params = Array.append sim.h0_params sim.ha_params in let params = Array.append sim.h0_params sim.ha_params in
......
...@@ -12,14 +12,14 @@ val simulation : ...@@ -12,14 +12,14 @@ val simulation :
tree:nhx file -> tree:nhx file ->
fitness_profiles:#text file -> fitness_profiles:#text file ->
unit -> unit ->
Simulator.Site_independent_mutsel.simulation workflow Mutsel_simulator.Site_independent.simulation workflow
val alignment_of_simulation : val alignment_of_simulation :
Simulator.Site_independent_mutsel.simulation workflow -> Mutsel_simulator.Site_independent.simulation workflow ->
nucleotide_fasta file nucleotide_fasta file
val fitness_histogram : val fitness_histogram :
Simulator.Site_independent_mutsel.simulation workflow -> Mutsel_simulator.Site_independent.simulation workflow ->
pdf file pdf file
val pair_tree : val pair_tree :
......
...@@ -29,7 +29,7 @@ let tree_workflow = function ...@@ -29,7 +29,7 @@ let tree_workflow = function
| Pair_tree { branch_length1 ; | Pair_tree { branch_length1 ;
branch_length2 ; branch_length2 ;
npairs } -> npairs } ->
Simulator.pair_tree ~branch_length1 ~branch_length2 ~npairs Mutsel_simulator.pair_tree ~branch_length1 ~branch_length2 ~npairs
module Make(Q : Detection_pipeline.Query) = struct module Make(Q : Detection_pipeline.Query) = struct
include Detection_pipeline.Make(Q) include Detection_pipeline.Make(Q)
...@@ -68,11 +68,11 @@ module Mutsel_query = struct ...@@ -68,11 +68,11 @@ module Mutsel_query = struct
let simulation { n_h0 ; n_ha ; profiles ; ne_s ; gBGC ; branch_scale ; seed ; tree ; _ } = let simulation { n_h0 ; n_ha ; profiles ; ne_s ; gBGC ; branch_scale ; seed ; tree ; _ } =
let tree = tree_workflow tree in let tree = tree_workflow tree in
let fitness_profiles = Workflow.input profiles in let fitness_profiles = Workflow.input profiles in
Simulator.simulation ~branch_scale ~n_ha ~n_h0 ~ne_s ~gBGC ~tree ~seed ~fitness_profiles () Mutsel_simulator.simulation ~branch_scale ~n_ha ~n_h0 ~ne_s ~gBGC ~tree ~seed ~fitness_profiles ()
let nucleotide_alignment p = let nucleotide_alignment p =
simulation p simulation p
|> Simulator.alignment_of_simulation |> Mutsel_simulator.alignment_of_simulation
let tree ~branch_length_unit:_ { tree ; _ } = tree_workflow tree let tree ~branch_length_unit:_ { tree ; _ } = tree_workflow tree
end end
...@@ -103,7 +103,7 @@ module Mutsel = struct ...@@ -103,7 +103,7 @@ module Mutsel = struct
let f = fun%workflow () -> let f = fun%workflow () ->
let open Phylogenetics in let open Phylogenetics in
let open Codepitk in let open Codepitk in
let open Codepitk.Simulator.Site_independent_mutsel in let open Codepitk.Mutsel_simulator.Site_independent in
let module Codon = Codon.Universal_genetic_code.NS in let module Codon = Codon.Universal_genetic_code.NS in
let sim : simulation = [%eval simulation q] in let sim : simulation = [%eval simulation q] in
let result_paths = [%eval Bistro.Workflow.path_list (List.map methods ~f:(fun f -> f q))] in let result_paths = [%eval Bistro.Workflow.path_list (List.map methods ~f:(fun f -> f q))] in
......
...@@ -34,7 +34,7 @@ module Mutsel : sig ...@@ -34,7 +34,7 @@ module Mutsel : sig
val simulation : val simulation :
query -> query ->
Codepitk.Simulator.Site_independent_mutsel.simulation workflow Codepitk.Mutsel_simulator.Site_independent.simulation workflow
type benchmark = { type benchmark = {
......
...@@ -8,7 +8,7 @@ let tree_rescale_branch_length t ~scale = ...@@ -8,7 +8,7 @@ let tree_rescale_branch_length t ~scale =
{ bi with length = bi.length *. scale } { bi with length = bi.length *. scale }
) )
module Site_independent_mutsel = struct module Site_independent = struct
include Simulator.Make(Mutsel.NSCodon)(Mutsel)(Branch_info) include Simulator.Make(Mutsel.NSCodon)(Mutsel)(Branch_info)
let alignment tree ~root param = let alignment tree ~root param =
......
open Phylogenetics open Phylogenetics
module Site_independent_mutsel : sig module Site_independent : sig
type simulation = { type simulation = {
sequences : Dna.t list ; sequences : Dna.t list ;
fitness_profiles : Amino_acid.vector array ; fitness_profiles : Amino_acid.vector array ;
......
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