import jalview.schemabinding.version2.*;
import jalview.schemes.*;
import jalview.structure.StructureSelectionManager;
+import jalview.util.Platform;
import jalview.util.jarInputStreamProvider;
/**
for (int smap = 0; smap < jmol.jmb.sequence[peid].length; smap++)
{
- if (jal.findIndex(jmol.jmb.sequence[peid][smap]) > -1)
+// if (jal.findIndex(jmol.jmb.sequence[peid][smap]) > -1)
+ if (jds==jmol.jmb.sequence[peid][smap])
{
StructureState state = new StructureState();
state.setVisible(true);
{
annotationIds.put(aa[i].annotationId, aa[i]);
}
-
+
an.setId(aa[i].annotationId);
an.setVisible(aa[i].visible);
an.setDescription(aa[i].description);
-
+
if (aa[i].sequenceRef != null)
{
// TODO later annotation sequenceRef should be the XML ID of the
an.setCentreColLabels(aa[i].centreColLabels);
an.setScaleColLabels(aa[i].scaleColLabel);
an.setShowAllColLabels(aa[i].showAllColLabels);
+ an.setBelowAlignment(aa[i].belowAlignment);
if (aa[i].graph > 0)
{
{
an.setScore(aa[i].getScore());
}
+
+ if (aa[i].getCalcId()!=null)
+ {
+ an.setCalcId(aa[i].getCalcId());
+ }
+
AnnotationElement ae;
if (aa[i].annotations != null)
{
if (jal.getGroups() != null)
{
JGroup[] groups = new JGroup[jal.getGroups().size()];
-
- for (int i = 0; i < groups.length; i++)
+ int i = -1;
+ for (jalview.datamodel.SequenceGroup sg:jal.getGroups())
{
- groups[i] = new JGroup();
+ groups[++i] = new JGroup();
- jalview.datamodel.SequenceGroup sg = (jalview.datamodel.SequenceGroup) jal
- .getGroups().elementAt(i);
groups[i].setStart(sg.getStartRes());
groups[i].setEnd(sg.getEndRes());
groups[i].setName(sg.getName());
}
;
out.close();
-
- alreadyLoadedPDB.put(pdbId, outFile.getAbsolutePath());
- return outFile.getAbsolutePath();
+ String t=outFile.getAbsolutePath();
+ alreadyLoadedPDB.put(pdbId, t);
+ return t;
}
else
{
{
jaa.graphHeight = an[i].getGraphHeight();
}
+ if (an[i].hasBelowAlignment())
+ {
+ jaa.belowAlignment=an[i].isBelowAlignment();
+ }
+ jaa.setCalcId(an[i].getCalcId());
+
if (jaa.autoCalculated)
{
autoAlan.add(new JvAnnotRow(i, jaa));
}
if (ids[p].getFile() != null)
{
+ File mapkey=new File(ids[p].getFile());
Object[] seqstrmaps = (Object[]) ((Hashtable) jmoldat[2])
- .get(ids[p].getFile());
+ .get(mapkey);
if (seqstrmaps == null)
{
((Hashtable) jmoldat[2]).put(
- new File(ids[p].getFile()).toString(),
+ mapkey,
seqstrmaps = new Object[]
{ pdbFile, ids[p].getId(), new Vector(),
new Vector() });
Object[] svattrib = entry.getValue();
int[] geom = (int[]) svattrib[0];
String state = (String) svattrib[1];
- Hashtable<String, Object[]> oldFiles = (Hashtable<String, Object[]>) svattrib[2];
+ Hashtable<File, Object[]> oldFiles = (Hashtable<File, Object[]>) svattrib[2];
final boolean useinJmolsuperpos = ((boolean[]) svattrib[3])[0], usetoColourbyseq = ((boolean[]) svattrib[3])[1], jmolColouring = ((boolean[]) svattrib[3])[2];
int x = geom[0], y = geom[1], width = geom[2], height = geom[3];
// collate the pdbfile -> sequence mappings from this view
{
newFileLoc = new StringBuffer();
}
+ do {
+ // look for next filename in load statement
newFileLoc.append(state.substring(cp,
ncp = (state.indexOf("\"", ncp + 1) + 1)));
String oldfilenam = state.substring(ncp,
// recover the new mapping data for this old filename
// have to normalize filename - since Jmol and jalview do filename
// translation differently.
- Object[] filedat = oldFiles.get(new File(oldfilenam)
- .toString());
- newFileLoc.append(((String) filedat[0]));
+ Object[] filedat = oldFiles.get(new File(oldfilenam));
+ newFileLoc.append(Platform.escapeString((String) filedat[0]));
pdbfilenames.addElement((String) filedat[0]);
pdbids.addElement((String) filedat[1]);
seqmaps.addElement((SequenceI[]) ((Vector<SequenceI>) filedat[2])
newFileLoc.append("\"");
cp = ecp + 1; // advance beyond last \" and set cursor so we can
// look for next file statement.
+ } while ((ncp=state.indexOf("/*file*/",cp))>-1);
}
if (cp > 0)
{
.print("Ignoring incomplete Jmol state for PDB ids: ");
newFileLoc = new StringBuffer(state);
newFileLoc.append("; load append ");
- for (String id : oldFiles.keySet())
+ for (File id : oldFiles.keySet())
{
// add this and any other pdb files that should be present in
// the viewer
// add mapping for sequences in this view to an already open Jmol
// instance
- for (String id : oldFiles.keySet())
+ for (File id : oldFiles.keySet())
{
// add this and any other pdb files that should be present in the
// viewer