Permalink
Browse files

Test optional fill color on chromosome diagrams

  • Loading branch information...
1 parent 53b3e6c commit 4aa11be9073d648c348bb2dca16be2cf06ec621a @peterjc peterjc committed Mar 18, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 Tests/test_GraphicsChromosome.py
@@ -299,12 +299,14 @@ def test_simple_tRNA(self):
#I haven't found a nice source of data for real Arabidopsis
#cytobands, so these three are made up at random!
cytobands = []
- for color in [colors.gray, colors.darkgray, colors.black]:
+ for color in [colors.gray, colors.darkgray, colors.slategray]:
start = (length - 1000000) * random.random()
end = min(length, start + 1000000)
- cytobands.append((start, end, 0, None, color))
- cytobands.append((0, 1000000, 0, "First 1 Mbp", colors.brown))
- cytobands.append((length-1000000, length, 0, "Last 1 Mbp", colors.brown))
+ #Draw these with black borders, and a grey fill
+ cytobands.append((start, end, 0, None, colors.black, color))
+ #Draw these with black borders, and a brown fill:
+ cytobands.append((0, 1000000, 0, "First 1 Mbp", colors.black, colors.brown))
+ cytobands.append((length-1000000, length, 0, "Last 1 Mbp", colors.black, colors.brown))
#Create the drawing object for the chromosome
cur_chromosome = BasicChromosome.Chromosome(name)
#Set the length, adding an extra 20 percent for the tolomeres etc:

0 comments on commit 4aa11be

Please sign in to comment.