From a24a9a8ffac73a54899f27c8cea50901fc9d9627 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 15 Oct 2013 12:33:27 +0100 Subject: [PATCH] workaround for JAL-1395 --- src/MCview/PDBfile.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index 829eed7..0035914 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -24,7 +24,6 @@ import java.awt.*; import jalview.analysis.AlignSeq; import jalview.datamodel.*; -import jalview.ext.jmol.PDBFileWithJmol; import jalview.io.FileParse; public class PDBfile extends jalview.io.AlignFile @@ -237,10 +236,17 @@ public class PDBfile extends jalview.io.AlignFile } private void processPdbFileWithJmol(ArrayList prot) throws Exception { - PDBFileWithJmol jmf = new PDBFileWithJmol(new FileParse(getDataName(),type)); - Alignment al = new Alignment(jmf.getSeqsAsArray()); - jmf.addAnnotations(al); - replaceMatchingSeqsWith(prot, al, AlignSeq.PEP); + try { + Class cl = Class.forName("jalview.ext.jmol.PDBFileWithJmol"); + if (cl!=null) + { + Object jmf = cl.getConstructor(new Class[] {FileParse.class}).newInstance(new Object[] {new FileParse(getDataName(),type)}); + Alignment al = new Alignment((SequenceI[]) cl.getMethod("getSeqsAsArray", new Class[] {}).invoke(jmf)); + cl.getMethod("addAnnotations",new Class[] {Alignment.class}).invoke(jmf, al); + replaceMatchingSeqsWith(prot, al, AlignSeq.PEP); + } + } catch (ClassNotFoundException q) + {} } private void processPdbFileWithAnnotate3d(ArrayList rna) throws Exception { // System.out.println("this is a PDB format and RNA sequence"); -- 1.7.10.2