Data structures are important

I’ve created another D3 example, of QTL analysis for a phenotype measured over time. (Click on the image for the interactive version.)

QTL analysis with phenotype over time

The code is on github. It took me about a day.

The hardest part was figuring out the right data structures. A pixel here is linked to curves over there and over there and over there. You need to set things up so it’s easy to traverse such linkages.

If you hover over a point in the top-left image, you get views of the vertical and horizontal cross-sections. If you click on a point, pointwise confidence bands are added to the “QTL effect” plot. (You have to click, because if I included those confidence bands automatically, the graph became painfully slow to refresh.)

I’m not completely happy with the layout of the graph; it’s not particularly intuitive.

Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s