use of io.repseq.core.GeneFeature in project repseqio by repseqio.
the class GeneFeatureTest method test3_1.
@Test
public void test3_1() throws Exception {
GeneFeature f1 = createWithOffsets(1, 3, -2, 0);
assertEquals(createWithOffsets(1, 3, -3, 2), new GeneFeature(f1, -1, 2));
}
use of io.repseq.core.GeneFeature in project repseqio by repseqio.
the class GeneFeatureTest method test2.
@Test(expected = IllegalArgumentException.class)
public void test2() throws Exception {
GeneFeature f1 = create(1, 5), f2 = create(3, 7);
new GeneFeature(f1, f2);
}
use of io.repseq.core.GeneFeature in project repseqio by repseqio.
the class GeneFeatureTest method testIntersection11.
@Test
public void testIntersection11() throws Exception {
GeneFeature f1, f2;
f1 = create(7, 9);
f2 = create(1, 5, 7, 9, 10, 12);
Assert.assertEquals(create(7, 9), GeneFeature.intersection(f2, f1));
}
use of io.repseq.core.GeneFeature in project repseqio by repseqio.
the class GeneFeatureTest method testIntersection5.
@Test
public void testIntersection5() throws Exception {
GeneFeature f1, f2;
f1 = create(1, 5, 7, 9, 10, 12);
f2 = create(2, 5, 7, 9, 10, 11);
Assert.assertEquals(create(2, 5, 7, 9, 10, 11), GeneFeature.intersection(f1, f2));
Assert.assertEquals(create(2, 5, 7, 9, 10, 11), GeneFeature.intersection(f2, f1));
f1 = create(2, 5, 7, 9, 10, 12);
f2 = create(1, 5, 7, 9, 10, 11);
Assert.assertEquals(create(2, 5, 7, 9, 10, 11), GeneFeature.intersection(f1, f2));
Assert.assertEquals(create(2, 5, 7, 9, 10, 11), GeneFeature.intersection(f2, f1));
f1 = create(8, 9, 10, 11);
f2 = create(1, 5, 7, 9, 10, 12);
Assert.assertEquals(create(8, 9, 10, 11), GeneFeature.intersection(f1, f2));
Assert.assertEquals(create(8, 9, 10, 11), GeneFeature.intersection(f2, f1));
}
use of io.repseq.core.GeneFeature in project repseqio by repseqio.
the class GeneFeatureTest method test1.
@Test
public void test1() throws Exception {
GeneFeature f1, f2, f3, expected, actual;
f1 = create(1, 3);
f2 = create(4, 5);
expected = create(new int[] { 1, 3, 4, 5 });
actual = new GeneFeature(f1, f2);
assertEquals(expected, actual);
f1 = create(1, 5);
f2 = create(5, 6);
f3 = create(6, 9);
expected = create(1, 9);
actual = new GeneFeature(f1, f2, f3);
assertEquals(expected, actual);
f1 = create(1, 5);
f2 = create(6, 7);
f3 = create(7, 9);
expected = create(1, 5, 6, 9);
actual = new GeneFeature(f1, f2, f3);
assertEquals(expected, actual);
f1 = create(1, 5);
f2 = create(8, 10);
f3 = create(11, 12);
expected = create(1, 5, 8, 10, 11, 12);
actual = new GeneFeature(f1, f2, f3);
assertEquals(expected, actual);
}
Aggregations