From 33a3fce954deb65133d22664bcf24278a5516a10 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 17 Apr 2008 15:03:48 +0000 Subject: [PATCH] javadoc and quiet flag --- src/jalview/analysis/SeqsetUtils.java | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index f5ca651..3b443ab 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -178,7 +178,19 @@ public class SeqsetUtils */ public static boolean deuniquify(Hashtable map, SequenceI[] sequences) { - jalview.analysis.SequenceIdMatcher matcher = new SequenceIdMatcher( + return deuniquify(map, sequences, true); + } + /** + * recover unsafe sequence names and original properties for a sequence + * set using a map generated by @see uniquify(sequences,true) + * @param map Hashtable + * @param sequences SequenceI[] + * @param quiet when false, don't complain about sequences without any data in the map. + * @return boolean + */ + public static boolean deuniquify(Hashtable map, SequenceI[] sequences, boolean quiet) + { + jalview.analysis.SequenceIdMatcher matcher = new SequenceIdMatcher( sequences); SequenceI msq = null; Enumeration keys = map.keys(); @@ -200,12 +212,15 @@ public class SeqsetUtils } else { - System.err.println("Can't find '" + ( (String) key) + + if (!quiet) + { + System.err.println("Can't find '" + ( (String) key) + "' in uniquified alignment"); + } } } } - if (unmatched.size() > 0) + if (unmatched.size() > 0 && !quiet) { System.err.println("Did not find matches for :"); for (Enumeration i = unmatched.elements(); i.hasMoreElements(); -- 1.7.10.2