I Chronicles 1:4
נֹחַ שֵׁם חָם וָיָפֶת
Noah, Shem, Ham and Japheth
The purpose of this genealogy is to trace the lineage from Adam to David. Therefore you might think that we should immediately follow the line from Shem to Avraham. Instead, we are first given genealogies for the families of Yefes (verses 5-7) and Cham (verses 8-15). It is the style of the book of Chronicles, Rashi tells us, to record the lineage of the other sons before following the main line of interest. It does likewise for the descendants of Yishmael before those of Yitzchak and for the descendants of Esau before those of Yaakov.