The study of the molecular basis of genetic inheritance and how genetic variation contributes to traits and disease.