Analysis of traits and genes