Population based selection shapes the T cell receptor repertoire during thymic development