"getSeqsAsArray", new Class[]
{}).invoke(jmf));
cl.getMethod("addAnnotations", new Class[]
- { Alignment.class }).invoke(jmf, al);
+ { AlignmentI.class }).invoke(jmf, al);
for (SequenceI sq : al.getSequences())
{
if (sq.getDatasetSequence() != null)
// TODO consider using getSequenceSelection instead here
cap.setText(new jalview.io.AppletFormatAdapter().formatSequences(
- e.getActionCommand(), ap.av.getShowJVSuffix(), ap.av, true));
+ e.getActionCommand(), ap.av.getShowJVSuffix(), ap, true));
}
{ e.getActionCommand() }), 600, 500);
FeatureRenderer fr = this.alignPanel.cloneFeatureRenderer();
- cap.setText(new AppletFormatAdapter(viewport).formatSequences(
+ cap.setText(new AppletFormatAdapter(alignPanel).formatSequences(
e.getActionCommand(), viewport.getAlignment(),
viewport.getShowJVSuffix()));
}
import jalview.analysis.AlignmentUtils;
import jalview.api.ComplexAlignFile;
import jalview.bin.JalviewLite;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.PDBEntry;
protected void loadAlignment(String text, boolean newWindow,
AlignViewport viewport)
{
- Alignment al = null;
+ AlignmentI al = null;
String format = new IdentifyFile().Identify(text,
AppletFormatAdapter.PASTE);
- AppletFormatAdapter afa = new AppletFormatAdapter(viewport);
+ AppletFormatAdapter afa = new AppletFormatAdapter(alignFrame.alignPanel);
try
{
al = afa.readFile(text, AppletFormatAdapter.PASTE, format);
* @param al
* @return
*/
- protected boolean openSplitFrame(Alignment al, String format)
+ protected boolean openSplitFrame(AlignmentI al, String format)
{
final AlignmentI thisAlignment = this.alignFrame.getAlignViewport().getAlignment();
if (thisAlignment.isNucleotide() == al.isNucleotide())
*/
public AlignFrame loadAlignment(String text, String title)
{
- Alignment al = null;
+ AlignmentI al = null;
String format = new IdentifyFile().Identify(text,
AppletFormatAdapter.PASTE);
*/
package jalview.bin;
-import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
import jalview.io.AppletFormatAdapter;
import jalview.io.FileParse;
{
System.out.println("User specified Format is " + format);
}
- Alignment al = null;
+ AlignmentI al = null;
try
{
al = new AppletFormatAdapter().readFile(file, protocol, format);
* profileseq marked as hidden.
*/
public static ColumnSelection propagateInsertions(SequenceI profileseq,
- Alignment al, AlignmentView input)
+ AlignmentI al, AlignmentView input)
{
int profsqpos = 0;
}
ExportData exportData = getAlignmentForExport(format);
- FormatAdapter f = new FormatAdapter(viewport);
+ FormatAdapter f = new FormatAdapter(alignPanel);
String output = f.formatSequences(format,
exportData.getAlignment(), // class cast exceptions will
// occur in the distant future
cap.setForInput(null);
try
{
- cap.setText(new FormatAdapter(viewport).formatSequences(
+ cap.setText(new FormatAdapter(alignPanel, exportData.getSettings())
+ .formatSequences(
e.getActionCommand(),
exportData.getAlignment(),
exportData.getOmitHidden(), exportData.getStartEndPostions(),
public class CutAndPasteTransfer extends GCutAndPasteTransfer
{
- AlignViewport viewport;
+ AlignmentViewPanel alignpanel;
+
+ AlignViewportI viewport;
FileParse source = null;
public CutAndPasteTransfer()
/**
* DOCUMENT ME!
*/
- public void setForInput(AlignViewport viewport)
+ public void setForInput(AlignmentViewPanel viewpanel)
{
- this.viewport = viewport;
+ this.alignpanel = viewpanel;
+ if (alignpanel != null)
+ {
+
+ }
+ this.viewport = alignpanel.getAlignViewport();
if (viewport != null)
{
ok.setText(MessageManager.getString("action.add"));
{
String format = new IdentifyFile().Identify(getText(), "Paste");
// TODO: identify feature, annotation or tree file and parse appropriately.
- Alignment al = null;
+ AlignmentI al = null;
if (FormatAdapter.isValidFormat(format))
{
try
{
- FormatAdapter fa = new FormatAdapter(viewport);
+ FormatAdapter fa = new FormatAdapter(alignpanel);
al = fa.readFile(getText(), "Paste", format);
source = fa.getAlignFile();
{ format });
if (viewport != null)
{
- viewport.addAlignment(al, title);
+ ((AlignViewport) viewport).addAlignment(al, title);
}
else
{
public void inputTextboxMenuItem_actionPerformed(AlignViewport viewport)
{
CutAndPasteTransfer cap = new CutAndPasteTransfer();
- cap.setForInput(viewport);
+ cap.setForInput(viewport.getAlignPanel());
Desktop.addInternalFrame(cap,
MessageManager.getString("label.cut_paste_alignmen_file"),
true, 600, 500);
// wysiwig behaviour
cap.setText(new FormatAdapter().formatSequences(e.getActionCommand(),
- ap.av, true));
+ ap, true));
}
public void pdbFromFile_actionPerformed()
AlignmentI parseResult(String result, String title)
{
String format = new IdentifyFile().Identify(result, "Paste");
- Alignment sequences = null;
+ AlignmentI sequences = null;
if (FormatAdapter.isValidFormat(format))
{
sequences = null;
*/
package jalview.io;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Sequence;
*
* @param al
*/
- public void addAnnotations(Alignment al)
+ public void addAnnotations(AlignmentI al)
{
addProperties(al);
for (int i = 0; i < annotations.size(); i++)
}
+ /**
+ * register sequence groups on the alignment for **output**
+ *
+ * @param al
+ */
public void addSeqGroups(AlignmentI al)
{
this.seqGroups = al.getGroups();
* @note implicitly called by addAnnotations()
* @param al
*/
- public void addProperties(Alignment al)
+ public void addProperties(AlignmentI al)
{
if (properties != null && properties.size() > 0)
{
*/
package jalview.io;
-import jalview.api.AlignViewportI;
+import jalview.api.AlignExportSettingI;
+import jalview.api.AlignmentViewPanel;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentView;
+import jalview.gui.AlignmentPanel;
import jalview.util.MessageManager;
import java.io.File;
*/
public class AppletFormatAdapter
{
- private AlignViewportI viewport;
+ private AlignmentViewPanel viewpanel;
public static String FILE = "File";
*/
protected String newline = System.getProperty("line.separator");
+ private AlignExportSettingI exportSettings;
+
/**
* List of valid format strings used in the isValidFormat method
*/
{
}
- public AppletFormatAdapter(AlignViewportI viewport)
+ public AppletFormatAdapter(AlignmentViewPanel viewpanel)
+ {
+ this.viewpanel = viewpanel;
+ }
+
+ public AppletFormatAdapter(AlignmentPanel alignPanel,
+ AlignExportSettingI settings)
{
- this.viewport = viewport;
+ viewpanel = alignPanel;
+ exportSettings = settings;
}
/**
*
* @return DOCUMENT ME!
*/
- public Alignment readFile(String inFile, String type, String format)
+ public AlignmentI readFile(String inFile, String type, String format)
throws java.io.IOException
{
// TODO: generalise mapping between format string and io. class instances
this.inFile = inFile;
try
{
- Alignment al;
if (format.equals("FASTA"))
{
alignFile = new FastaFile(inFile, type);
{
alignFile = new Gff3File(inFile, type);
}
- // Standard boilerplate for creating alignment from parser
- alignFile.setViewport(viewport);
-
- al = new Alignment(alignFile.getSeqsAsArray());
-
- alignFile.addAnnotations(al);
-
- alignFile.addGroups(al);
-
- return al;
+ return buildAlignmentFrom(alignFile);
} catch (Exception e)
{
e.printStackTrace();
{
// Possible sequence is just residues with no label
alignFile = new FastaFile(">UNKNOWN\n" + inFile, "Paste");
- Alignment al = new Alignment(alignFile.getSeqsAsArray());
-
- alignFile.addSeqGroups(al);
- alignFile.addAnnotations(al);
- return al;
+ return buildAlignmentFrom(alignFile);
} catch (Exception ex)
{
String type = source.type;
try
{
- Alignment al;
if (format.equals("FASTA"))
{
alignFile = new FastaFile(source);
else if (format.equals(JSONFile.FILE_DESC))
{
alignFile = new JSONFile(source);
- al = new Alignment(alignFile.getSeqsAsArray());
- alignFile.addAnnotations(al);
- alignFile.addSeqGroups(al);
- return al;
}
else if (format.equals(HtmlFile.FILE_DESC))
{
alignFile = new HtmlFile(source);
}
- al = new Alignment(alignFile.getSeqsAsArray());
- alignFile.addAnnotations(al);
- return al;
+ return buildAlignmentFrom(alignFile);
+
} catch (Exception e)
{
e.printStackTrace();
{
// Possible sequence is just residues with no label
alignFile = new FastaFile(">UNKNOWN\n" + inFile, "Paste");
- Alignment al = new Alignment(alignFile.getSeqsAsArray());
- alignFile.addAnnotations(al);
- alignFile.addSeqGroups(al);
- return al;
+ return buildAlignmentFrom(alignFile);
} catch (Exception ex)
{
/**
+ * boilerplate method to handle data from an AlignFile and construct a new
+ * alignment or import to an existing alignment
+ *
+ * @param alignFile2
+ * @return AlignmentI instance ready to pass to a UI constructor
+ */
+ private AlignmentI buildAlignmentFrom(AlignFile alignFile2)
+ {
+ // Standard boilerplate for creating alignment from parser
+ alignFile.configureForView(viewpanel);
+
+ AlignmentI al = new Alignment(alignFile.getSeqsAsArray());
+
+ alignFile.addAnnotations(al);
+
+ alignFile.addGroups(al);
+
+ return al;
+ }
+
+ /**
* create an alignment flatfile from a Jalview alignment view
* @param format
* @param jvsuffix
* @return flatfile in a string
*/
public String formatSequences(String format, boolean jvsuffix,
- AlignViewportI av, boolean selectedOnly)
+ AlignmentViewPanel ap, boolean selectedOnly)
{
- AlignmentView selvew = av.getAlignmentView(selectedOnly, false);
- AlignmentI aselview = selvew.getVisibleAlignment(av
+ AlignmentView selvew = ap.getAlignViewport().getAlignmentView(
+ selectedOnly, false);
+ AlignmentI aselview = selvew.getVisibleAlignment(ap.getAlignViewport()
.getGapCharacter());
- List<AlignmentAnnotation> ala = (av
+ List<AlignmentAnnotation> ala = (ap.getAlignViewport()
.getVisibleAlignmentAnnotation(selectedOnly));
if (ala != null)
{
else if (format.equalsIgnoreCase(JSONFile.FILE_DESC))
{
afile = new JSONFile();
- afile.setViewport(viewport);
- // Add groups to AlignFile
- afile.seqGroups = alignment.getGroups();
-
- // Add non auto calculated annotation to AlignFile
- for (AlignmentAnnotation annot : alignment.getAlignmentAnnotation())
- {
- if (annot != null && !annot.autoCalculated)
- {
- if (annot.label.equals("PDB.CATempFactor"))
- {
- continue;
- }
- afile.annotations.add(annot);
- }
- }
}
else if (format.equalsIgnoreCase("RNAML"))
{
afile.setNewlineString(newline);
afile.addJVSuffix(jvsuffix);
- afile.setSeqs(alignment.getSequencesArray());
+ afile.setExportSettings(exportSettings);
+
+ afile.configureForView(viewpanel);
+ // check whether we were given a specific alignment to export, rather than
+ // the one in the viewpanel
+ if (viewpanel == null || viewpanel.getAlignment() == null
+ || viewpanel.getAlignment() != alignment)
+ {
+ afile.setSeqs(alignment.getSequencesArray());
+ }
+ else
+ {
+ afile.setSeqs(viewpanel.getAlignment().getSequencesArray());
+ }
String afileresp = afile.print();
if (afile.hasWarningMessage())
System.gc();
long memf = -r.totalMemory() + r.freeMemory();
long t1 = -System.currentTimeMillis();
- Alignment al = afa.readFile(args[i], FILE,
+ AlignmentI al = afa.readFile(args[i], FILE,
new IdentifyFile().Identify(args[i], FILE));
t1 += System.currentTimeMillis();
System.gc();
import jalview.analysis.SequenceIdMatcher;
import jalview.datamodel.AlignedCodonFrame;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceDummy;
import jalview.datamodel.SequenceFeature;
}
@Override
- public void addAnnotations(Alignment al)
+ public void addAnnotations(AlignmentI al)
{
// TODO Auto-generated method stub
super.addAnnotations(al);
}
@Override
- public void addProperties(Alignment al)
+ public void addProperties(AlignmentI al)
{
// TODO Auto-generated method stub
super.addProperties(al);
import jalview.api.AlignExportSettingI;
import jalview.api.AlignViewportI;
+import jalview.api.AlignmentViewPanel;
import jalview.util.MessageManager;
import java.io.BufferedReader;
throw new IOException(MessageManager.formatMessage("exception.invalid_source_stream", new String[]{errormessage}));
}
+ /**
+ *
+ * @return true if this FileParse is configured for Export only
+ */
+ public boolean isExporting()
+ {
+ return !error && dataIn == null;
+ }
+
+ /**
+ *
+ * @return true if the data source is valid
+ */
public boolean isValid()
{
return !error;
{
this.exportSettings = exportSettings;
}
+
+ /**
+ * method overridden by complex file exporter/importers which support
+ * exporting visualisation and layout settings for a view
+ *
+ * @param avpanel
+ */
+ public void configureForView(AlignmentViewPanel avpanel)
+ {
+ if (avpanel!=null) {
+ setViewport(avpanel.getAlignViewport());
+ }
+ // could also set export/import settings
+ }
}
*/
package jalview.io;
-import jalview.api.AlignViewportI;
+import jalview.api.AlignExportSettingI;
+import jalview.api.AlignmentViewPanel;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.gui.AlignmentPanel;
/**
* Additional formatting methods used by the application in a number of places.
*/
public class FormatAdapter extends AppletFormatAdapter
{
- public FormatAdapter(AlignViewportI viewport)
+ public FormatAdapter(AlignmentViewPanel viewpanel)
{
- super(viewport);
+ super(viewpanel);
init();
}
init();
}
+ public FormatAdapter(AlignmentPanel alignPanel,
+ AlignExportSettingI settings)
+ {
+ super(alignPanel, settings);
+ }
+
private void init()
{
if (jalview.bin.Cache.getDefault("STRUCT_FROM_PDB", true))
return this.formatSequences(format, alignment, suffix);
}
- public Alignment readFile(String inFile, String type, String format)
+ public AlignmentI readFile(String inFile, String type, String format)
throws java.io.IOException
{
- Alignment al = super.readFile(inFile, type, format);
+ AlignmentI al = super.readFile(inFile, type, format);
return al;
}
public AlignmentI readFromFile(FileParse source, String format)
throws java.io.IOException
{
- Alignment al = (Alignment) super.readFromFile(source, format);
+ AlignmentI al = super.readFromFile(source, format);
return al;
}
}
/**
- * Create a flat file representation of a given view or selected region of a view
+ * Create a flat file representation of a given view or selected region of a
+ * view
+ *
* @param format
- * @param av
+ * @param ap
+ * alignment panel originating the view
* @return String containing flat file
*/
- public String formatSequences(String format, AlignViewportI av, boolean selectedOnly)
+ public String formatSequences(String format, AlignmentViewPanel ap,
+ boolean selectedOnly)
{
- return formatSequences(format, getCacheSuffixDefault(format), av, selectedOnly);
+ return formatSequences(format, getCacheSuffixDefault(format), ap,
+ selectedOnly);
}
}
@Override
- public void addProperties(Alignment al)
+ public void addProperties(AlignmentI al)
{
super.addProperties(al);
if (dataset.getCodonFrames() != null)
try
{
AlignmentPojo jsonAlignmentPojo = new AlignmentPojo();
- if (getViewport() != null)
- {
- configureFromViewport();
-
- }
int count = 0;
for (SequenceI seq : seqs)
this.displayedFeatures = displayedFeatures;
}
+ @Override
public void configureForView(AlignmentViewPanel avpanel)
{
+ super.configureForView(avpanel);
+ if (isExporting())
+ {
+ setViewport(avpanel.getAlignViewport());
+ seqGroups = avpanel.getAlignment().getGroups();
+ setDisplayedFeatures(getViewport().getFeaturesDisplayed());
+ fr = avpanel.cloneFeatureRenderer();
- setViewport(avpanel.getAlignViewport());
- seqGroups = avpanel.getAlignment().getGroups();
- setDisplayedFeatures(getViewport().getFeaturesDisplayed());
- fr = avpanel.cloneFeatureRenderer();
+ for (SequenceI seq : getViewport().getAlignment().getSequences())
+ {
+ seqs.add(seq);
+ }
- for (SequenceI seq : getViewport().getAlignment().getSequences())
- {
- seqs.add(seq);
- }
-
- // Add non auto calculated annotation to AlignFile
- for (AlignmentAnnotation annot : getViewport().getAlignment()
- .getAlignmentAnnotation())
- {
- if (annot != null && !annot.autoCalculated)
+ // Add non auto calculated annotation to AlignFile
+ for (AlignmentAnnotation annot : getViewport().getAlignment()
+ .getAlignmentAnnotation())
{
- if (annot.label.equals("PDB.CATempFactor"))
+ if (annot != null && !annot.autoCalculated)
{
- continue;
+ if (annot.label.equals("PDB.CATempFactor"))
+ {
+ continue;
+ }
+ annotations.add(annot);
}
- annotations.add(annot);
}
- }
- }
- public void configureFromViewport()
- {
- if (getViewport() == null)
- {
- return;
+ globalColorScheme = ColourSchemeProperty.getColourName(getViewport()
+ .getGlobalColourScheme());
+ setDisplayedFeatures(getViewport().getFeaturesDisplayed());
+ showSeqFeatures = getViewport().isShowSequenceFeatures();
}
- globalColorScheme = ColourSchemeProperty.getColourName(getViewport()
- .getGlobalColourScheme());
- setDisplayedFeatures(getViewport().getFeaturesDisplayed());
- showSeqFeatures = getViewport().isShowSequenceFeatures();
}
+
public static String getJSONData(AlignmentViewPanel av)
{
JSONFile jsonFile = new JSONFile();
*/
package jalview.jbgui;
-import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
import jalview.io.FormatAdapter;
import jalview.util.MessageManager;
public void run()
{
String str = textfield.getText();
- Alignment al = null;
+ AlignmentI al = null;
try
{
al = new FormatAdapter().readFile(str, "Paste", "FASTA");
*/
package jalview.ws.dbsources;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.DBRefSource;
{
queries = queries.toUpperCase().replaceAll(
"(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)", "");
- Alignment al = null;
+ AlignmentI al = null;
EBIFetchClient ebi = new EBIFetchClient();
// uniprotxml parameter required since december 2007
// uniprotkb dbname changed introduced december 2008
* @param entries
* a list of n uniprot entries to be analysed.
*/
- public void addUniprotXrefs(Alignment al, Vector<UniprotEntry> entries)
+ public void addUniprotXrefs(AlignmentI al, Vector<UniprotEntry> entries)
{
final String dbVersion = getDbVersion();
import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentView;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.SequenceI;
{
return null;
}
- Alignment al = null;
+ AlignmentI al = null;
ColumnSelection alcsel = null;
int FirstSeq = -1; // the position of the query sequence in Alignment al
* @param al
* @param profileseq
*/
- private void alignToProfileSeq(Alignment al, SequenceI profileseq)
+ private void alignToProfileSeq(AlignmentI al, SequenceI profileseq)
{
char gc = al.getGapCharacter();
int[] gapMap = profileseq.gapMap();
*/
package jalview.ws.seqfetcher;
-import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
import jalview.io.FormatAdapter;
import jalview.io.IdentifyFile;
* @return null or a valid alignment
* @throws Exception
*/
- protected Alignment parseResult(String result) throws Exception
+ protected AlignmentI parseResult(String result) throws Exception
{
- Alignment sequences = null;
+ AlignmentI sequences = null;
String format = new IdentifyFile().Identify(result, "Paste");
if (FormatAdapter.isValidFormat(format))
{
*/
protected AlignmentI loadAlignment(final String data, String format) throws IOException
{
- Alignment a = new FormatAdapter().readFile(data,
+ AlignmentI a = new FormatAdapter().readFile(data,
AppletFormatAdapter.PASTE, format);
a.setDataset(null);
return a;
protected AlignmentI loadAlignment(final String data, String format)
throws IOException
{
- Alignment a = new FormatAdapter().readFile(data,
+ AlignmentI a = new FormatAdapter().readFile(data,
AppletFormatAdapter.PASTE, format);
a.setDataset(null);
return a;
import static org.junit.Assert.assertNotNull;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
{
String jsonFile = "examples/example.json";
AppletFormatAdapter rf = new AppletFormatAdapter();
- Alignment al = null;
+ AlignmentI al = null;
try
{
al = rf.readFile(jsonFile, AppletFormatAdapter.FILE,
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import java.io.IOException;
private void testDataExtraction(String file) throws IOException
{
AppletFormatAdapter rf = new AppletFormatAdapter();
- Alignment al = rf.readFile(file, AppletFormatAdapter.FILE,
+ AlignmentI al = rf.readFile(file, AppletFormatAdapter.FILE,
PhylipFile.FILE_DESC);
assertNotNull("Couldn't read supplied alignment data.", al);
public void testIO(String file) throws IOException
{
AppletFormatAdapter rf = new AppletFormatAdapter();
- Alignment al = rf.readFile(file, AppletFormatAdapter.FILE,
+ AlignmentI al = rf.readFile(file, AppletFormatAdapter.FILE,
PhylipFile.FILE_DESC);
assertNotNull("Couldn't read supplied alignment data.", al);
String outputfile = rf.formatSequences(PhylipFile.FILE_DESC, al, true);
- Alignment al_input = new AppletFormatAdapter().readFile(outputfile,
+ AlignmentI al_input = new AppletFormatAdapter().readFile(outputfile,
AppletFormatAdapter.PASTE, PhylipFile.FILE_DESC);
assertNotNull("Couldn't parse reimported alignment data.", al_input);
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
{
AppletFormatAdapter rf = new AppletFormatAdapter();
- Alignment al = rf.readFile(ff, AppletFormatAdapter.FILE,
+ AlignmentI al = rf.readFile(ff, AppletFormatAdapter.FILE,
new IdentifyFile().Identify(ff, AppletFormatAdapter.FILE));
assertNotNull("Couldn't read supplied alignment data.", al);
System.out.println("Output file in '" + ioformat + "':\n"
+ outputfile + "\n<<EOF\n");
// test for consistency in io
- Alignment al_input = new AppletFormatAdapter().readFile(outputfile,
+ AlignmentI al_input = new AppletFormatAdapter().readFile(outputfile,
AppletFormatAdapter.PASTE, ioformat);
assertNotNull("Couldn't parse reimported alignment data.", al_input);
import static org.junit.Assert.assertTrue;
import jalview.api.AlignViewportI;
import jalview.datamodel.AlignedCodonFrame;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.SearchResults;
import jalview.gui.AlignViewport;
import jalview.io.AppletFormatAdapter;
import jalview.io.FormatAdapter;
+
import java.awt.Color;
import java.io.IOException;
import java.util.Arrays;
import org.junit.Test;
-
public class MappingUtilsTest
{
private AlignViewportI dnaView;
protected AlignmentI loadAlignment(final String data, String format)
throws IOException
{
- Alignment a = new FormatAdapter().readFile(data,
+ AlignmentI a = new FormatAdapter().readFile(data,
AppletFormatAdapter.PASTE, format);
a.setDataset(null);
return a;