OnlyAddPDBEntries
authoramwaterhouse <Andrew Waterhouse>
Thu, 10 Nov 2005 11:08:31 +0000 (11:08 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 10 Nov 2005 11:08:31 +0000 (11:08 +0000)
src/jalview/io/SequenceFeatureFetcher.java

index 8bd9bab..5ecb417 100755 (executable)
@@ -196,7 +196,6 @@ public class SequenceFeatureFetcher implements Runnable
       return;\r
 \r
     SequenceI sequence = null;\r
-    //       String pdb = null;\r
 \r
     Vector entries = getUniprotEntries(file);\r
 \r
@@ -217,7 +216,7 @@ public class SequenceFeatureFetcher implements Runnable
 \r
       if (sequence == null)\r
       {\r
-        System.out.println("not found");\r
+        System.out.println(idmatch+" not found");\r
         continue;\r
       }\r
 \r
@@ -229,7 +228,6 @@ public class SequenceFeatureFetcher implements Runnable
       int absStart = entry.getUniprotSequence().getContent().indexOf(\r
           nonGapped.toString());\r
 \r
-      int residueOffset = 0;\r
       if (absStart == -1)\r
       {\r
         // Is UniprotSequence contained in dataset sequence?\r
@@ -244,9 +242,9 @@ public class SequenceFeatureFetcher implements Runnable
         }\r
         else\r
         {\r
-          if(entry.getFeatures()!=null)\r
+          if(entry.getFeature()!=null)\r
           {\r
-            Enumeration e = entry.getFeatures().elements();\r
+            Enumeration e = entry.getFeature().elements();\r
             while (e.hasMoreElements())\r
             {\r
               SequenceFeature sf = (SequenceFeature) e.nextElement();\r
@@ -266,7 +264,19 @@ public class SequenceFeatureFetcher implements Runnable
       int absEnd = absStart + nonGapped.toString().length();\r
       absStart += 1;\r
 \r
-      sequence.setSequenceFeatures(entry.getFeatures());\r
+      Enumeration e = entry.getDbReference().elements();\r
+      Vector onlyPdbEntries = new Vector();\r
+      while(e.hasMoreElements())\r
+      {\r
+        PDBEntry pdb = (PDBEntry)e.nextElement();\r
+        if(!pdb.getType().equals("PDB"))\r
+          continue;\r
+\r
+        onlyPdbEntries.addElement(pdb);\r
+      }\r
+\r
+      sequence.setPDBId(onlyPdbEntries);\r
+      sequence.setSequenceFeatures(entry.getFeature());\r
       sequence.setStart(absStart);\r
       sequence.setEnd(absEnd);\r
 \r