This was covered via a historic overview of genetics in Carl Zimmer's 2018 book She Has Her Mother's Laugh towards the end as he puts it all together and explains how scientists figured it out. IIRC some neanderthal and denisova bones still had DNA material.