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);
jalview.bin.Cache.setProperty("LAST_DIRECTORY", fileName);
- saveAlignment(fileName, currentFileFormat);
+ saveAlignment(fileName, currentFileFormat.substring(0,currentFileFormat.indexOf(" ")));
}
}
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)
{
cap.setText(new FormatAdapter().formatSequences(
e.getActionCommand(),
- viewport.alignment.getSequencesArray(),
+ viewport.alignment,
omitHidden));
}
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;
public void actionPerformed(ActionEvent e)
{
- af.showProductsFor(sel, isRegSel, dna, source);
+ af.showProductsFor(sel, ds, isRegSel, dna, source);
}
});
}
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();
Alignment prods = CrossRef.findXrefSequences(sel, dna, source, ds);
if (prods!=null)
{