function to calculate genome-control