compute panGenome method