diff --git a/src/ECM.ml b/src/ECM.ml index 0084bd1..ed43383 100644 --- a/src/ECM.ml +++ b/src/ECM.ml @@ -6,7 +6,7 @@ Kosiol C, Holmes I and Goldman N. An Empirical Codon Model for Protein Sequence However, note that Kosiol et al. presented a 61x61 model while PhyloCSF uses a 64x64 model (including stop codons) *) -open Batteries_uni +open Batteries open Printf open CamlPaml open Expr diff --git a/src/OmegaModel.ml b/src/OmegaModel.ml index 395e19c..71646e5 100644 --- a/src/OmegaModel.ml +++ b/src/OmegaModel.ml @@ -1,6 +1,6 @@ (** omega (dN/dS) test, similar to using PAML to test for omega<1, but with a few of our own touches *) -open Batteries_uni +open Batteries open Printf open CamlPaml diff --git a/src/PhyloCSF.ml b/src/PhyloCSF.ml index 8d6e74b..ca30168 100644 --- a/src/PhyloCSF.ml +++ b/src/PhyloCSF.ml @@ -1,14 +1,14 @@ (* Wish list: PHYLIP alignment format *) -open Batteries_uni -open OptParse +open Batteries +open Extlib.OptParse open Printf open CamlPaml Gsl.Error.init () -module SMap = Map.StringMap -module SSet = Set.StringSet +module SMap = Map.Make(struct type t = string let compare = compare end) +module SSet = Set.Make(struct type t = string let compare = compare end) module Codon = CamlPaml.Code.Codon64 type strategy = PhyloCSF of [`MaxLik | `FixedLik] | OmegaTest | Nop type reading_frame = One | Three | Six @@ -371,9 +371,9 @@ let parse_kv lines = else try let (k,v) = String.split line "\t" - PMap.add k v kv - with Not_found -> PMap.add line "" kv - fold f PMap.empty lines + Map.add k v kv + with Not_found -> Map.add line "" kv + fold f Map.empty lines let initialize_strategy () = let paramfile ?(required=true) suffix = @@ -428,7 +428,7 @@ let initialize_strategy () = if Sys.file_exists fn_config then try let kv = parse_kv (File.lines_of fn_config) - Some (float_of_string (PMap.find "omega_H1" kv)), Some (float_of_string (PMap.find "sigma_H1" kv)) + Some (float_of_string (Map.find "omega_H1" kv)), Some (float_of_string (Map.find "sigma_H1" kv)) with | exn -> failwith (sprintf "configuration file %s exists but does not specify valid omega_H1 and sigma_H1 values" fn_config) else diff --git a/src/PhyloCSFModel.ml b/src/PhyloCSFModel.ml index 3e755ee..f33a7de 100644 --- a/src/PhyloCSFModel.ml +++ b/src/PhyloCSFModel.ml @@ -1,4 +1,4 @@ -open Batteries_uni +open Batteries open Printf open CamlPaml open CamlPaml.Expr diff --git a/src/PhyloCSFTest.ml b/src/PhyloCSFTest.ml index 8a916fe..f03a2f2 100644 --- a/src/PhyloCSFTest.ml +++ b/src/PhyloCSFTest.ml @@ -2,8 +2,8 @@ _build/PhyloCSFTest.native "_build/PhyloCSF.native --frames=6 --orf=ATGStop --strategy=fixed" ../PhyloCSF_Parameters/12flies *) -open Batteries_uni -open OptParse +open Batteries +open Extlib.OptParse open Printf open CamlPaml @@ -124,7 +124,7 @@ let mfa headers seqs = Buffer.add_char buf '\n' headers seqs - buf + Buffer.contents buf let open_phylocsf () = let cmd = sprintf "%s %s" fn_exe fp_params @@ -142,7 +142,7 @@ let main () = flush stdout flush stderr let out = open_phylocsf () - Buffer.output_buffer out aln + output_string out aln flush out ignore (Unix.close_process_out out) printf "\n"