git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feature locations are retrieved by associated accession string
[jalview.git]
/
src
/
jalview
/
appletgui
/
AppletJmol.java
diff --git
a/src/jalview/appletgui/AppletJmol.java
b/src/jalview/appletgui/AppletJmol.java
index
2c2a979
..
53115d2
100644
(file)
--- a/
src/jalview/appletgui/AppletJmol.java
+++ b/
src/jalview/appletgui/AppletJmol.java
@@
-67,6
+67,7
@@
public class AppletJmol extends Frame
TextField inputLine;
TextArea history;
SequenceI[] sequence;
TextField inputLine;
TextArea history;
SequenceI[] sequence;
+ String [] chains;
StructureSelectionManager ssm;
RenderPanel renderPanel;
AlignmentPanel ap;
StructureSelectionManager ssm;
RenderPanel renderPanel;
AlignmentPanel ap;
@@
-78,11
+79,13
@@
public class AppletJmol extends Frame
public AppletJmol(PDBEntry pdbentry,
SequenceI[] seq,
public AppletJmol(PDBEntry pdbentry,
SequenceI[] seq,
+ String[] chains,
AlignmentPanel ap,
String protocol)
{
this.ap = ap;
this.sequence = seq;
AlignmentPanel ap,
String protocol)
{
this.ap = ap;
this.sequence = seq;
+ this.chains = chains;
this.pdbentry = pdbentry;
String alreadyMapped = StructureSelectionManager
this.pdbentry = pdbentry;
String alreadyMapped = StructureSelectionManager
@@
-92,8
+95,9
@@
public class AppletJmol extends Frame
if (alreadyMapped != null)
{
StructureSelectionManager.getStructureSelectionManager()
if (alreadyMapped != null)
{
StructureSelectionManager.getStructureSelectionManager()
- .setMapping(seq, pdbentry.getFile(), protocol);
- return;
+ .setMapping(seq, chains, pdbentry.getFile(), protocol);
+ //PROMPT USER HERE TO ADD TO NEW OR EXISTING VIEW?
+ //FOR NOW, LETS JUST OPEN A NEW WINDOW
}
renderPanel = new RenderPanel();
}
renderPanel = new RenderPanel();
@@
-165,9
+169,7
@@
public class AppletJmol extends Frame
viewer.openFile(pdbentry.getFile());
}
viewer.openFile(pdbentry.getFile());
}
- this.setBounds(400, 400, 400, 400);
-
- this.setVisible(true);
+ jalview.bin.JalviewLite.addFrame(this, "Jmol", 400,400);
}
public void loadInline(String string)
}
public void loadInline(String string)
@@
-460,6
+462,14
@@
public class AppletJmol extends Frame
//End StructureListener
////////////////////////////
//End StructureListener
////////////////////////////
+ public Color getColour(int atomIndex, int pdbResNum, String chain, String pdbfile)
+ {
+ if (!pdbfile.equals(pdbentry.getFile()))
+ return null;
+
+ return new Color(viewer.getAtomArgb(atomIndex));
+ }
+
FeatureRenderer fr;
public void colourBySequence(AlignmentPanel ap)
{
FeatureRenderer fr;
public void colourBySequence(AlignmentPanel ap)
{
@@
-493,7
+503,8
@@
public class AppletJmol extends Frame
{
for (int m = 0; m < mapping.length; m++)
{
{
for (int m = 0; m < mapping.length; m++)
{
- if (mapping[m].getSequence() == sequence[s])
+ if (mapping[m].getSequence() == sequence[s]
+ && ap.av.alignment.findIndex(sequence[s])>-1)
{
for (int r = 0; r < sequence[s].getLength(); r++)
{
{
for (int r = 0; r < sequence[s].getLength(); r++)
{
@@
-606,14
+617,14
@@
public class AppletJmol extends Frame
MCview.PDBfile pdb;
if (loadedInline)
{
MCview.PDBfile pdb;
if (loadedInline)
{
- pdb = ssm.setMapping(sequence,
+ pdb = ssm.setMapping(sequence,chains,
pdbentry.getFile(),
AppletFormatAdapter.PASTE);
pdbentry.setFile("INLINE"+pdb.id);
}
else
{
pdbentry.getFile(),
AppletFormatAdapter.PASTE);
pdbentry.setFile("INLINE"+pdb.id);
}
else
{
- pdb = ssm.setMapping(sequence,
+ pdb = ssm.setMapping(sequence,chains,
pdbentry.getFile(),
AppletFormatAdapter.URL);
}
pdbentry.getFile(),
AppletFormatAdapter.URL);
}