label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Opens a new structure viewer with all representative structures\nassociated with the current selection\nsuperimposed with the current alignment.
label.associate_structure_with_sequence = Associate Structure with Sequence
label.from_file = From File
-label.enter_pdb_id = Enter PDB Id (Note: Specific chains can be retrieved by appending the chain code to the PDB Id delimited with a colon i.e. 1abc:X)
+label.enter_pdb_id = Enter PDB Id (or pdbid:chaincode)
label.discover_pdb_ids = Discover PDB IDs
label.text_colour = Text Colour
action.set_text_colour = Text Colour...
import jalview.util.GroupUrlLink.UrlStringTooLongException;
import jalview.util.MessageManager;
import jalview.util.UrlLink;
-import jalview.ws.DBRefFetcher;
import java.awt.Color;
import java.awt.event.ActionEvent;
ap, true));
}
- public void enterPDB_actionPerformed()
- {
- String id = JOptionPane.showInternalInputDialog(Desktop.desktop,
- MessageManager.getString("label.enter_pdb_id"),
- MessageManager.getString("label.enter_pdb_id"),
- JOptionPane.QUESTION_MESSAGE);
-
- if (id != null && id.length() > 0)
- {
- PDBEntry entry = new PDBEntry();
- entry.setId(id.toUpperCase());
- sequence.getDatasetSequence().addPDBId(entry);
- }
- }
-
- public void discoverPDB_actionPerformed()
- {
-
- final SequenceI[] sequences = ((ap.av.getSelectionGroup() == null) ? new SequenceI[]
- { sequence }
- : ap.av.getSequenceSelection());
- Thread discpdb = new Thread(new Runnable()
- {
- @Override
- public void run()
- {
- boolean isNucleotide = ap.alignFrame.getViewport().getAlignment()
- .isNucleotide();
-
- new DBRefFetcher(sequences, ap.alignFrame, null,
- ap.alignFrame.featureSettings, isNucleotide)
- .fetchDBRefs(false);
-
- }
-
- });
- discpdb.start();
- }
-
public void sequenceFeature_actionPerformed()
{
SequenceGroup sg = ap.av.getSelectionGroup();
pdbEntry = new PDBEntry();
if (pdbIdStr.split(":").length > 1)
{
- pdbEntry.setChainCode(pdbIdStr.split(":")[1]);
+ pdbEntry.setId(pdbIdStr.split(":")[0]);
+ pdbEntry.setChainCode(pdbIdStr.split(":")[1].toUpperCase());
+ }
+ else
+ {
+ pdbEntry.setId(pdbIdStr);
}
- pdbEntry.setId(pdbIdStr);
pdbEntry.setType(PDBEntry.Type.PDB);
selectedSequence.getDatasetSequence().addPDBId(pdbEntry);
}