Merge branch 'develop' into features/JAL-2393customMatrices
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 21 Apr 2017 13:08:13 +0000 (14:08 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 21 Apr 2017 13:08:13 +0000 (14:08 +0100)
src/jalview/fts/service/uniprot/UniProtFTSRestClient.java
src/jalview/ws/sifts/SiftsClient.java

index 27bfca8..a23df4c 100644 (file)
@@ -157,14 +157,14 @@ public class UniProtFTSRestClient extends FTSRestClient
     if (foundDataRow != null && foundDataRow.length > 0)
     {
       result = new ArrayList<FTSData>();
-      String titleRow = getDataColumnsFieldsAsTabDelimitedString(uniprotRestRequest
-              .getWantedFields());
-      // System.out.println(">>>>Title row : " + titleRow);
+      boolean firstRow = true;
       for (String dataRow : foundDataRow)
       {
-        if (dataRow.equalsIgnoreCase(titleRow))
+        // The first data row is usually the header data. This should be
+        // filtered out from the rest of the data See: JAL-2485
+        if (firstRow)
         {
-          // System.out.println(">>>>>>>>>> matched!!!");
+          firstRow = false;
           continue;
         }
         // System.out.println(dataRow);
index 847377d..0e9e888 100644 (file)
@@ -609,8 +609,12 @@ public class SiftsClient implements SiftsClientI
                     .getDbResNum());
           } catch (NumberFormatException nfe)
           {
-            resNum = (pdbRefDb == null) ? Integer.valueOf(residue
-                    .getDbResNum()) : Integer.valueOf(pdbRefDb
+            if (pdbRefDb == null || pdbRefDb.getDbResNum().equals("null"))
+            {
+              resNum = UNASSIGNED;
+              continue;
+            }
+            resNum = Integer.valueOf(pdbRefDb
                     .getDbResNum().split("[a-zA-Z]")[0]);
             continue;
           }