From 5f4142b92b29077571a78d891c0483a30579812e Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 11 Jun 2010 09:41:29 +0000 Subject: [PATCH] patch for JAL-556 - more robust mapping of sequence to structure sequence with correct substitution matrix --- src/MCview/AppletPDBCanvas.java | 3 ++- src/jalview/structure/StructureSelectionManager.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index 6be8dd5..cdad671 100755 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -176,8 +176,9 @@ public class AppletPDBCanvas extends Panel implements MouseListener, // Now lets compare the sequences to get // the start and end points. // Align the sequence to the pdb + // TODO: DNa/Pep switch AlignSeq as = new AlignSeq(sequence, ((PDBChain) pdb.chains - .elementAt(i)).sequence, "pep"); + .elementAt(i)).sequence, ((PDBChain) pdb.chains.elementAt(i)).isNa ? AlignSeq.DNA : AlignSeq.PEP); as.calcScoreMatrix(); as.traceAlignment(); PrintStream ps = new PrintStream(System.out) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 478706a..483f1a4 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -133,8 +133,10 @@ public class StructureSelectionManager for (int i = 0; i < pdb.chains.size(); i++) { + + // TODO: correctly determine sequence type for mixed na/peptide structures AlignSeq as = new AlignSeq(sequence[s], ((PDBChain) pdb.chains - .elementAt(i)).sequence, AlignSeq.PEP); + .elementAt(i)).sequence, ((PDBChain)pdb.chains.elementAt(i)).isNa ? AlignSeq.DNA : AlignSeq.PEP); as.calcScoreMatrix(); as.traceAlignment(); PDBChain chain = ((PDBChain) pdb.chains.elementAt(i)); -- 1.7.10.2