Search This Blog

Tuesday, August 3, 2010

Random colors for covariation color scheme

For the covariation color scheme, I want to generate random colors so I don't have to worry about storing an index of colors for an unknown number of helices. I found a nice algorithm at stackoverflow.com. I set up everything for the covariation color scheme and tried out the random color selection for each nucleotide.

Examples are below. I like the first example that uses pastels, but I worry that the colors are not distinct enough from each other. The problem with the second example is that the dark colors make it impossible to read the nucleotide; I could figure out how to make the text white in those cases.



2 comments:

  1. Hi Lauren,
    What metric are you proposing to use for colouring covariation? What ever it is, won't you want to use a colour palette that indicates degree of covariation. Eg. a heat-map or the rainbow spectrum (ROYGBIV). This seems more obvious to me than using random colours. Or have I missed something?
    See for example the 'cov' tab here:
    http://rfam.sanger.ac.uk/family?entry=RF00086#tabview=tab3

    ReplyDelete
  2. Hi Paul,

    You bring up a good point, especially since I asked you about this earlier! Right now I'm just trying to achieve coloring of helices, something like one of RALEE's main coloring modes. See the screenshot on the RALEE page: http://personalpages.manchester.ac.uk/staff/sam.griffiths-jones/software/ralee/

    Perhaps I should call this color scheme a different name? Maybe the "helix" color scheme? I do intend to have something that shows degree of covariation, but I'm not set on how to implement it. One way is to have another scheme that has coloring like a heat map, such as what you described in Rfam. Another is to have a display below the alignment, similar to the conservation display, except for degree of covariation instead.

    Do my descriptions make sense?

    ReplyDelete