def load_chromosome(chr_name):
 cur_chromosome = BasicChromosome.Chromosome(chr_name)
 chr_segment_info = all_chr_info[chr_name]
 for seg_info_num in range(len(chr_segment_info)):
  (label, fill_color, scale) = chr_segment_info[seg_info_num]
  if (seg_info_num == 0):
   cur_segment = BasicChromosome.TelomereSegment()
  elif (seg_info_num == (len(chr_segment_info) - 1)):
   cur_segment = BasicChromosome.TelomereSegment(1)
  else:
   cur_segment = BasicChromosome.ChromosomeSegment()
  if (label != ''):
   cur_segment.label = label
  if (fill_color is not None):
   cur_segment.fill_color = fill_color
  cur_segment.scale = scale
  cur_chromosome.add(cur_segment)
 cur_chromosome.scale_num = 19
 return cur_chromosome

def load_chromosome ( chr_name ) : cur_chromosome = BasicChromosome . Chromosome ( chr_name ) chr_segment_info = all_chr_info [ chr_name ] for seg_info_num in range ( len ( chr_segment_info ) ) : ( label , fill_color , scale ) = chr_segment_info [ seg_info_num ] if ( seg_info_num == 0 ) : cur_segment = BasicChromosome . TelomereSegment ( ) elif ( seg_info_num == ( len ( chr_segment_info ) - 1 ) ) : cur_segment = BasicChromosome . TelomereSegment ( 1 ) else : cur_segment = BasicChromosome . ChromosomeSegment ( ) if ( label != '' ) : cur_segment . label = label if ( fill_color is not None ) : cur_segment . fill_color = fill_color cur_segment . scale = scale cur_chromosome . add ( cur_segment ) cur_chromosome . scale_num = 19 return cur_chromosome
load a chromosome and all of its segments .