builds the index for the chromosome.