X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBChain.java;h=2eaf8a3d8ffe210147491569cd8b2d724fad5fec;hb=d423f22792e47dbc800ae220a58677f988971d06;hp=8441a2da13bde19abe941ae139295e26e34d9df2;hpb=ff33b2ff68aed0d69ac1a4edf860141dc9402592;p=jalview.git
diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java
index 8441a2d..2eaf8a3 100755
--- a/src/MCview/PDBChain.java
+++ b/src/MCview/PDBChain.java
@@ -1,20 +1,19 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
- *
- * This program 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 2
- * of the License, or (at your option) any later version.
- *
- * This program 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 PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
+ * Copyright (C) 2010 J Procter, AM Waterhouse, 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
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
*/
package MCview;
@@ -25,6 +24,7 @@ import java.awt.*;
import jalview.analysis.*;
import jalview.datamodel.*;
import jalview.schemes.*;
+import jalview.structure.StructureMapping;
public class PDBChain
{
@@ -32,19 +32,33 @@ public class PDBChain
* SequenceFeature group for PDB File features added to sequences
*/
private static final String PDBFILEFEATURE = "PDBFile";
+
private static final String IEASTATUS = "IEA:jalview";
+
public String id;
+
public Vector bonds = new Vector();
+
public Vector atoms = new Vector();
+
public Vector residues = new Vector();
+
public int offset;
+
public Sequence sequence;
+
public boolean isVisible = true;
+
public int pdbstart = 0;
+
public int pdbend = 0;
+
public int seqstart = 0;
+
public int seqend = 0;
+
public String pdbid = "";
+
public PDBChain(String pdbid, String id)
{
this.pdbid = pdbid.toLowerCase();
@@ -57,9 +71,9 @@ public class PDBChain
for (int i = 0; i < bonds.size(); i++)
{
- tmp = tmp + ( (Bond) bonds.elementAt(i)).at1.resName + " " +
- ( (Bond) bonds.elementAt(i)).at1.resNumber + " " + offset +
- "\n";
+ tmp = tmp + ((Bond) bonds.elementAt(i)).at1.resName + " "
+ + ((Bond) bonds.elementAt(i)).at1.resNumber + " " + offset
+ + "\n";
}
return tmp;
@@ -96,15 +110,19 @@ public class PDBChain
}
/**
- * copy over the RESNUM seqfeatures from the internal chain sequence to the mapped sequence
+ * copy over the RESNUM seqfeatures from the internal chain sequence to the
+ * mapped sequence
+ *
* @param seq
- * @param status The Status of the transferred annotation
+ * @param status
+ * The Status of the transferred annotation
* @return the features added to sq (or its dataset)
*/
- public SequenceFeature[] transferRESNUMFeatures(SequenceI seq, String status)
+ public SequenceFeature[] transferRESNUMFeatures(SequenceI seq,
+ String status)
{
SequenceI sq = seq;
- while (sq!=null && sq.getDatasetSequence()!=null)
+ while (sq != null && sq.getDatasetSequence() != null)
{
sq = sq.getDatasetSequence();
if (sq == sequence)
@@ -114,11 +132,10 @@ public class PDBChain
}
/**
* Remove any existing features for this chain if they exist ?
- * SequenceFeature[] seqsfeatures=seq.getSequenceFeatures();
- int totfeat=seqsfeatures.length;
- // Remove any features for this exact chain ?
- for (int i=0; i k)
+ {
+ min = k;
+ }
+ else if (max < k)
+ {
+ max = k;
+ }
+ }
+ }
+ sq
+ .addAlignmentAnnotation(new AlignmentAnnotation("PDB.RESNUM",
+ "PDB Residue Numbering for " + this.pdbid + ":"
+ + this.id, an, (float) min, (float) max,
+ AlignmentAnnotation.LINE_GRAPH));
+ }
+ }
}