+ SequenceFeature sf6 = new SequenceFeature("exon", "", 1, 2, 0f, null);
+ sf6.setValue("Parent", "transcript:" + accId);
+ seq.addSequenceFeature(sf6);
+
+ List<SequenceFeature> sfs = new EnsemblCds().getIdentifyingFeatures(seq,
+ accId);
+ assertFalse(sfs.contains(sf1));
+ assertFalse(sfs.contains(sf2));
+ assertTrue(sfs.contains(sf3));
+ assertTrue(sfs.contains(sf4));
+ assertFalse(sfs.contains(sf5));
+ assertFalse(sfs.contains(sf6));
+ }
+
+ @Test(groups = "Functional")
+ public void testIsValidReference() throws Exception
+ {
+ EnsemblSequenceFetcher esq = new EnsemblCds();
+ Assert.assertTrue(esq.isValidReference("CCDS5863.1"));
+ Assert.assertTrue(esq.isValidReference("ENST00000288602"));
+ Assert.assertTrue(esq.isValidReference("ENSG00000288602"));
+ Assert.assertTrue(esq.isValidReference("ENSP00000288602"));
+ Assert.assertFalse(esq.isValidReference("ENST0000288602"));
+ // non-human species have a 3 character identifier included:
+ Assert.assertTrue(esq.isValidReference("ENSMUSG00000099398"));