A gene is a locus (or region) of DNA that encodes a functional RNA or protein product, and is the molecular unit of heredity. What is the basis of inheritance of phenotypic traits?