 Trait inheritance and molecular inheritance mechanisms of genes are still primary principles of genetics in the 21st century , but modern genetics has expanded beyond inheritance to studying the function and behavior of genes . Gene structure and function , variation , and distribution are studied within the context of the cell , the organism ( e.g. dominance ) and within the context of a population . Genetics has given rise to a number of sub @-@ fields including epigenetics and population genetics . Organisms studied within the broad field span the domain of life , including bacteria , plants , animals , and humans . 
