Gene mutations are changes in the base sequence of DNA; main types are substitution, insertion, deletion, and duplication. Base substitutions can create SNPs and change codons; degeneracy can make substitutions silent, missense, or nonsense. Insertions or deletions not in multiples of three cause frameshifts that alter downstream codons and often disrupt protein function. Mutations can arise from replication errors, repair errors, or chromosome damage; mutagens include chemicals, ionizing radiation, and ultraviolet radiation. Mutations occur randomly with respect to organism need or advantage; mutation rate varies with DNA sequence, gene expression, repair, and mutagen exposure. Germ-line mutations can be inherited by offspring; somatic mutations affect only descendant body cells and can contribute to cancer. Mutation is the original source of new alleles and genetic variation; many are neutral or harmful, but variation supplies material for natural selection.