X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=6302efb2456be83bebc9d3c180a4e8e9ad23569e;hb=25eb28b39b04e155bb1157cb78efcd872a77058a;hp=a8cd23a6a0e8561ece61cf5b37871ab28431922c;hpb=40ecea964afaaf404465d75873ec915b901117a3;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index a8cd23a..6302efb 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -693,9 +693,9 @@ public class AlignFrame JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. getProperty( "LAST_DIRECTORY"), new String[] - { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc","jar" }, + { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc","amsa","jar" }, new String[] - { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview" }, + { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "AMSA", "Jalview" }, currentFileFormat, false); @@ -726,7 +726,7 @@ public class AlignFrame jalview.bin.Cache.setProperty("LAST_DIRECTORY", fileName); - saveAlignment(fileName, currentFileFormat); + saveAlignment(fileName, currentFileFormat.substring(0,currentFileFormat.indexOf(" "))); } } @@ -769,11 +769,12 @@ public class AlignFrame omitHidden = viewport.getViewAsString(false); } } + FormatAdapter f = new FormatAdapter(); - String output = new FormatAdapter().formatSequences( + String output = f.formatSequences( format, - viewport.alignment.getSequencesArray(), - omitHidden); + (Alignment) viewport.alignment, // class cast exceptions will occur in the distant future + omitHidden, f.getCacheSuffixDefault(format)); if (output == null) { @@ -844,7 +845,7 @@ public class AlignFrame cap.setText(new FormatAdapter().formatSequences( e.getActionCommand(), - viewport.alignment.getSequencesArray(), + viewport.alignment, omitHidden)); } @@ -3584,6 +3585,7 @@ public class AlignFrame try { showProducts.removeAll(); final boolean dna = viewport.getAlignment().isNucleotide(); + final Alignment ds = dataset; String[] ptypes = CrossRef.findSequenceXrefTypes(dna, selection, dataset); //Object[] prods = CrossRef.buildXProductsList(viewport.getAlignment().isNucleotide(), selection, dataset, true); final SequenceI[] sel = selection; @@ -3598,7 +3600,7 @@ public class AlignFrame public void actionPerformed(ActionEvent e) { - af.showProductsFor(sel, isRegSel, dna, source); + af.showProductsFor(sel, ds, isRegSel, dna, source); } }); @@ -3613,9 +3615,9 @@ public class AlignFrame } return showp; } -protected void showProductsFor(SequenceI[] sel, boolean isRegSel, boolean dna, String source) +protected void showProductsFor(SequenceI[] sel, Alignment ds, boolean isRegSel, boolean dna, String source) { - Alignment ds = getViewport().alignment.getDataset(); + ds = this.getViewport().alignment.getDataset(); // update our local dataset reference Alignment prods = CrossRef.findXrefSequences(sel, dna, source, ds); if (prods!=null) { @@ -3623,7 +3625,7 @@ protected void showProductsFor(SequenceI[] sel, boolean isRegSel, boolean dna, S for (int s=0; s