From 9f1a32dfb7e64eedc66388a8f7e054c5a90624b1 Mon Sep 17 00:00:00 2001 From: Erick Matsen Date: Fri, 25 Oct 2013 14:26:10 -0700 Subject: [PATCH] Now it's a warning. Closes #316. --- pplacer_src/gcat_model.ml | 2 +- pplacer_src/gmix_model.ml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pplacer_src/gcat_model.ml b/pplacer_src/gcat_model.ml index 91afd28a..18f798e5 100644 --- a/pplacer_src/gcat_model.ml +++ b/pplacer_src/gcat_model.ml @@ -431,7 +431,7 @@ module Glv_arr = Glv_arr.Make(Model) let init_of_json o ref_align = let model_name = Hashtbl.find o "subs_model" |> Jsontype.string in if Alignment.is_nuc_align ref_align && model_name <> "GTR" then - failwith "You have given me what appears to be a nucleotide alignment, but have specified a model other than GTR. I only know GTR for nucleotides!"; + dprint "WARNING: You have given me what appears to be a nucleotide alignment, but have specified a model other than GTR. I only know GTR for nucleotides!\n"; let empirical_freqs = Hashtbl.find o "empirical_frequencies" |> Jsontype.bool and opt_transitions = Hashtbl.Exceptionless.find o "subs_rates" |> Option.map diff --git a/pplacer_src/gmix_model.ml b/pplacer_src/gmix_model.ml index 5d5b5844..d0a19c13 100644 --- a/pplacer_src/gmix_model.ml +++ b/pplacer_src/gmix_model.ml @@ -353,7 +353,7 @@ let init_of_prefs ref_dir_complete prefs ref_align = | _ -> Parse_stats.parse_stats ref_dir_complete prefs in if Alignment.is_nuc_align ref_align && (Prefs.model_name prefs) <> "GTR" then - failwith "You have given me what appears to be a nucleotide alignment, but have specified a model other than GTR. I only know GTR for nucleotides!"; + dprint "WARNING: You have given me what appears to be a nucleotide alignment, but have specified a model other than GTR. I only know GTR for nucleotides!\n"; Glvm.Gmix_model ((Prefs.model_name prefs), (Prefs.emperical_freqs prefs), @@ -369,7 +369,7 @@ let init_of_stats_fname prefs stats_fname ref_align = let init_of_json o ref_align = let model_name = Hashtbl.find o "subs_model" |> Jsontype.string in if Alignment.is_nuc_align ref_align && model_name <> "GTR" then - failwith "You have given me what appears to be a nucleotide alignment, but have specified a model other than GTR. I only know GTR for nucleotides!"; + dprint "WARNING: You have given me what appears to be a nucleotide alignment, but have specified a model other than GTR. I only know GTR for nucleotides!\n"; if Hashtbl.find o "ras_model" |> Jsontype.string <> "gamma" then failwith "Whoops! This is supposed to be a gamma mixture model."; let gamma_o = Hashtbl.find o "gamma" in