X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppVarna.java;h=b37b374d41390dae50ae4caa0dae5e9ac18bb84e;hb=f6a7e5514230be7ea8c2d4cccb504b4ed95f80ef;hp=7be007ab13e0639635abd141ce1e54c40835df1d;hpb=0f594795fc0aa6f7d795e09203515837049bfc4b;p=jalview.git diff --git a/src/jalview/gui/AppVarna.java b/src/jalview/gui/AppVarna.java index 7be007a..b37b374 100644 --- a/src/jalview/gui/AppVarna.java +++ b/src/jalview/gui/AppVarna.java @@ -1,13 +1,13 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR @@ -73,8 +73,8 @@ public class AppVarna extends JInternalFrame implements AlignmentPanel ap; - public AppVarna(SequenceI seq, String strucseq, String struc, - String name, AlignmentPanel ap) + public AppVarna(String sname, SequenceI seq, String strucseq, + String struc, String name, AlignmentPanel ap) { this.ap = ap; ArrayList rnaList = new ArrayList(); @@ -89,12 +89,12 @@ public class AppVarna extends JInternalFrame implements { e3.printStackTrace(); } - RNA trim = trimRNA(rna1); + RNA trim = trimRNA(rna1, "trimmed " + sname); rnaList.add(trim); rnaList.add(rna1); rnas.put(seq, rna1); rnas.put(seq, trim); - rna1.setName("consensus_" + rna1.getName()); + rna1.setName(sname + " (with gaps)"); { seqs.put(trim, seq); @@ -110,7 +110,7 @@ public class AppVarna extends JInternalFrame implements vab = new AppVarnaBinding(rnaList); // vab = new AppVarnaBinding(seq,struc); // System.out.println("Hallo: "+name); - this.name = name; + this.name = sname + " trimmed to " + name; initVarna(); ssm = ap.getStructureSelectionManager(); ssm.addStructureViewerListener(this); @@ -145,10 +145,10 @@ public class AppVarna extends JInternalFrame implements return newStr; } - public RNA trimRNA(RNA rna) + public RNA trimRNA(RNA rna, String name) { ShiftList offset = new ShiftList(); - RNA rnaTrim = new RNA("trim_" + rna.getName()); + RNA rnaTrim = new RNA(name); try { rnaTrim.setRNA(rna.getSeq(), replaceOddGaps(rna.getStructDBN())); @@ -333,9 +333,9 @@ public class AppVarna extends JInternalFrame implements ShiftList shift = offsets.get(rna); if (shift != null) { - // System.err.print("Orig pos:"+index); - index = shift.shift(index); - // System.err.println("\nFinal pos:"+index); + // System.err.print("Orig pos:"+index); + index = shift.shift(index); + // System.err.println("\nFinal pos:"+index); } mouseOverHighlighter.highlightRegion(rna, index, index); vab.updateSelectedRNA(rna); @@ -392,7 +392,7 @@ public class AppVarna extends JInternalFrame implements if (shift != null) { int i = shift.shift(arg1.getIndex()); - // System.err.println("shifted "+(arg1.getIndex())+" to "+i); + // System.err.println("shifted "+(arg1.getIndex())+" to "+i); ssm.mouseOverVamsasSequence(seq, i, this); } else