Ejemplo n.º 1
0
        private void ExecuteTest_Minus(BasicRegion keepRegion, List <BasicRegion> excludeRegions, List <BasicRegion> expectedRegions)
        {
            var results = ChrIntervalSet.GetMinus(keepRegion, excludeRegions);

            Assert.Equal(expectedRegions.Count, results.Count);

            for (var i = 0; i < expectedRegions.Count; i++)
            {
                Assert.Equal(expectedRegions[i], results[i]);
            }
        }
Ejemplo n.º 2
0
        private void ExecuteTest_GetClipped(BasicRegion clipRegion, List <BasicRegion> excludeRegions, List <BasicRegion> expectedRegions = null)
        {
            var intervalSet = new ChrIntervalSet(
                new List <BasicRegion>()
            {
                new BasicRegion(5, 10),
                new BasicRegion(20, 30),
                new BasicRegion(40, 50),
            }, "chr1");

            var results = intervalSet.GetClipped(clipRegion, excludeRegions);

            Assert.Equal(expectedRegions.Count, results.Count);

            for (var i = 0; i < expectedRegions.Count; i++)
            {
                Assert.Equal(expectedRegions[i], results[i]);
            }
        }