def assert_final_peaks_equals_input_peaks(self):
     final_peaks = IntervalCollection.create_list_from_file(
         "test_max_paths.intervalcollection")
     for peak in self.peaks:
         self.assertTrue(
             peak in final_peaks.intervals,
             "Peak %s not in final peaks. Final peaks: \n%s" %
             (peak, final_peaks.intervals))
     self.assertEqual(len(self.peaks), len(final_peaks.intervals))
Esempio n. 2
0
 def __init__(self, graph, sequence_retriever, linear_path_file_name,
              peaks1_file_name, peaks2_file_name):
     self.graph = graph
     self.sequence_retriever = sequence_retriever
     self.peaks1 = PeakCollection.create_list_from_file(peaks1_file_name,
                                                        graph=graph)
     self.peaks2 = PeakCollection.create_list_from_file(peaks2_file_name,
                                                        graph=graph)
     print("Number of intervals in set 1/2: %d / %d" %
           (len(self.peaks1.intervals), len(self.peaks2.intervals)))
     if linear_path_file_name is not None:
         self.linear_path = IntervalCollection.create_list_from_file(
             linear_path_file_name, self.graph).intervals[0]
Esempio n. 3
0
 def do_asserts(self):
     for i, chromosome in enumerate(self.chromosomes):
         final_peaks = IntervalCollection.create_list_from_file(
             "multigraphs_" + chromosome + "_max_paths.intervalcollection")
         for peak in self.peaks[i]:
             assert peak in final_peaks