From: jprocter Date: Thu, 17 Apr 2008 15:03:48 +0000 (+0000) Subject: javadoc and quiet flag X-Git-Tag: Release_2_4~116 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=33a3fce954deb65133d22664bcf24278a5516a10;p=jalview.git javadoc and quiet flag --- 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();