From: amwaterhouse Date: Fri, 30 Sep 2005 17:03:03 +0000 (+0000) Subject: Remove redundancy in Eclipse X-Git-Tag: Release_2_07~75 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f24dacb1da56fccf05d684e2f4899facec2aecf7;p=jalview.git Remove redundancy in Eclipse --- diff --git a/src/com/stevesoft/pat/Bits.java b/src/com/stevesoft/pat/Bits.java index 244889f..0c67903 100755 --- a/src/com/stevesoft/pat/Bits.java +++ b/src/com/stevesoft/pat/Bits.java @@ -7,7 +7,6 @@ package// // com.stevesoft.pat; -import java.io.*; public class Bits { char[] carray; diff --git a/src/com/stevesoft/pat/DirFileRegex.java b/src/com/stevesoft/pat/DirFileRegex.java index 731457c..c46762e 100755 --- a/src/com/stevesoft/pat/DirFileRegex.java +++ b/src/com/stevesoft/pat/DirFileRegex.java @@ -6,7 +6,6 @@ // -- Happy Computing! // package com.stevesoft.pat; -import java.io.File; /** This class is just like FileRegex, except that its accept method only returns true if the file matching the pattern is a directory.*/ diff --git a/src/com/stevesoft/pat/NonDirFileRegex.java b/src/com/stevesoft/pat/NonDirFileRegex.java index 92f54a3..7ef24a3 100755 --- a/src/com/stevesoft/pat/NonDirFileRegex.java +++ b/src/com/stevesoft/pat/NonDirFileRegex.java @@ -6,7 +6,6 @@ // -- Happy Computing! // package com.stevesoft.pat; -import java.io.File; /** This class is just like FileRegex, except that its accept method only returns true if the file matching the pattern is not a directory.*/ diff --git a/src/com/stevesoft/pat/OrMark.java b/src/com/stevesoft/pat/OrMark.java index e9bf0ca..c323a9d 100755 --- a/src/com/stevesoft/pat/OrMark.java +++ b/src/com/stevesoft/pat/OrMark.java @@ -7,7 +7,6 @@ // package com.stevesoft.pat; import java.util.Hashtable; -import java.util.Vector; /** Implements the parenthesis pattern subelement.*/ class OrMark extends Or { diff --git a/src/com/stevesoft/pat/PartialBuffer.java b/src/com/stevesoft/pat/PartialBuffer.java index 2239545..fd57b27 100755 --- a/src/com/stevesoft/pat/PartialBuffer.java +++ b/src/com/stevesoft/pat/PartialBuffer.java @@ -7,7 +7,6 @@ // package com.stevesoft.pat; -import java.io.*; /** This class allows you to match on a partial string. If the allowOverRun flag is true, then the diff --git a/src/com/stevesoft/pat/RBuffer.java b/src/com/stevesoft/pat/RBuffer.java index 08fb920..b9dda64 100755 --- a/src/com/stevesoft/pat/RBuffer.java +++ b/src/com/stevesoft/pat/RBuffer.java @@ -7,8 +7,6 @@ // package com.stevesoft.pat; -import java.io.*; -import com.stevesoft.pat.wrap.*; /** This class is used internally by RegexReader to store blocks of data. */ diff --git a/src/com/stevesoft/pat/RegOpt.java b/src/com/stevesoft/pat/RegOpt.java index 1033500..bf99e36 100755 --- a/src/com/stevesoft/pat/RegOpt.java +++ b/src/com/stevesoft/pat/RegOpt.java @@ -7,7 +7,6 @@ // package com.stevesoft.pat; import java.util.*; -import java.io.*; /** This class is just like oneChar, but doesn't worry about case. */ class FastChar extends oneChar { diff --git a/src/com/stevesoft/pat/RegRes.java b/src/com/stevesoft/pat/RegRes.java index f181564..76ff4ea 100755 --- a/src/com/stevesoft/pat/RegRes.java +++ b/src/com/stevesoft/pat/RegRes.java @@ -6,8 +6,6 @@ // -- Happy Computing! // package com.stevesoft.pat; -import java.util.*; - /** Shareware: package pat Copyright 2001, Steven R. Brandt diff --git a/src/com/stevesoft/pat/Regex.java b/src/com/stevesoft/pat/Regex.java index c7379de..665632e 100755 --- a/src/com/stevesoft/pat/Regex.java +++ b/src/com/stevesoft/pat/Regex.java @@ -832,7 +832,7 @@ public class Regex extends RegRes implements FilenameFilter { while(!sp.match(')')) sp.inc(); } else if(sp.dontMatch && sp.c == 'w') { - Regex r = new Regex(); + //Regex r = new Regex(); //r._compile("[a-zA-Z0-9_]",mk); //add(new Goop("\\w",r.thePattern)); Bracket b = new Bracket(false); @@ -853,14 +853,14 @@ public class Regex extends RegRes implements FilenameFilter { b.addOr(new oneChar((char)13)); add(b); } else if(sp.dontMatch && sp.c == 'd') { - Regex r = new Regex(); + //Regex r = new Regex(); //r._compile("[0-9]",mk); //add(new Goop("\\d",r.thePattern)); Range digit = new Range('0','9'); digit.printBrackets = true; add(digit); } else if(sp.dontMatch && sp.c == 'W') { - Regex r = new Regex(); + //Regex r = new Regex(); //r._compile("[^a-zA-Z0-9_]",mk); //add(new Goop("\\W",r.thePattern)); Bracket b = new Bracket(true); @@ -1003,7 +1003,7 @@ public class Regex extends RegRes implements FilenameFilter { } else if(sp.match('{')) { boolean bad = false; StrPos sp2 = new StrPos(sp); - StringBuffer sb = new StringBuffer(); + //StringBuffer sb = new StringBuffer(); sp.inc(); patInt i1 = sp.getPatInt(); patInt i2 = null; diff --git a/src/com/stevesoft/pat/RegexTokenizer.java b/src/com/stevesoft/pat/RegexTokenizer.java index 40302a4..bc6fe51 100755 --- a/src/com/stevesoft/pat/RegexTokenizer.java +++ b/src/com/stevesoft/pat/RegexTokenizer.java @@ -47,14 +47,14 @@ public class RegexTokenizer implements Enumeration { public RegexTokenizer(String txt,String ptrn) { toParse = txt; r = new Regex(ptrn); - offset = r.BackRefOffset; + offset = Regex.BackRefOffset; getMore(); } /** Initialize the tokenizer with a Regex object. */ public RegexTokenizer(String txt,Regex r) { toParse = txt; this.r = r; - offset = r.BackRefOffset; + offset = Regex.BackRefOffset; getMore(); } /** This should always be cast to a String, as in StringTokenizer, @@ -94,7 +94,7 @@ public class RegexTokenizer implements Enumeration { public boolean hasMoreTokens() { return hasMoreElements(); } /** Determines the # of remaining tokens */ public int countTokens() { - int old_pos=pos,_count=count; + int _count=count; while(hasMoreTokens()) nextToken(); count=_count; diff --git a/src/com/stevesoft/pat/Replacer.java b/src/com/stevesoft/pat/Replacer.java index c78a11d..bdeea39 100755 --- a/src/com/stevesoft/pat/Replacer.java +++ b/src/com/stevesoft/pat/Replacer.java @@ -7,7 +7,6 @@ // package com.stevesoft.pat; -import java.util.*; import com.stevesoft.pat.wrap.StringWrap; /** Internally used class. */ @@ -182,7 +181,6 @@ public class Replacer { for(int ii=pos;ii2) sk = new SkipBMH(st,ignoreCase,offset); diff --git a/src/com/stevesoft/pat/StrPos.java b/src/com/stevesoft/pat/StrPos.java index 4a9f287..6043625 100755 --- a/src/com/stevesoft/pat/StrPos.java +++ b/src/com/stevesoft/pat/StrPos.java @@ -99,7 +99,6 @@ public class StrPos { } /** Read in an integer. */ public patInt getPatInt() { - patInt pi = null; if(incMatch("inf")) return new patInf(); int i,cnt=0; diff --git a/src/com/stevesoft/pat/StringBufferLike.java b/src/com/stevesoft/pat/StringBufferLike.java index 6987eec..18fa994 100755 --- a/src/com/stevesoft/pat/StringBufferLike.java +++ b/src/com/stevesoft/pat/StringBufferLike.java @@ -7,7 +7,6 @@ package// // com.stevesoft.pat; -import com.stevesoft.pat.*; /** A tool that is used to make the \E, \U, \L, and \Q elements of a substitution. */ diff --git a/src/com/stevesoft/pat/TransPat.java b/src/com/stevesoft/pat/TransPat.java index 27c1fb2..125a7bd 100755 --- a/src/com/stevesoft/pat/TransPat.java +++ b/src/com/stevesoft/pat/TransPat.java @@ -7,7 +7,6 @@ // package com.stevesoft.pat; -import java.util.*; /** This class is used to implement the Transformer @see com.stevesoft.pat.Transform @@ -27,7 +26,7 @@ class TransPat extends Pattern { for(int i=0;i= 0) { pn = i; diff --git a/src/com/stevesoft/pat/Transformer.java b/src/com/stevesoft/pat/Transformer.java index f65afb4..14f7e38 100755 --- a/src/com/stevesoft/pat/Transformer.java +++ b/src/com/stevesoft/pat/Transformer.java @@ -7,7 +7,6 @@ // package com.stevesoft.pat; -import java.util.Vector; import com.stevesoft.pat.wrap.StringWrap; /** Replacement rule used by the Transformer. diff --git a/src/ext/vamsas/JpredSoapBindingStub.java b/src/ext/vamsas/JpredSoapBindingStub.java index 360a522..a42bc49 100755 --- a/src/ext/vamsas/JpredSoapBindingStub.java +++ b/src/ext/vamsas/JpredSoapBindingStub.java @@ -83,14 +83,14 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub implements javax.xml.namespace.QName qName; java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; - java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; + /*java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; - java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; + java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;*/ qName = new javax.xml.namespace.QName("http://simple.objects.vamsas", "JpredResult"); cachedSerQNames.add(qName); cls = vamsas.objects.simple.JpredResult.class; diff --git a/src/ext/vamsas/MuscleWSSoapBindingStub.java b/src/ext/vamsas/MuscleWSSoapBindingStub.java index 35e2470..c56432d 100755 --- a/src/ext/vamsas/MuscleWSSoapBindingStub.java +++ b/src/ext/vamsas/MuscleWSSoapBindingStub.java @@ -61,14 +61,14 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub javax.xml.namespace.QName qName; java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; - java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; - java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; + //java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; + //java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; - java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; - java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; - java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; - java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; + //java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; + // java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; + //java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; + //java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; qName = new javax.xml.namespace.QName("simple.objects.vamsas", "Sequence"); cachedSerQNames.add(qName); diff --git a/src/ext/vamsas/RegistryServiceSoapBindingStub.java b/src/ext/vamsas/RegistryServiceSoapBindingStub.java index cf72cb1..6379c0c 100755 --- a/src/ext/vamsas/RegistryServiceSoapBindingStub.java +++ b/src/ext/vamsas/RegistryServiceSoapBindingStub.java @@ -52,14 +52,14 @@ public class RegistryServiceSoapBindingStub extends org.apache.axis.client.Stub javax.xml.namespace.QName qName; java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; - java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; - java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; + //java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; + //java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; - java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; - java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; - java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; - java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; + //java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; + //java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; + //java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; + //java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; qName = new javax.xml.namespace.QName("vamsas", "ArrayOf_tns1_ServiceHandle"); cachedSerQNames.add(qName); cls = ext.vamsas.ServiceHandle[].class; diff --git a/src/jalview/analysis/AAFrequency.java b/src/jalview/analysis/AAFrequency.java index 461b545..ad1fe4e 100755 --- a/src/jalview/analysis/AAFrequency.java +++ b/src/jalview/analysis/AAFrequency.java @@ -18,8 +18,6 @@ */ package jalview.analysis; -import jalview.analysis.*; - import jalview.datamodel.*; import java.util.*; diff --git a/src/jalview/analysis/NJTree.java b/src/jalview/analysis/NJTree.java index 71d6737..97b8519 100755 --- a/src/jalview/analysis/NJTree.java +++ b/src/jalview/analysis/NJTree.java @@ -251,14 +251,14 @@ public class NJTree { while (noClus > 2) { - if (type.equals("NJ")) + /* if (type.equals("NJ")) { float mind = findMinNJDistance(); } else { float mind = findMinDistance(); - } + }*/ Cluster c = joinClusters(mini, minj); @@ -273,7 +273,7 @@ public class NJTree boolean onefound = false; int one = -1; - int two = -1; + //int two = -1; for (int i = 0; i < noseqs; i++) { @@ -281,7 +281,7 @@ public class NJTree { if (onefound == false) { - two = i; + //two = i; onefound = true; } else @@ -291,7 +291,7 @@ public class NJTree } } - Cluster c = joinClusters(one, two); + // Cluster c = joinClusters(one, two); top = (SequenceNode) (node.elementAt(one)); reCount(top); @@ -375,11 +375,11 @@ public class NJTree public void findNewNJDistances(SequenceNode tmpi, SequenceNode tmpj, float dist) { - float ih = 0; - float jh = 0; + //float ih = 0; + // float jh = 0; - SequenceNode sni = tmpi; - SequenceNode snj = tmpj; + //SequenceNode sni = tmpi; + //SequenceNode snj = tmpj; tmpi.dist = ((dist + ri) - rj) / 2; tmpj.dist = (dist - tmpi.dist); @@ -469,8 +469,8 @@ public class NJTree */ public void findClusterNJDistance(int i, int j) { - int noi = ((Cluster) cluster.elementAt(i)).value.length; - int noj = ((Cluster) cluster.elementAt(j)).value.length; + //int noi = ((Cluster) cluster.elementAt(i)).value.length; + //int noj = ((Cluster) cluster.elementAt(j)).value.length; // New distances from cluster to others float[] newdist = new float[noseqs]; @@ -1121,15 +1121,6 @@ public class NJTree } } - /** - * DOCUMENT ME! - * - * @param node DOCUMENT ME! - */ - public void setMaxDist(SequenceNode node) - { - this.maxdist = maxdist; - } /** * DOCUMENT ME! diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index 662322a..bd0f45c 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -115,7 +115,7 @@ public class SeqsetUtils { // Generate a safely named sequence set and a hash to recover the sequence names Hashtable map = new Hashtable(); - String[] un_names = new String[sequences.length]; + //String[] un_names = new String[sequences.length]; for (int i = 0; i < sequences.length; i++) { diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 0f275de..e303500 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -55,7 +55,6 @@ public class AlignFrame { try { - treeFile = treeFile; jalview.io.NewickFile fin = new jalview.io.NewickFile(applet. getCodeBase() + treeFile, "URL"); fin.parse(); @@ -771,7 +770,7 @@ public class AlignFrame public void findMenuItem_actionPerformed(ActionEvent e) { - Finder finder = new Finder(alignPanel); + new Finder(alignPanel); } public void font_actionPerformed(ActionEvent e) @@ -1091,7 +1090,7 @@ public class AlignFrame public void userDefinedColour_actionPerformed(ActionEvent e) { - UserDefinedColours chooser = new UserDefinedColours(alignPanel, null); + new UserDefinedColours(alignPanel, null); } public void PIDColour_actionPerformed(ActionEvent e) diff --git a/src/jalview/appletgui/FontChooser.java b/src/jalview/appletgui/FontChooser.java index e424a42..17fe98a 100755 --- a/src/jalview/appletgui/FontChooser.java +++ b/src/jalview/appletgui/FontChooser.java @@ -48,7 +48,6 @@ public class FontChooser void init() { - this.ap = ap; String fonts[] = Toolkit.getDefaultToolkit().getFontList(); for (int i = 0; i < fonts.length; i++) { diff --git a/src/jalview/appletgui/IdCanvas.java b/src/jalview/appletgui/IdCanvas.java index 30560d7..a277adb 100755 --- a/src/jalview/appletgui/IdCanvas.java +++ b/src/jalview/appletgui/IdCanvas.java @@ -21,7 +21,6 @@ package jalview.appletgui; import java.awt.*; -import jalview.analysis.*; import jalview.datamodel.*; public class IdCanvas diff --git a/src/jalview/appletgui/PairwiseAlignPanel.java b/src/jalview/appletgui/PairwiseAlignPanel.java index c9285dd..d5243e3 100755 --- a/src/jalview/appletgui/PairwiseAlignPanel.java +++ b/src/jalview/appletgui/PairwiseAlignPanel.java @@ -88,7 +88,7 @@ public class PairwiseAlignPanel seq[i] = (Sequence) sequences.elementAt(i); } - AlignFrame af = new AlignFrame(new Alignment(seq), + new AlignFrame(new Alignment(seq), ap.alignFrame.applet, "Pairwise Aligned Sequences"); diff --git a/src/jalview/appletgui/RotatableCanvas.java b/src/jalview/appletgui/RotatableCanvas.java index 82207a2..5daa320 100755 --- a/src/jalview/appletgui/RotatableCanvas.java +++ b/src/jalview/appletgui/RotatableCanvas.java @@ -97,7 +97,6 @@ public class RotatableCanvas { this.points = points; this.npoint = npoint; - this.av = av; PaintRefresher.Register(this, av.alignment); prefsize = getPreferredSize(); @@ -348,7 +347,7 @@ public class RotatableCanvas public void drawScene(Graphics g) { - boolean darker = false; + //boolean darker = false; int halfwidth = getSize().width / 2; int halfheight = getSize().height / 2; @@ -564,7 +563,7 @@ public class RotatableCanvas public void rectSelect(int x1, int y1, int x2, int y2) { - boolean changedSel = false; + //boolean changedSel = false; for (int i = 0; i < npoint; i++) { SequencePoint sp = (SequencePoint) points.elementAt(i); diff --git a/src/jalview/appletgui/TreeCanvas.java b/src/jalview/appletgui/TreeCanvas.java index 76569dd..d4202c3 100755 --- a/src/jalview/appletgui/TreeCanvas.java +++ b/src/jalview/appletgui/TreeCanvas.java @@ -295,9 +295,9 @@ public class TreeCanvas if (node.left() == null && node.right() == null) { float height = node.height; - float dist = node.dist; + //float dist = node.dist; - int xstart = (int) ( (height - dist) * scale) + offx; + //int xstart = (int) ( (height - dist) * scale) + offx; int xend = (int) (height * scale) + offx; int ypos = (int) (node.ycount * chunk) + offy; diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 3866140..c88c92a 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -22,7 +22,6 @@ import java.io.*; import java.util.*; -import java.net.*; import org.apache.log4j.Logger; import org.apache.log4j.SimpleLayout; import org.apache.log4j.Level; diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 9a85471..910c947 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -20,8 +20,6 @@ package jalview.bin; import jalview.gui.*; -import org.apache.log4j.*; - import javax.swing.*; import java.util.Vector; diff --git a/src/jalview/datamodel/BinarySequence.java b/src/jalview/datamodel/BinarySequence.java index 3cc6910..89d3971 100755 --- a/src/jalview/datamodel/BinarySequence.java +++ b/src/jalview/datamodel/BinarySequence.java @@ -18,15 +18,8 @@ */ package jalview.datamodel; -import jalview.analysis.PCA; - -import jalview.io.*; - -import jalview.jbgui.*; - import jalview.schemes.*; -import java.awt.*; /** diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 824a33b..d30003d 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -18,8 +18,6 @@ */ package jalview.datamodel; -import jalview.analysis.*; - import java.awt.*; import java.util.*; diff --git a/src/jalview/datamodel/SuperGroup.java b/src/jalview/datamodel/SuperGroup.java index b2993b5..6c0e604 100755 --- a/src/jalview/datamodel/SuperGroup.java +++ b/src/jalview/datamodel/SuperGroup.java @@ -18,8 +18,6 @@ */ package jalview.datamodel; -import jalview.datamodel.*; - import jalview.schemes.*; import java.util.*; diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 9243e99..90e911e 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -27,7 +27,6 @@ import java.awt.datatransfer.*; import java.awt.event.*; import java.awt.print.*; import javax.swing.*; -import javax.swing.event.*; import jalview.analysis.*; import jalview.datamodel.*; @@ -1280,7 +1279,7 @@ public class AlignFrame if (viewport.showSequenceFeatures && ! ( (Alignment) viewport.alignment).featuresAdded) { - SequenceFeatureFetcher sft = new SequenceFeatureFetcher(viewport. + new SequenceFeatureFetcher(viewport. alignment, alignPanel); ( (Alignment) viewport.alignment).featuresAdded = true; @@ -1627,8 +1626,6 @@ public class AlignFrame conservationMenuItem.setSelected(false); viewport.setConservationSelected(false); - ColourSchemeI cs = viewport.getGlobalColourScheme(); - changeColour(viewport.getGlobalColourScheme()); modifyPID_actionPerformed(null); @@ -2242,11 +2239,11 @@ public class AlignFrame */ public void BuildWebServiceMenu() { - if ( (Desktop.discoverer.services != null) - && (Desktop.discoverer.services.size() > 0)) + if ( (Discoverer.services != null) + && (Discoverer.services.size() > 0)) { - Vector msaws = (Vector) Desktop.discoverer.services.get("MsaWS"); - Vector secstrpr = (Vector) Desktop.discoverer.services.get("SecStrPred"); + Vector msaws = (Vector) Discoverer.services.get("MsaWS"); + Vector secstrpr = (Vector) Discoverer.services.get("SecStrPred"); Vector wsmenu = new Vector(); if (msaws != null) { @@ -2262,7 +2259,7 @@ public class AlignFrame public void actionPerformed(ActionEvent e) { SequenceI[] msa = gatherSequencesForAlignment(); - MsaWSClient ct = new jalview.ws.MsaWSClient(sh, title, msa, + new jalview.ws.MsaWSClient(sh, title, msa, false, true); } @@ -2279,7 +2276,7 @@ public class AlignFrame public void actionPerformed(ActionEvent e) { SequenceI[] msa = gatherSequencesForAlignment(); - MsaWSClient ct = new jalview.ws.MsaWSClient(sh, title, msa, + new jalview.ws.MsaWSClient(sh, title, msa, true, true); } @@ -2308,8 +2305,7 @@ public class AlignFrame if (msa.length == 1) { // Single Sequence prediction - jalview.ws.JPredClient ct = new jalview.ws.JPredClient(sh, - title, msa[0]); + new jalview.ws.JPredClient(sh,title, msa[0]); } else { @@ -2342,4 +2338,30 @@ public class AlignFrame // TODO: group services by location as well as function. } + public void vamsasStore_actionPerformed(ActionEvent e) +{ + /* JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. + getProperty("LAST_DIRECTORY")); + + chooser.setFileView(new JalviewFileView()); + chooser.setDialogTitle("Export to Vamsas file"); + chooser.setToolTipText("Export"); + + int value = chooser.showSaveDialog(this); + */ + // if (value == JalviewFileChooser.APPROVE_OPTION) + { + jalview.io.VamsasDatastore vs = new jalview.io.VamsasDatastore(viewport); + vs.store("C:\\Documents And Settings\\andrew\\Desktop\\vamsas.zip"); + // chooser.getSelectedFile().getAbsolutePath(); + } +} + +public void vamsasLoad_actionPerformed(ActionEvent e) +{ + jalview.io.VamsasDatastore vs = new jalview.io.VamsasDatastore(viewport); + vs.load("C:\\Documents And Settings\\andrew\\Desktop\\vamsas.zip"); +} + + } diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index d1187ac..a9d532c 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -128,6 +128,13 @@ public class AlignmentPanel extends GAlignmentPanel case KeyEvent.VK_DELETE: alignFrame.cut_actionPerformed(null); break; + + case KeyEvent.VK_P: + seqPanel.seqCanvas.increaseAARatio(); + break; + case KeyEvent.VK_L: + seqPanel.seqCanvas.decreaseAARation(); + break; } } @@ -294,6 +301,7 @@ public class AlignmentPanel extends GAlignmentPanel annotationSpaceFillerHolder.setVisible(b); annotationScroller.setVisible(b); } + repaint(); } /** diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java index 57dabff..db6fb18 100755 --- a/src/jalview/gui/CutAndPasteTransfer.java +++ b/src/jalview/gui/CutAndPasteTransfer.java @@ -29,7 +29,6 @@ import java.awt.datatransfer.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.event.InternalFrameEvent; /** diff --git a/src/jalview/gui/EPSOptions.java b/src/jalview/gui/EPSOptions.java index 78c1f02..5926563 100755 --- a/src/jalview/gui/EPSOptions.java +++ b/src/jalview/gui/EPSOptions.java @@ -50,7 +50,7 @@ public class EPSOptions null, new Object[]{this}); dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options"); - dialog.show(); + dialog.setVisible(true); } @@ -122,13 +122,13 @@ public class EPSOptions jalview.bin.Cache.setProperty("EPS_RENDERING", value); } - dialog.hide(); + dialog.setVisible(false); } public void cancel_actionPerformed(ActionEvent e) { cancelled = true; - dialog.hide(); + dialog.setVisible(false); } public String getValue() diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index 7d283ba..9b1f10d 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -18,8 +18,6 @@ */ package jalview.gui; -import jalview.analysis.*; - import jalview.datamodel.*; import java.awt.*; diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index a6b1066..32aad84 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -18,8 +18,6 @@ */ package jalview.gui; -import jalview.bin.*; - import jalview.io.*; import jalview.jbgui.*; diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 303aac6..42c52d3 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -396,6 +396,7 @@ public class SeqCanvas extends JComponent while ((ypos <= canvasHeight) && (startRes < av.alignment.getWidth())) { + g.setFont(av.getFont()); g.setColor(Color.black); if (av.scaleLeftWrapped) @@ -489,24 +490,84 @@ public class SeqCanvas extends JComponent * @param starty DOCUMENT ME! * @param offset DOCUMENT ME! */ + + float aaRatio = 2f/3f; + public void increaseAARatio() + { + aaRatio += .025; + if(aaRatio>1) + aaRatio = 1; + + repaint(); + } + + public void decreaseAARation() + { + aaRatio -= .025; + if(aaRatio<0) + aaRatio = 0; + + repaint(); + } + synchronized public void drawPanel(Graphics g1, int x1, int x2, int y1, int y2, int startx, int starty, int offset) { Graphics2D g = (Graphics2D) g1; g.setFont(av.getFont()); - SequenceI nextSeq; + + SequenceI nextSeq; + + SequenceI dna = null; + + int aaHeight = (int)(av.getCharHeight()*aaRatio); + int dnaHeight =(int)(av.getCharHeight() * (1-aaRatio)); + + + java.awt.geom.AffineTransform transform = new java.awt.geom.AffineTransform(); + transform.scale(1f/3f , 1); + Font dnafont = new Font(av.getFont().getName(), av.getFont().getStyle(), + dnaHeight); + dnafont = dnafont.deriveFont(transform); + + Font aafont = new Font(av.getFont().getName(), av.getFont().getStyle(), + aaHeight); + transform = new java.awt.geom.AffineTransform(); + transform.scale(1/aaRatio, 1); + aafont = aafont.deriveFont(transform); /// First draw the sequences ///////////////////////////// for (int i = y1; i < y2; i++) { nextSeq = av.alignment.getSequenceAt(i); + g.setFont(aafont); +/* + StringBuffer dnasb = new StringBuffer(); + for (int j = 0; j < nextSeq.getLength(); j++) + { + java.util.Vector codons = jalview.schemes.ResidueProperties.getCodons(nextSeq.getSequence(j, + j + 1)); + if (codons != null && codons.size() > 0) + dnasb.append(codons.elementAt(0).toString()); + } + + dna = new Sequence("dna", dnasb.toString());*/ + sr.drawSequence(g, nextSeq, av.alignment.findAllGroups(nextSeq), - x1, x2, (x1 - startx) * av.charWidth, - offset + ((i - starty) * av.charHeight), av.charWidth, - av.charHeight); + x1, x2, (x1 - startx) * av.charWidth, + offset + ( (i - starty) * av.charHeight), av.charWidth, + aaHeight); + + + /* g.setFont(dnafont); + + sr.drawSequence(g, dna, null, + x1, x2 * 3 +2, ( (x1 - startx) * av.charWidth) / 3, + offset + ( (i - starty) * av.charHeight) + aaHeight, av.charWidth / 3, + dnaHeight);*/ if (av.showSequenceFeatures) { diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index ab5ed30..a68b226 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -18,8 +18,6 @@ */ package jalview.gui; -import jalview.analysis.*; - import jalview.datamodel.*; import jalview.schemes.*; diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 81daef7..8e8b066 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -208,6 +208,14 @@ public class SequenceRenderer int charOffset = 0; char s; + float fwidth = width + ((float)av.charWidth/(float)width)/width; + + + if(av.charWidth != (av.charWidth/width)*width) + { + + } + // Need to find the sequence position here. String sequence = seq.getSequence(); @@ -262,7 +270,7 @@ public class SequenceRenderer charOffset = (width - fm.charWidth(s)) / 2; graphics.drawString(String.valueOf(s), - charOffset + x1 + (width * (i - start)), (y1 + height) - pady); + charOffset + x1 + (int)(fwidth * (i - start)), (y1 + height) - pady); } } diff --git a/src/jalview/gui/TreePanel.java b/src/jalview/gui/TreePanel.java index fea4704..1d197c3 100755 --- a/src/jalview/gui/TreePanel.java +++ b/src/jalview/gui/TreePanel.java @@ -38,7 +38,6 @@ import java.util.*; import javax.imageio.*; -import javax.swing.*; import java.beans.PropertyChangeEvent; diff --git a/src/jalview/io/EBIFetchClient.java b/src/jalview/io/EBIFetchClient.java index 2c829ff..eebbfc8 100755 --- a/src/jalview/io/EBIFetchClient.java +++ b/src/jalview/io/EBIFetchClient.java @@ -24,8 +24,6 @@ import org.apache.axis.encoding.XMLType; import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory; import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory; -import java.io.*; - import javax.activation.DataHandler; import javax.xml.namespace.QName; diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java index 08eacd6..201ff0c 100755 --- a/src/jalview/io/HTMLOutput.java +++ b/src/jalview/io/HTMLOutput.java @@ -114,9 +114,6 @@ public class HTMLOutput SequenceI seq; ColourSchemeI cs = null; AlignmentI alignment = av.getAlignment(); - String r; - String g; - String b; // draws the top row, the measure rule out.println(""); diff --git a/src/jalview/io/JPredFile.java b/src/jalview/io/JPredFile.java index 5483f94..cadf153 100755 --- a/src/jalview/io/JPredFile.java +++ b/src/jalview/io/JPredFile.java @@ -26,8 +26,6 @@ package jalview.io; import jalview.datamodel.*; -import jalview.util.*; - import java.io.*; import java.util.*; diff --git a/src/jalview/io/JalviewFileChooser.java b/src/jalview/io/JalviewFileChooser.java index 33d18a3..2bac0de 100755 --- a/src/jalview/io/JalviewFileChooser.java +++ b/src/jalview/io/JalviewFileChooser.java @@ -162,7 +162,7 @@ public class JalviewFileChooser if (confirm != JOptionPane.YES_OPTION) { - ret = this.CANCEL_OPTION; + ret = JalviewFileChooser.CANCEL_OPTION; } } diff --git a/src/jalview/io/JalviewFileFilter.java b/src/jalview/io/JalviewFileFilter.java index cdd868c..3252a98 100755 --- a/src/jalview/io/JalviewFileFilter.java +++ b/src/jalview/io/JalviewFileFilter.java @@ -26,8 +26,6 @@ import javax.swing.filechooser.FileFilter; public class JalviewFileFilter extends FileFilter { - private static String TYPE_UNKNOWN = "Type Unknown"; - private static String HIDDEN_FILE = "Hidden File"; public static Hashtable suffixHash = new Hashtable(); private Hashtable filters = null; private String description = "no description"; diff --git a/src/jalview/io/MSFfile.java b/src/jalview/io/MSFfile.java index 0475542..8082ee3 100755 --- a/src/jalview/io/MSFfile.java +++ b/src/jalview/io/MSFfile.java @@ -72,9 +72,6 @@ public class MSFfile extends AlignFile */ public void parse() { - com.stevesoft.pat.Regex gapre = new com.stevesoft.pat.Regex("\\~", - "-"); - int i = 0; boolean seqFlag = false; String key = new String(); @@ -150,7 +147,7 @@ public class MSFfile extends AlignFile String head = headers.elementAt(i).toString(); String seq = seqhash.get(head).toString(); - int start = 1; + int start = -1; int end = -1; if (maxLength < head.length()) @@ -179,7 +176,7 @@ public class MSFfile extends AlignFile // Replace ~ with a sensible gap character - seq = gapre.replaceAll(seq); + seq = seq.replace('~', '-'); Sequence newSeq = new Sequence(head, seq, start, end); @@ -202,22 +199,18 @@ public class MSFfile extends AlignFile */ public static int checkSum(String seq) { - //String chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.*~&@"; int check = 0; String sequence = seq.toUpperCase(); - String index = "--------------------------------------&---*---.-----------------@ABCDEFGHIJKLMNOPQRSTUVWXYZ------ABCDEFGHIJKLMNOPQRSTUVWXYZ----@"; - index += "--------------------------------------------------------------------------------------------------------------------------------"; - for (int i = 0; i < sequence.length(); i++) { try { - int pos = index.indexOf(sequence.charAt(i)); - if (index.charAt(pos)!='_') + int value = sequence.charAt(i); + if (value!=-1) { - check += (((i % 57) + 1) * pos); + check += (i % 57 +1) * value; } } catch (Exception e) @@ -250,10 +243,10 @@ public class MSFfile extends AlignFile * * @return DOCUMENT ME! */ - public static String print(SequenceI[] s, boolean is_NA) + public static String print(SequenceI[] seqs, boolean is_NA) { - com.stevesoft.pat.Regex re2gap = new com.stevesoft.pat.Regex( - "[" + jalview.util.Comparison.GapChars + "]", "\\~"); + + SequenceI [] s = new SequenceI[seqs.length]; StringBuffer out = new StringBuffer("!!" + (is_NA ? "NA" : "AA") + "_MULTIPLE_ALIGNMENT 1.0\n\n"); // TODO: JBPNote : Jalview doesn't remember NA or AA yet. @@ -261,16 +254,38 @@ public class MSFfile extends AlignFile int max = 0; int maxid = 0; int i = 0; - String big = ""; - while ((i < s.length) && (s[i] != null)) + while ((i < seqs.length) && (seqs[i] != null)) { - String sq; - big += (sq = s[i].getSequence()); + // Replace all internal gaps with . and external spaces with ~ + s[i] =new Sequence(seqs[i].getName(),seqs[i].getSequence().replace('-', '.')); + + StringBuffer sb = new StringBuffer(s[i].getSequence()); + for (int ii = 0; ii < sb.length(); ii++) + { + if (sb.charAt(ii) == '.') + { + sb.replace(ii, ii + 1, "~"); + } + else + break; + } - if (sq.length() > max) + for (int ii = sb.length() - 1; ii > 0; ii--) + { + if (sb.charAt(ii) == '.') { - max = sq.length(); + sb.replace(ii, ii + 1, "~"); + } + else + break; + } + + s[i].setSequence(sb.toString()); + + if (s[i].getSequence().length() > max) + { + max = s[i].getSequence().length(); } i++; @@ -282,27 +297,33 @@ public class MSFfile extends AlignFile "d"); i = 0; - long bigcheck = checkSum(big); + int bigChecksum = 0; + int [] checksums = new int[s.length]; + while ( i < s.length ) + { + checksums[i] = checkSum(s[i].getSequence()); + bigChecksum += checksums[i]; + i++; + } + long maxNB = 0; out.append(" MSF: " + s[0].getSequence().length() + " Type: " + - (is_NA ? "N" : "P") + " Check: " + bigcheck + " ..\n\n\n"); + (is_NA ? "N" : "P") + " Check: " + (bigChecksum%10000) + " ..\n\n\n"); String[] nameBlock = new String[s.length]; String[] idBlock = new String[s.length]; + i=0; while ((i < s.length) && (s[i] != null)) { - String name = s[i].getName() + "/" + s[i].getStart() + "-" + - s[i].getEnd(); - int check = checkSum(s[i].getSequence()); - nameBlock[i] = new String(" Name: " + name + " "); + nameBlock[i] = new String(" Name: " + s[i].getName() + " "); idBlock[i] = new String("Len: " + - maxLenpad.form(s[i].getSequence().length()) + " Check:" + - maxChkpad.form(check) + " Weight: 1.00\n"); + maxLenpad.form(s[i].getSequence().length()) + " Check: " + + maxChkpad.form(checksums[i]) + " Weight: 1.00\n"); - if (name.length() > maxid) + if (s[i].getName().length() > maxid) { - maxid = name.length(); + maxid = s[i].getName().length(); } if (nameBlock[i].length() > maxNB) @@ -349,8 +370,7 @@ public class MSFfile extends AlignFile while ((j < s.length) && (s[j] != null)) { String name = s[j].getName(); - out.append(new Format("%-" + maxid + "s").form(name + "/" + - s[j].getStart() + "-" + s[j].getEnd()) + " "); + out.append(new Format("%-" + maxid + "s").form(name)+ " "); for (int k = 0; k < 5; k++) { @@ -360,12 +380,11 @@ public class MSFfile extends AlignFile if ((end < s[j].getSequence().length()) && (start < s[j].getSequence().length())) { - out.append(re2gap.replaceAll(s[j].getSequence() - .substring(start, end))); + out.append(s[j].getSequence().substring(start, end)); if (k < 4) { - // out.append(" "); + out.append(" "); } else { @@ -376,8 +395,7 @@ public class MSFfile extends AlignFile { if (start < s[j].getSequence().length()) { - out.append(re2gap.replaceAll( - s[j].getSequence().substring(start))); + out.append(s[j].getSequence().substring(start)); out.append("\n"); } else diff --git a/src/jalview/io/NewickFile.java b/src/jalview/io/NewickFile.java index c1ef5b6..d696605 100755 --- a/src/jalview/io/NewickFile.java +++ b/src/jalview/io/NewickFile.java @@ -26,8 +26,6 @@ import jalview.datamodel.*; import java.io.*; -import java.util.*; - /** * DOCUMENT ME! @@ -196,7 +194,7 @@ public class NewickFile extends FileParse int d = -1; int cp = 0; - int flen = nf.length(); + //int flen = nf.length(); String Error = null; String nodename = null; diff --git a/src/jalview/io/PIRFile.java b/src/jalview/io/PIRFile.java index 0a24601..65890a9 100755 --- a/src/jalview/io/PIRFile.java +++ b/src/jalview/io/PIRFile.java @@ -184,9 +184,4 @@ public class PIRFile return out.toString(); } - public static void main(String[] args) - { - String inStr = ">P1;LCAT_MOUSE_90.35\nMGLPGSPWQRVLLLLGLLLPPATPFWLLNVLFPPHTTPKAELSNHTRPVILVPGCLGNRLEAKLDKPDVVNW\nMCYRKTEDFFTIWLDFNLFLPLGVDCWIDNTRIVYNHSSGRVSNAPGVQIRVPGFGKTESVEYVDDNKLAGY\n\n>LCAT_PAPAN_95.78\nMGPPGSPWQWVPLLLGLLLPPAAPFWLLNVLFPPHTTPKAELSNHTRPVILVPGCLGNQLEAKLDKPDVVNW\nMCYRKTEDFFTIWLDLNMFLPLGVDCWIDNTRVVYNRSSGLVSNAPGVQIRVPGFGKTYSVEYLDSSKLAGY\nLHTLVQNLVNNGYVRDETVRAAPYDWRLEPGQQEEYYHKLAGLVEEMHAAYGKPVFLIGHSLGCLHLLYFLL\n"; - PIRFile fa = new PIRFile(inStr); - } } diff --git a/src/jalview/io/PileUpfile.java b/src/jalview/io/PileUpfile.java index 728d1c6..87a1652 100755 --- a/src/jalview/io/PileUpfile.java +++ b/src/jalview/io/PileUpfile.java @@ -172,33 +172,22 @@ public class PileUpfile public static int checkSum(String seq) { - //String chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.*~&@"; + int check = 0; String sequence = seq.toUpperCase(); - String index = "--------------------------------------&---*---.-----------------@ABCDEFGHIJKLMNOPQRSTUVWXYZ------ABCDEFGHIJKLMNOPQRSTUVWXYZ----@"; - index += "--------------------------------------------------------------------------------------------------------------------------------"; - for (int i = 0; i < sequence.length(); i++) { - try - { if (i < sequence.length()) { - int pos = index.indexOf(sequence.charAt(i)); - - if (index.charAt(pos)!='_') + int value = sequence.charAt(i); + if (value != -1) { - check += ( ( (i % 57) + 1) * pos); + check += (i % 57 + 1) * value; } } - } - catch (Exception e) - { - System.err.println("Exception during MSF Checksum calculation"); - e.printStackTrace(); - } + } return check % 10000; @@ -212,29 +201,24 @@ public class PileUpfile int maxid = 0; int i = 0; - String big = ""; - - while ( (i < s.length) && (s[i] != null)) + int bigChecksum = 0; + int[] checksums = new int[s.length]; + while (i < s.length) { - big += s[i].getSequence(); + checksums[i] = checkSum(s[i].getSequence()); + bigChecksum += checksums[i]; i++; } - i = 0; - - int bigcheck = checkSum(big); - out.append(" MSF: " + s[0].getSequence().length() + - " Type: P Check: " + bigcheck + " ..\n\n\n"); + " Type: P Check: " + bigChecksum%10000 + " ..\n\n\n"); + i=0; while ( (i < s.length) && (s[i] != null)) { String seq = s[i].getSequence(); - String name = s[i].getName() + "/" + s[i].getStart() + "-" + - s[i].getEnd(); - int check = checkSum(s[i].getSequence()); - out.append(" Name: " + name + " oo Len: " + - s[i].getSequence().length() + " Check: " + check + + out.append(" Name: " + s[i].getName() + " oo Len: " + + s[i].getSequence().length() + " Check: " + checksums[i] + " Weight: 1.00\n"); if (seq.length() > max) @@ -242,9 +226,9 @@ public class PileUpfile max = seq.length(); } - if (name.length() > maxid) + if (s[i].getName().length() > maxid) { - maxid = name.length(); + maxid = s[i].getName().length(); } i++; @@ -274,8 +258,7 @@ public class PileUpfile while ( (j < s.length) && (s[j] != null)) { String name = s[j].getName(); - out.append(new Format("%-" + maxid + "s").form(name + "/" + - s[j].getStart() + "-" + s[j].getEnd()) + " "); + out.append(new Format("%-" + maxid + "s").form(name) + " "); for (int k = 0; k < 5; k++) { diff --git a/src/jalview/io/SequenceFeatureFetcher.java b/src/jalview/io/SequenceFeatureFetcher.java index 0c82f6f..0a7817a 100755 --- a/src/jalview/io/SequenceFeatureFetcher.java +++ b/src/jalview/io/SequenceFeatureFetcher.java @@ -22,8 +22,6 @@ import jalview.datamodel.*; import jalview.gui.*; -import jalview.io.*; - import java.io.*; import java.util.*; diff --git a/src/jalview/io/WSWUBlastClient.java b/src/jalview/io/WSWUBlastClient.java index 33d6d92..c221d07 100755 --- a/src/jalview/io/WSWUBlastClient.java +++ b/src/jalview/io/WSWUBlastClient.java @@ -24,8 +24,6 @@ import jalview.gui.*; import org.apache.axis.client.*; -import java.awt.*; - import java.util.*; import javax.swing.*; diff --git a/src/jalview/jbgui/GFinder.java b/src/jalview/jbgui/GFinder.java index 872d490..ed03a80 100755 --- a/src/jalview/jbgui/GFinder.java +++ b/src/jalview/jbgui/GFinder.java @@ -24,8 +24,6 @@ import javax.swing.*; import javax.swing.event.*; import jalview.io.FormatAdapter; import jalview.datamodel.SequenceI; -import java.awt.datatransfer.DataFlavor; -import jalview.io.IdentifyFile; public class GFinder extends JPanel diff --git a/src/jalview/math/Matrix.java b/src/jalview/math/Matrix.java index 81d520a..f9abbda 100755 --- a/src/jalview/math/Matrix.java +++ b/src/jalview/math/Matrix.java @@ -804,13 +804,13 @@ public class Matrix //symm.print(System.out); //System.out.println(); // Copy the symmetric matrix for later - Matrix origsymm = symm.copy(); + //Matrix origsymm = symm.copy(); // This produces the tridiagonal transformation matrix - long tstart = System.currentTimeMillis(); + //long tstart = System.currentTimeMillis(); symm.tred(); - long tend = System.currentTimeMillis(); + //long tend = System.currentTimeMillis(); //System.out.println("Time take for tred = " + (tend-tstart) + "ms"); //System.out.println(" ---Tridiag transform matrix ---"); @@ -823,9 +823,9 @@ public class Matrix //symm.printE(System.out); //System.out.println(); // Now produce the diagonalization matrix - tstart = System.currentTimeMillis(); + //tstart = System.currentTimeMillis(); symm.tqli(); - tend = System.currentTimeMillis(); + //tend = System.currentTimeMillis(); //System.out.println("Time take for tqli = " + (tend-tstart) + " ms"); //System.out.println(" --- New diagonalization matrix ---"); diff --git a/src/jalview/util/BrowserLauncher.java b/src/jalview/util/BrowserLauncher.java index 4e035eb..d912173 100755 --- a/src/jalview/util/BrowserLauncher.java +++ b/src/jalview/util/BrowserLauncher.java @@ -645,7 +645,6 @@ public class BrowserLauncher } catch (IllegalArgumentException iare) { - browser = browser; errorMessage = iare.getMessage(); return null; diff --git a/src/jalview/util/Format.java b/src/jalview/util/Format.java index 629fbcf..a78123f 100755 --- a/src/jalview/util/Format.java +++ b/src/jalview/util/Format.java @@ -27,7 +27,6 @@ */ package jalview.util; -import java.io.*; /** @@ -67,7 +66,6 @@ public class Format left_align = false; fmt = ' '; - int state = 0; int length = s.length(); int parse_state = 0; @@ -414,7 +412,7 @@ public class Format int i = 0; int sign = 1; double r = 0; // integer part - double f = 0; // fractional part + //double f = 0; // fractional part double p = 1; // exponent of fractional part int state = 0; // 0 = int part, 1 = frac part diff --git a/src/jalview/ws/Discoverer.java b/src/jalview/ws/Discoverer.java index b30a05f..4921fb7 100755 --- a/src/jalview/ws/Discoverer.java +++ b/src/jalview/ws/Discoverer.java @@ -33,7 +33,6 @@ package jalview.ws; import ext.vamsas.*; import java.util.Vector; import java.util.Hashtable; -import java.util.ArrayList; import java.util.StringTokenizer; public class Discoverer @@ -309,7 +308,7 @@ public class Discoverer // so no need to access original discovery thread. // Curent decision is to change properties then notify listeners with old and new values. Hashtable oldServices = services; - Vector oldServicelist = serviceList; + //Vector oldServicelist = serviceList; services = sscat; serviceList = cat; firePropertyChange("services", oldServices, services); diff --git a/src/jalview/ws/JPredClient.java b/src/jalview/ws/JPredClient.java index 8f94e97..fdf0cec 100755 --- a/src/jalview/ws/JPredClient.java +++ b/src/jalview/ws/JPredClient.java @@ -137,7 +137,7 @@ public class JPredClient " Service location failed\nfor URL :" + WsURL + "\n" + ex.getMessage()); - wsInfo.setStatus(wsInfo.STATE_STOPPED_SERVERERROR); + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR); return false; } @@ -172,9 +172,8 @@ public class JPredClient this.sequence.setSeq(AlignSeq.extractGaps("-. ", msf[0].getSequence())); - jalview.io.PileUpfile mwrite = new jalview.io.PileUpfile(); this.msa = new vamsas.objects.simple.Msfalignment(); - msa.setMsf(mwrite.print(msf)); + msa.setMsf(jalview.io.PileUpfile.print(msf)); } public void run() @@ -334,7 +333,7 @@ public class JPredClient - private void addFloatAnnotations(Alignment al, int[] gapmap, + /* private void addFloatAnnotations(Alignment al, int[] gapmap, Vector values, String Symname, String Visname, float min, float max, int winLength) @@ -350,7 +349,7 @@ public class JPredClient al.addAnnotation(new AlignmentAnnotation(Symname, Visname, annotations, min, max, winLength)); - } + }*/ void parseResult() { @@ -518,7 +517,7 @@ public class JPredClient i++; } - Hashtable scores = prediction.getScores(); + //Hashtable scores = prediction.getScores(); /* addFloatAnnotations(al, gapmap, (Vector)scores.get("JNETPROPH"), "JnetpropH", "Jnet Helix Propensity", 0f,1f,1); diff --git a/src/jalview/ws/MsaWSClient.java b/src/jalview/ws/MsaWSClient.java index 253dfba..6d46e4b 100755 --- a/src/jalview/ws/MsaWSClient.java +++ b/src/jalview/ws/MsaWSClient.java @@ -125,7 +125,7 @@ public class MsaWSClient " Service location failed\nfor URL :" + WsURL + "\n" + ex.getMessage()); - wsInfo.setStatus(wsInfo.ERROR); + wsInfo.setStatus(WebserviceInfo.ERROR); ex.printStackTrace(); return false; @@ -395,7 +395,7 @@ public class MsaWSClient e.toString() + "\n"); this.allowedServerExceptions = 0; - wsInfo.setStatus(wsInfo.STATE_STOPPED_SERVERERROR); + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_SERVERERROR); wsInfo.appendProgressText( "Failed to submit sequences for alignment.\n" + "It is most likely that there is a problem with the server.\n" + diff --git a/src/org/jibble/epsgraphics/EpsGraphics2D.java b/src/org/jibble/epsgraphics/EpsGraphics2D.java index 25ad886..7955440 100755 --- a/src/org/jibble/epsgraphics/EpsGraphics2D.java +++ b/src/org/jibble/epsgraphics/EpsGraphics2D.java @@ -238,7 +238,7 @@ public class EpsGraphics2D extends java.awt.Graphics2D { if (s != null) { - Rectangle2D userBounds = s.getBounds2D(); + //Rectangle2D userBounds = s.getBounds2D(); if (!_transform.isIdentity()) { s = _transform.createTransformedShape(s); }