X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FMCview%2FPDBfile.java;h=2c7bd9dbd49205afa07ec946bed02cedea67cd94;hb=013c39d4eaab0ed509d21e83676fa4da284d7fde;hp=6fdd9787028e0f3d55742872e0f3f81b6753f0d0;hpb=dd74fc4938723fe5ec48d4e5fdcfbe58ac42a48d;p=jalview.git diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 6fdd978..2c7bd9d 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -31,6 +31,10 @@ public class PDBfile public Vector chains; public String id; + /** + * set to true to add chain alignment annotation as visible annotation. + */ + boolean VisibleChainAnnotation=false; public PDBfile(String inFile, String inType) throws IOException { @@ -45,6 +49,8 @@ public class PDBfile public void parse() throws IOException { + // TODO set the filename sensibly + id = (inFile==null) ? "PDBFILE" : inFile.getName(); try { chains = new Vector(); @@ -128,7 +134,17 @@ public class PDBfile entry.setFile(inFile.getAbsolutePath()); } dataset.addPDBId(entry); - getSeqs().addElement(dataset.deriveSequence()); // PDBChain objects maintain reference to dataset + SequenceI chainseq = dataset.deriveSequence(); // PDBChain objects maintain reference to dataset + seqs.addElement(chainseq); + AlignmentAnnotation[] chainannot = chainseq.getAnnotation(); + if (chainannot!=null) + { + for (int ai=0; ai