Ejemplo n.º 1
0
    def test_generate_gene_mapping_err(self):
        #  _generate_interval_mapping [genomic.IntergenicRegion(11:77361962_77361962+)] 1181.39453125 5 30 None 77356962 77366962)
        ir = genomic.IntergenicRegion('11', 5000, 5000, STRAND.POS)
        tgt_width = 1000
        d = DiagramSettings()
        d.gene_min_buffer = 10
        # (self, canvas, gene, width, height, fill, label='', reference_genome=None)
        draw_genes(d, self.canvas, [ir], tgt_width, [])

        # _generate_interval_mapping ['Interval(29684391, 29684391)', 'Interval(29663998, 29696515)'] 1181.39453125 5 60 None 29662998 29697515
        # def generate_interval_mapping(cls, input_intervals, target_width, ratio, min_width, buffer_length=None, start=None, end=None, min_inter_width=None)
        itvls = [Interval(29684391, 29684391), Interval(29663998, 29696515)]
        generate_interval_mapping(itvls, 1181.39, 5, 60, None, 29662998,
                                  29697515)
Ejemplo n.º 2
0
 def test_generate_interval_mapping_outside_range_error(self):
     temp = [
         Interval(48556470, 48556646),
         Interval(48573290, 48573665),
         Interval(48575056, 48575078)
     ]
     mapping = generate_interval_mapping(input_intervals=temp,
                                         target_width=431.39453125,
                                         ratio=20,
                                         min_width=14,
                                         buffer_length=None,
                                         end=None,
                                         start=None,
                                         min_inter_width=10)
     st = min([x.start for x in temp])
     end = min([x.end for x in temp])
     Interval.convert_pos(mapping, st)
     Interval.convert_pos(mapping, end)