From a2818b06ecb0eaa92dfba24720f8f86f083b2c3c Mon Sep 17 00:00:00 2001 From: Connor McCoy Date: Sat, 16 Nov 2013 10:56:11 -0800 Subject: [PATCH 1/3] Batteries 2.1.0 Compiles, all tests pass under 3.12.1 --- opam-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam-requirements.txt b/opam-requirements.txt index a37f7402..7319de75 100644 --- a/opam-requirements.txt +++ b/opam-requirements.txt @@ -2,7 +2,7 @@ csv.1.2.2 ounit.1.1.2 xmlm.1.1.1 mcl.12-068oasis3 -batteries.2.0.0 +batteries.2.1.0 ocaml-gsl.0.6.3 sqlite3-ocaml.1.6.3 camlzip.1.05 From f24ba4e8b4ef6c86cff765bd1149aae5ae899801 Mon Sep 17 00:00:00 2001 From: Connor McCoy Date: Mon, 3 Feb 2014 14:44:03 -0800 Subject: [PATCH 2/3] 4.01.0 fixes --- pplacer_src/minimization.ml | 2 +- tests/guppy/test_unifrac.ml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pplacer_src/minimization.ml b/pplacer_src/minimization.ml index 05033fa4..f6b702d9 100644 --- a/pplacer_src/minimization.ml +++ b/pplacer_src/minimization.ml @@ -64,7 +64,7 @@ let robust_start_finder ?(max_iters=100) f raw_start left right _ = (* map those integers to their input values, and filter to make sure in * left right*) let jump_enum = Enum.filter - (fun x -> left < x & x < right) + (fun x -> left < x && x < right) (Enum.map (fun i -> raw_start +. (incr_ratio i)) jump_indices) in Enum.iter check_start jump_enum diff --git a/tests/guppy/test_unifrac.ml b/tests/guppy/test_unifrac.ml index 03c9f73e..21dfd343 100644 --- a/tests/guppy/test_unifrac.ml +++ b/tests/guppy/test_unifrac.ml @@ -13,6 +13,8 @@ let suite = [ let names, (prl, prel) = pres_of_dir Mass_map.Spread Placement.ml_ratio "simple" |> Hashtbl.enum + (* Sort by name: Hashtbl does not guarantee order *) + |> (List.of_enum %> (List.sort compare) %> List.enum) |> Enum.uncombine |> (Tuple2.map Array.of_enum (List.of_enum %> List.split)) in From 2f4c28524ddf6737090aa64f992b71e3117316ab Mon Sep 17 00:00:00 2001 From: Connor McCoy Date: Mon, 3 Feb 2014 14:52:37 -0800 Subject: [PATCH 3/3] loosen tolerance a little For some reason, the current tolerance isn't achieved in OCaml 4.01.0. Relaxing from 1e-15 to 1e-14 --- pplacer_src/pca.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pplacer_src/pca.ml b/pplacer_src/pca.ml index f8108e22..da72de92 100644 --- a/pplacer_src/pca.ml +++ b/pplacer_src/pca.ml @@ -1,6 +1,6 @@ open Ppatteries -let tol = 1e-15 +let tol = 1e-14 let max_iter = 100000