JAL-3285 code changes to Jalview2XML not included in merge
authortva <tva@10.205.251.175>
Wed, 5 Jun 2019 13:33:02 +0000 (14:33 +0100)
committertva <tva@10.205.251.175>
Wed, 5 Jun 2019 13:33:02 +0000 (14:33 +0100)
src/jalview/project/Jalview2XML.java

index 0ec8b97..d045a3c 100644 (file)
@@ -1386,7 +1386,7 @@ public class Jalview2XML
         jGroup.setTextCol2(sg.textColour2.getRGB());
         jGroup.setTextColThreshold(sg.thresholdTextColour);
         jGroup.setShowUnconserved(sg.getShowNonconserved());
-        jGroup.setIgnoreGapsinConsensus(sg.isIgnoreGapsConsensus());
+        jGroup.setIgnoreGapsinConsensus(sg.getIgnoreGapsConsensus());
         jGroup.setShowConsensusHistogram(sg.isShowConsensusHistogram());
         jGroup.setShowSequenceLogo(sg.isShowSequenceLogo());
         jGroup.setNormaliseSequenceLogo(sg.isNormaliseSequenceLogo());
@@ -2124,8 +2124,9 @@ public class Jalview2XML
       }
       else if (!matchedFile.equals(pdbentry.getFile()))
       {
-        warn("Probably lost some PDB-Sequence mappings for this structure file (which apparently has same PDB Entry code): "
-                + pdbentry.getFile());
+         Cache.log.warn(
+                  "Probably lost some PDB-Sequence mappings for this structure file (which apparently has same PDB Entry code): "
+                          + pdbentry.getFile());
       }
       // record the
       // file so we
@@ -2625,7 +2626,7 @@ public class Jalview2XML
         }
         else
         {
-          debug("reusing DseqFor ID");
+          jalview.bin.Cache.log.debug("reusing DseqFor ID");
         }
 
         // mp.setMappingChoice(mpc);
@@ -3542,7 +3543,7 @@ public class Jalview2XML
             }
 
             // adds feature to datasequence's feature set (since Jalview 2.10)
-            alignmentSeq.addSequenceFeature(sf);
+            al.getSequenceAt(i).addSequenceFeature(sf);
           }
         }
         if (vamsasSeqs.get(i).getDBRef().size() > 0)
@@ -3606,13 +3607,13 @@ public class Jalview2XML
                     .getStructureSelectionManager(Desktop.instance)
                     .registerPDBEntry(entry);
             // adds PDBEntry to datasequence's set (since Jalview 2.10)
-            if (alignmentSeq.getDatasetSequence() != null)
+            if (al.getSequenceAt(i).getDatasetSequence() != null)
             {
-              alignmentSeq.getDatasetSequence().addPDBId(entry);
+              al.getSequenceAt(i).getDatasetSequence().addPDBId(entry);
             }
             else
             {
-              alignmentSeq.addPDBId(entry);
+              al.getSequenceAt(i).addPDBId(entry);
             }
           }
         }
@@ -3620,10 +3621,10 @@ public class Jalview2XML
         /*
          * load any HMMER profile
          */
-        String hmmJarFile = jseqs[i].getHmmerProfile();
+                               String hmmJarFile = jseqs.get(i).getHmmerProfile();
         if (hmmJarFile != null && jprovider != null)
         {
-          loadHmmerProfile(jprovider, hmmJarFile, alignmentSeq);
+          loadHmmerProfile(jprovider, hmmJarFile, al.getSequenceAt(i));
         }
       }
     } // end !multipleview
@@ -5508,7 +5509,10 @@ public class Jalview2XML
     String id = object.getViewport().get(0).getSequenceSetId();
     if (skipList.containsKey(id))
     {
-      debug("Skipping sequence set id " + id);
+       if (Cache.log != null && Cache.log.isDebugEnabled())
+        {
+          Cache.log.debug("Skipping seuqence set id " + id);
+        }
       return true;
     }
     return false;
@@ -6149,7 +6153,7 @@ public class Jalview2XML
       }
       else
       {
-        debug("Ignoring " + jvobj.getClass() + " (ID = " + id);
+          Cache.log.debug("Ignoring " + jvobj.getClass() + " (ID = " + id);
       }
     }
   }
@@ -6623,10 +6627,7 @@ public class Jalview2XML
         maxcol = new Color(Integer.parseInt(colourModel.getRGB(), 16));
       } catch (Exception e)
       {
-        if (Cache.log != null)
-        {
           Cache.log.warn("Couldn't parse out graduated feature color.", e);
-        }
       }
   
       NoValueColour noCol = colourModel.getNoValueColour();