def test_sample_equals_control_one_node(self):
        sample = from_intervals(self.graph, [Interval(0, 3, [2])])
        control = from_intervals(self.graph, [Interval(0, 3, [1, 2])])

        finder = PValuesFinder(sample, control)
        p_values = finder.get_p_values_pileup()
        correct = SparseValues([0, 3, 6], [0, -np.log10(0.26424), 0])
        self.assertEqual(p_values, correct)
    def test_single_fragment(self):

        self.correct_pileup = from_intervals(
            self.graph, [Interval(0, 5, [1, 2, 3]),
                         Interval(0, 5, [1, 2, 3])])
        self.fragments = [Interval(0, 5, [1, 2, 3])]
        self.do_asserts()
 def test_two_fragments(self):
     self.correct_pileup = from_intervals(self.graph, [
         Interval(3, 3, [1, 2]),
         Interval(3, 3, [1, 2]),
         Interval(0, 5, [1]),
         Interval(0, 5, [1]),
     ])
     self.fragments = [Interval(0, 5, [1]), Interval(3, 3, [1, 2])]
     self.do_asserts()