X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAlignSeq.java;h=a27c51bc71763c716df8a84769c682630227b6c7;hb=d83c0095dae033f5b4b7c81eb1493083b5cbe346;hp=bf66f30e02b2d59781cb6df06fdb722c155cd51e;hpb=34f1207ac30761e3aac6ede40075446f7fec9900;p=jalview.git diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index bf66f30..a27c51b 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * * This file is part of Jalview. @@ -143,7 +143,7 @@ public class AlignSeq public AlignSeq(SequenceI s1, String string1, SequenceI s2, String string2, String type) { - SeqInit(s1, string1, s2, string2, type); + SeqInit(s1, string1.toUpperCase(), s2, string2.toUpperCase(), type); } /** @@ -501,22 +501,23 @@ public class AlignSeq // TODO: Use original sequence characters rather than re-translated // characters in output // Find the biggest id length for formatting purposes - String s1id=s1.getName(),s2id=s2.getName(); + String s1id = s1.getName(), s2id = s2.getName(); int maxid = s1.getName().length(); if (s2.getName().length() > maxid) { maxid = s2.getName().length(); } - if (maxid>30) { + if (maxid > 30) + { maxid = 30; // JAL-527 - truncate the sequence ids - if (s1.getName().length()>maxid) + if (s1.getName().length() > maxid) { - s1id = s1.getName().substring(0,30); + s1id = s1.getName().substring(0, 30); } - if (s2.getName().length()>maxid) + if (s2.getName().length() > maxid) { - s2id = s2.getName().substring(0,30); + s2id = s2.getName().substring(0, 30); } } int len = 72 - maxid - 1; @@ -537,8 +538,7 @@ public class AlignSeq for (int j = 0; j < nochunks; j++) { // Print the first aligned sequence - output.append(new Format("%" + (maxid) + "s").form(s1id) - + " "); + output.append(new Format("%" + (maxid) + "s").form(s1id) + " "); for (int i = 0; i < len; i++) {