JAL-4257 JAL-4159 JAL-789 tidy up passing of score model to pairwise alignment direct...
[jalview.git] / src / jalview / analysis / PaSiMap.java
index fd20465..48ec899 100755 (executable)
@@ -76,12 +76,9 @@ public class PaSiMap implements Runnable
   {
     this.seqs = sequences;
 
-    //convert ScoreModel name into score matrix, use default if not Blosum or Pam
-    if (sm.getName().equals("BLOSUM62"))
+    if (sm!=null && sm instanceof ScoreMatrix)
     {
-      this.scoreMatrix = ScoreModels.getInstance().getBlosum62();
-    } else if (sm.getName().equals("PAM250")) {
-      this.scoreMatrix = ScoreModels.getInstance().getPam250();
+      this.scoreMatrix = ((ScoreMatrix) sm);
     } else {
       this.scoreMatrix = null;
     }