def MWColorMapping(maptype='<STR_LIT>', reverse=True):
d = {'<STR_LIT:A>':<NUM_LIT>,'<STR_LIT:R>':<NUM_LIT>,'<STR_LIT:N>':<NUM_LIT>,'<STR_LIT:D>':<NUM_LIT>,'<STR_LIT:C>':<NUM_LIT>,'<STR_LIT>':<NUM_LIT>,'<STR_LIT:E>':<NUM_LIT>,'<STR_LIT>':<NUM_LIT>,'<STR_LIT:H>':<NUM_LIT>,'<STR_LIT:I>':<NUM_LIT>,'<STR_LIT:L>':<NUM_LIT>,'<STR_LIT>':<NUM_LIT>,'<STR_LIT:M>':<NUM_LIT>,'<STR_LIT:F>':<NUM_LIT>,'<STR_LIT:P>':<NUM_LIT>,'<STR_LIT:S>':<NUM_LIT>,'<STR_LIT:T>':<NUM_LIT>,'<STR_LIT>':<NUM_LIT>,'<STR_LIT:Y>':<NUM_LIT>,'<STR_LIT>':<NUM_LIT>}<EOL>aas = sorted(AA_TO_INDEX.keys())<EOL>mws  = [d[aa] for aa in aas]<EOL>if reverse:<EOL><INDENT>mws = [-<NUM_LIT:1> * x for x in mws]<EOL><DEDENT>mapper = pylab.cm.ScalarMappable(cmap=maptype)<EOL>mapper.set_clim(min(mws), max(mws))<EOL>mapping_d = {'<STR_LIT:*>':'<STR_LIT>'}<EOL>for (aa, h) in zip(aas, mws):<EOL><INDENT>tup = mapper.to_rgba(h, bytes=True)<EOL>(red, green, blue, alpha) = tup<EOL>mapping_d[aa] = '<STR_LIT>' % (red, green, blue)<EOL>assert len(mapping_d[aa]) == <NUM_LIT:7><EOL><DEDENT>cmap = mapper.get_cmap()<EOL>return (cmap, mapping_d, mapper)<EOL>
Maps amino-acid molecular weights to colors. Otherwise, this
    function is identical to *KyteDoolittleColorMapping*