- private void processPdbFileWithAnnotate3d(ArrayList<SequenceI> rna) throws Exception {
-// System.out.println("this is a PDB format and RNA sequence");
- Annotate3D an3d = new Annotate3D();
- // TODO: use the PDB ID of the structure if one is available, to save bandwidth and avoid uploading the whole structure to the service
- AlignmentI al = an3d.getRNAMLFor(new FileParse(getDataName(),type));
- replaceMatchingSeqsWith(rna, al, AlignSeq.DNA);
+
+ public static String relocateCalcId(String calcId,
+ Hashtable<String, String> alreadyLoadedPDB) throws Exception
+ {
+ int s = calcIdPrefix.length(), end = calcId.indexOf(calcIdPrefix, s);
+ String between = calcId.substring(s, end - 1);
+ return calcIdPrefix + alreadyLoadedPDB.get(between) + ":"
+ + calcId.substring(end);
+ }
+
+ private void markCalcIds()
+ {
+ for (SequenceI sq : seqs)
+ {
+ for (AlignmentAnnotation aa : sq.getAnnotation())
+ {
+ String oldId = aa.getCalcId();
+ if (oldId == null)
+ {
+ oldId = "";
+ }
+ aa.setCalcId("JalviewPDB:" + id + ":JalviewPDB:" + oldId);
+ }
+ }