Permalink
Browse files

tweaks to build against batteries 2.x

  • Loading branch information...
1 parent 5590d23 commit 1f58835c77aa5eb5ddac9ffc73a3ab150c64a9b7 @mlin committed Mar 19, 2013
Showing with 15 additions and 15 deletions.
  1. +1 −1 src/ECM.ml
  2. +1 −1 src/OmegaModel.ml
  3. +8 −8 src/PhyloCSF.ml
  4. +1 −1 src/PhyloCSFModel.ml
  5. +4 −4 src/PhyloCSFTest.ml
View
@@ -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
View
@@ -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
View
@@ -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
View
@@ -1,4 +1,4 @@
-open Batteries_uni
+open Batteries
open Printf
open CamlPaml
open CamlPaml.Expr
View
@@ -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"

0 comments on commit 1f58835

Please sign in to comment.