The basic unit of heredity which encodes some functional RNA or protein.

A gene is a nucleotide sequence, usually present as DNA, defined by certain typical features and by transcription from DNA to RNA.

"Gene" is sometimes used colloquially in fields such as population genetics to describe alleles, e.g. "gene frequencies".