+ assertTrue("Expected at least one DNA protein association", af
+ .getViewport().getAlignment().getDataset().getCodonFrames()
+ .size() > 0);
+
+ }
+
+ @Test(groups = { "Functional" })
+ public void simpleGff3FileIdentify()
+ {
+ assertEquals("Didn't recognise file correctly.", IdentifyFile.GFF3File,
+ new IdentifyFile().Identify(simpleGff3file, FormatAdapter.FILE));
+ }
+
+ @Test(groups = { "Functional" })
+ public void simpleGff3FileClass() throws IOException
+ {
+ AlignmentI dataset = new Alignment(new SequenceI[] {});
+ FeaturesFile ffile = new FeaturesFile(simpleGff3file,
+ FormatAdapter.FILE);
+
+ boolean parseResult = ffile.parse(dataset, null, null, false, false);
+ assertTrue("return result should be true", parseResult);
+ checkDatasetfromSimpleGff3(dataset);
+ }
+
+ @Test(groups = { "Functional" })
+ public void simpleGff3FileLoader() throws IOException
+ {
+ AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded(
+ simpleGff3file, FormatAdapter.FILE);
+ assertTrue(
+ "Didn't read the alignment into an alignframe from Gff3 File",
+ af != null);
+ checkDatasetfromSimpleGff3(af.getViewport().getAlignment().getDataset());
+ }
+
+ @Test(groups = { "Functional" })
+ public void simpleGff3RelaxedIdMatching() throws IOException
+ {
+ AlignmentI dataset = new Alignment(new SequenceI[] {});
+ FeaturesFile ffile = new FeaturesFile(simpleGff3file,
+ FormatAdapter.FILE);
+
+ boolean parseResult = ffile.parse(dataset, null, null, false, true);
+ assertTrue("return result (relaxedID matching) should be true",
+ parseResult);
+ checkDatasetfromSimpleGff3(dataset);
+ }
+
+ @Test(groups = { "Functional" })
+ public void readGff3File() throws IOException
+ {
+ Gff3File gff3reader = new Gff3File(simpleGff3file, FormatAdapter.FILE);
+ Alignment dataset = new Alignment(gff3reader.getSeqsAsArray());
+ gff3reader.addProperties(dataset);
+ checkDatasetfromSimpleGff3(dataset);
+
+ }
+
+ private void checkDatasetfromSimpleGff3(AlignmentI dataset)
+ {
+ assertEquals("no sequences extracted from GFF3 file", 2,
+ dataset.getHeight());