git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1b5ee75
)
functions that operate on references to sequences in alignment rather than copies.
author
jprocter
<Jim Procter>
Mon, 23 Apr 2007 15:13:00 +0000
(15:13 +0000)
committer
jprocter
<Jim Procter>
Mon, 23 Apr 2007 15:13:00 +0000
(15:13 +0000)
src/jalview/gui/AlignFrame.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AlignFrame.java
b/src/jalview/gui/AlignFrame.java
index
61e2af4
..
c60355c
100755
(executable)
--- a/
src/jalview/gui/AlignFrame.java
+++ b/
src/jalview/gui/AlignFrame.java
@@
-1310,7
+1310,7
@@
public class AlignFrame
return;
}
// TODO: preserve the ordering of displayed alignment annotation in any internal paste (particularly sequence associated annotation)
return;
}
// TODO: preserve the ordering of displayed alignment annotation in any internal paste (particularly sequence associated annotation)
- SequenceI [] seqs = viewport.getSelectionAsNewSequence();
+ SequenceI [] seqs = viewport.getSelectionAsNewSequence();
String[] omitHidden = null;
if (viewport.hasHiddenColumns)
String[] omitHidden = null;
if (viewport.hasHiddenColumns)
@@
-1477,7
+1477,7
@@
public class AlignFrame
if (newAlignment)
{
if (newAlignment)
{
-
+
if (Desktop.jalviewClipboard != null)
{
// dataset is inherited
if (Desktop.jalviewClipboard != null)
{
// dataset is inherited
@@
-1503,10
+1503,10
@@
public class AlignFrame
// an existing alignment
Vector newDs = (importDs) ? new Vector() : null; // used to create
// minimum dataset set
// an existing alignment
Vector newDs = (importDs) ? new Vector() : null; // used to create
// minimum dataset set
-
+
for (int i = 0; i < sequences.length; i++)
{
for (int i = 0; i < sequences.length; i++)
{
- if (importDs)
+ if (importDs)
{
newDs.addElement(null);
}
{
newDs.addElement(null);
}
@@
-1516,7
+1516,7
@@
public class AlignFrame
{
if (!newDs.contains(ds))
{
{
if (!newDs.contains(ds))
{
- newDs.setElementAt(ds, i);
+ newDs.setElementAt(ds, i);
ds = new Sequence(ds);
// update with new dataset sequence
sequences[i].setDatasetSequence(ds);
ds = new Sequence(ds);
// update with new dataset sequence
sequences[i].setDatasetSequence(ds);
@@
-1581,7
+1581,7
@@
public class AlignFrame
alignment.setAnnotationIndex(sequences[i].getAnnotation()[a], a);
}
alignment.setAnnotationIndex(sequences[i].getAnnotation()[a], a);
}
-
+
}
}
if (!newAlignment) {
}
}
if (!newAlignment) {
@@
-1610,7
+1610,7
@@
public class AlignFrame
//>>>This is a fix for the moment, until a better solution is found!!<<<
af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().transferSettings(
alignPanel.seqPanel.seqCanvas.getFeatureRenderer());
//>>>This is a fix for the moment, until a better solution is found!!<<<
af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().transferSettings(
alignPanel.seqPanel.seqCanvas.getFeatureRenderer());
-
+
// TODO: maintain provenance of an alignment, rather than just make the title a concatenation of operations.
if (!externalPaste) {
if (title.startsWith("Copied sequences"))
// TODO: maintain provenance of an alignment, rather than just make the title a concatenation of operations.
if (!externalPaste) {
if (title.startsWith("Copied sequences"))
@@
-3336,21
+3336,27
@@
public class AlignFrame
}
}
+ /**
+ * empty the web service menu and add any ad-hoc functions
+ * not dynamically discovered.
+ *
+ */
private void resetWebServiceMenu()
{
webService.removeAll();
// Temporary hack - DBRef Fetcher always top level ws entry.
JMenuItem rfetch = new JMenuItem("Fetch DB References");
private void resetWebServiceMenu()
{
webService.removeAll();
// Temporary hack - DBRef Fetcher always top level ws entry.
JMenuItem rfetch = new JMenuItem("Fetch DB References");
+ rfetch.setToolTipText("Retrieve and parse uniprot records for the alignment or the currently selected sequences");
webService.add(rfetch);
rfetch.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
new jalview.io.DBRefFetcher(
webService.add(rfetch);
rfetch.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
new jalview.io.DBRefFetcher(
- alignPanel.av.alignment.getSequencesArray(),
+ alignPanel.av.getSequenceSelection(),
alignPanel.alignFrame).fetchDBRefs(false);
}
alignPanel.alignFrame).fetchDBRefs(false);
}
-
+
});
}
});
}
@@
-3380,7
+3386,7
@@
public void showTranslation_actionPerformed(ActionEvent e)
///////////////////////////////
// Collect Data to be translated/transferred
///////////////////////////////
// Collect Data to be translated/transferred
- SequenceI [] selection = viewport.getSelectionAsNewSequence();
+ SequenceI [] selection = viewport.getSequenceSelection();
String [] seqstring = viewport.getViewAsString(true);
AlignmentI al = null;
try {
String [] seqstring = viewport.getViewAsString(true);
AlignmentI al = null;
try {