remove system.out
[jalview.git] / src / jalview / structure / StructureSelectionManager.java
index 10f99a4..48f46ed 100644 (file)
@@ -69,9 +69,11 @@ public class StructureSelectionManager
      There will be better ways of doing this in the future, for now we'll use
      the tried and tested MCview pdb mapping
    */
-  synchronized public MCview.PDBfile setMapping(SequenceI[] sequence,
-                           String pdbFile,
-                           String protocol)
+  synchronized public MCview.PDBfile setMapping(
+      SequenceI[] sequence,
+      String[] targetChains,
+      String pdbFile,
+      String protocol)
   {
     MCview.PDBfile pdb = null;
     try
@@ -84,15 +86,19 @@ public class StructureSelectionManager
       return null;
     }
 
+    String targetChain;
     for (int s = 0; s < sequence.length; s++)
     {
-      String targetChain = "";
-
-      if (sequence[s].getName().indexOf("|") > -1)
+      if(targetChains!=null && targetChains[s]!=null)
+        targetChain = targetChains[s];
+      else if (sequence[s].getName().indexOf("|") > -1)
       {
         targetChain = sequence[s].getName().substring(
             sequence[s].getName().lastIndexOf("|") + 1);
       }
+      else
+        targetChain = "";
+
 
       int max = -10;
       AlignSeq maxAlignseq = null;
@@ -242,7 +248,6 @@ public class StructureSelectionManager
 
         for (int j = 0; j < mappings.length; j++)
         {
-
           if (mappings[j].pdbfile.equals(pdbfile) &&
               mappings[j].pdbchain.equals(chain))
           {
@@ -250,8 +255,6 @@ public class StructureSelectionManager
                                  mappings[j].getSeqPos(pdbResNum));
           }
         }
-
-        sl.highlightSequence(null, pdbResNum);
       }
     }
   }