JAL-674 remove any spurious PDBEntrys generated by Jmol/RNAView parsing processes
authorJim Procter <j.procter@dundee.ac.uk>
Tue, 21 Oct 2014 08:37:24 +0000 (09:37 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Tue, 21 Oct 2014 10:34:55 +0000 (11:34 +0100)
src/MCview/PDBfile.java

index 019aba9..a99f172 100755 (executable)
@@ -327,6 +327,17 @@ public class PDBfile extends jalview.io.AlignFile
                 {}).invoke(jmf));
         cl.getMethod("addAnnotations", new Class[]
         { Alignment.class }).invoke(jmf, al);
+        for (SequenceI sq : al.getSequences())
+        {
+          if (sq.getDatasetSequence() != null)
+          {
+            sq.getDatasetSequence().getPDBId().clear();
+          }
+          else
+          {
+            sq.getPDBId().clear();
+          }
+        }
         AlignSeq.replaceMatchingSeqsWith(seqs, annotations, prot, al, AlignSeq.PEP, false);
       }
     } catch (ClassNotFoundException q)
@@ -355,6 +366,17 @@ public class PDBfile extends jalview.io.AlignFile
                 new Class[]
                 { FileParse.class }).invoke(annotate3d, new Object[]
         { new FileParse(getDataName(), type) }));
+        for (SequenceI sq : al.getSequences())
+        {
+          if (sq.getDatasetSequence() != null)
+          {
+            sq.getDatasetSequence().getPDBId().clear();
+          }
+          else
+          {
+            sq.getPDBId().clear();
+          }
+        }
         AlignSeq.replaceMatchingSeqsWith(seqs, annotations, rna, al, AlignSeq.DNA, false);
       }
     } catch (ClassNotFoundException x)