parklab / bamsnap

MIT License
109 stars 23 forks source link

reference sequence with lowercase characters #18

Open tkonopka opened 3 years ago

tkonopka commented 3 years ago

Thanks for this useful tool. Straightforward to use.

Some fasta files contain lowercase characters (e.g. 'a' instead of 'A') and these characters cause the rendering to stop. The errors are due to lookups of color hex codes for the lowercase characters.

    dr.line([(x, y11), (x, y21)], fill=COLOR[base], width=self.xscale.base_width)
KeyError: 'a'

I looked into the code and can submit a pull request with a fix.