}
@Test
- public void simpleGff3() throws IOException
+ public void simpleGff3FileIdentify()
+ {
+ Assert.assertEquals("Didn't recognise file correctly.",
+ IdentifyFile.GFF3File,
+ new IdentifyFile().Identify(simpleGff3file, FormatAdapter.FILE));
+ }
+
+ @Test
+ public void simpleGff3FileClass() throws IOException
{
AlignmentI dataset = new Alignment(new SequenceI[]
{});
}
@Test
+ public void simpleGff3FileLoader() throws IOException
+ {
+ AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded(
+ simpleGff3file, null);
+ Assert.assertTrue(
+ "Didn't read the alignment into an alignframe from Gff3 File",
+ af != null);
+ checkDatasetfromSimpleGff3(af.getViewport().getAlignment().getDataset());
+ }
+
+ @Test
public void simpleGff3RelaxedIdMatching() throws IOException
{
AlignmentI dataset = new Alignment(new SequenceI[]
checkDatasetfromSimpleGff3(dataset);
}
+ @Test
+ 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)
{
Assert.assertEquals("no sequences extracted from GFF3 file", 2,
Assert.assertEquals("Wrong number of features", 0, seq2
.getSequenceFeatures() == null ? 0
: seq2.getSequenceFeatures().length);
+ Assert.assertTrue(
+ "Expected at least one CDNA/Protein mapping for seq1",
+ dataset.getCodonFrame(seq1) != null
+ && dataset.getCodonFrame(seq1).size() > 0);
}
// @Test