From: jprocter Date: Mon, 22 Aug 2005 15:40:28 +0000 (+0000) Subject: fixed uniquify seq[] X-Git-Tag: Release_2_04~30 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b27c65973d5997828f2331df8798b1d212838d8c;p=jalview.git fixed uniquify seq[] --- diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index 78f7278..662322a 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -36,6 +36,7 @@ import jalview.datamodel.*; */ public class SeqsetUtils { + /** * Store essential properties of a sequence in a hashtable for later recovery * Keys are Name, Start, End, SeqFeatures, PdbId @@ -116,20 +117,18 @@ public class SeqsetUtils Hashtable map = new Hashtable(); String[] un_names = new String[sequences.length]; - if (!write_names) + for (int i = 0; i < sequences.length; i++) { - for (int i = 0; i < sequences.length; i++) - { - String safename = new String("Sequence" + i); - map.put(safename, SeqCharacterHash(sequences[i])); + String safename = unique_name(i); + map.put(safename, SeqCharacterHash(sequences[i])); - if (write_names) - { - sequences[i].setName(safename); - } + if (write_names) + { + sequences[i].setName(safename); } } + return map; }