- for (AlignmentAnnotation aa : sq.getAnnotation())
- {
- String oldId = aa.getCalcId();
- if (oldId == null)
- {
- oldId = "";
- }
- aa.setCalcId("JalviewPDB:" + id + ":JalviewPDB:" + oldId);
- }
- }
- }
- private void processPdbFileWithJmol(ArrayList<SequenceI> prot)
- throws Exception
- {
- 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);
- for (SequenceI sq : al.getSequences())
- {
- if (sq.getDatasetSequence() != null)
- {
- sq.getDatasetSequence().getPDBId().clear();
- }
- else
- {
- sq.getPDBId().clear();
- }
- }
- replaceAndUpdateChains(prot, al, AlignSeq.PEP, false);
- }
- } catch (ClassNotFoundException q)
- {
- }
- }
-
- private void replaceAndUpdateChains(ArrayList<SequenceI> prot,
- AlignmentI al, String pep, boolean b)
- {
- List<List<? extends Object>> replaced = AlignSeq
- .replaceMatchingSeqsWith(seqs,
- annotations, prot, al, AlignSeq.PEP, false);
- for (PDBChain ch : chains)
- {
- int p = 0;
- for (SequenceI sq : (List<SequenceI>) replaced.get(0))
- {
- p++;
- if (sq == ch.sequence || sq.getDatasetSequence() == ch.sequence)
- {
- p = -p;
- break;
- }
- }
- if (p < 0)
- {
- p = -p - 1;
- // set shadow entry for chains
- ch.shadow = (SequenceI) replaced.get(1).get(p);
- ch.shadowMap = ((AlignSeq) replaced.get(2)
-.get(p))
- .getMappingFromS1(false);
- }
- }
- }
-
- private void processPdbFileWithAnnotate3d(ArrayList<SequenceI> rna)
- throws Exception
- {
- // System.out.println("this is a PDB format and RNA sequence");
- // note: we use reflection here so that the applet can compile and run
- // without the HTTPClient bits and pieces needed for accessing Annotate3D
- // web service
- try
- {
- Class cl = Class.forName("jalview.ws.jws1.Annotate3D");
- if (cl != null)