Thymocyte
Thymocytes are T cell precursors which develop in the thymus. The processes of beta-selection, positive selection and negative selection shape thymocytes into a peripheral pool of T cells that are able to respond to foreign pathogens and are immunologically tolerant towards self antigens.

# Stages of maturation
Thymocytes are classified into a number of distinct maturational stages based on the expression of cell surface markers. The earliest thymocyte stage is the double negative stage (negative for both CD4 and CD8), which more recently has been better described as Lineage-negative, and which can be divided into four substages. The next major stage is the double positive stage (positive for both CD4 and CD8). The final stage in maturation is the single positive stage (positive for either CD4 or CD8).

# Events during maturation

## Thymus Settling
Thymocytes are ultimately derived from bone marrow hematopoietic progenitors cells  which reach the thymus through the circulation. The number of progenitors that enter the thymus each day is thought to be extremely small. Therefore which progenitors colonize the thymus is unknown. Currently Early Lymphoid Progenitors (ELP) are proposed to settle the thymus and are likely the precursors of most thymocytes. ELPs are Lineage-CD44+CD25-CD117+ and thus closely resemble ETPs, the earliest progenitors in the thymus. Precursors enter the thymus at the cortico-medullary junction. Molecules known to be important for thymus entry include CD44, P-selectin (CD62P), and the chemokine receptor CCR9.
Following thymus entry, progenitors proliferate to generate the ETP population. This step is following by the generation of DN2 thymocytes which migrate from the cortico-medullary junction toward the thymus capsule. DN3 thymocytes are generated at the subcapsular zone and undergo beta selection.

## Beta selection
The ability of T cells to recognise foreign antigens is mediated by the T cell receptor, which is a surface protein able to recognise short protein sequences (peptides) that are presented on MHC. During the double negative stage the major maturation step of thymocytes is to express a T cell receptor.
Unlike most genes, which have a stable sequence in each cell which expresses them, the T cell receptor is made up of a series of alternative gene fragments. In order to create a functional T cell receptor, the double negative thymocytes use a series of DNA-interacting enzymes to clip the DNA and bring separate gene fragments together. The outcome of this process is that each T cell receptor has a different sequence, due to different choice of gene fragments and the errors introduced during the cutting and joining process. The evolutionary advantage in having a large number of unique T cell receptors is that each T cell is capable of recognising a different peptide, providing a defence against rapidly evolving pathogens..
The cellular disadvantage in the rearrangement process is that many of the combinations of the T cell receptor gene fragments are non-functional. To eliminate thymocytes which have made a non-functional T cell receptor, the beta-selection point is required before T cells can advance from the double negative to the double positive stage. The beta-selection point requires that the first T cell receptor gene to be arranged (T cell receptor beta) is capable to binding a pre-T cell receptor alpha protein and assembling on the surface with the signalling proteins. Thymocytes which fail this "beta selection" die by apoptosis.

## Positive selection and lineage commitment
Thymocytes which pass "beta selection" express a T cell receptor which is capable of assembling on the surface. However many of these T cell receptors will still be non-functional, due to an inability to bind MHC. The next major stage of thymocyte development is positive selection, to keep only those thymocytes which have a T cell receptor capable of binding MHC. The T cell receptor requires CD8 as a coreceptor to bind to MHC class I, and CD4 as a coreceptor to bind MHC class II. At this stage thymocytes upregulate both CD4 and CD8, becoming double positive cells.
Double positive thymocytes that have a T cell receptor capable of binding MHC class I or class II with even a weak affinity receive signalling through the T cell receptor.. Thymocytes that have a T cell receptor incapable of binding MHC class I or class II undergo apoptosis. Some thymocytes are able to rescue failed positive selection by receptor editing (rearrangement of the other T cell receptor allele to produce a new T cell receptor).
The double positive thymocytes undergo lineage commitment, maturing into a CD8+ T cell (recognising MHC class I) or a CD4+ T cell (recognising MHC class II). Lineage commitment occurs at the late stage of positive selection and works by downregulation of both CD4 and CD8 (reducing the signal from the T cell receptor) and then upregulation of CD4 only. Thymocytes that start receiving signal again are those that recognise MHC class II, and they become CD4+ T cells. Thymocytes that do not start receiving signal again are those that recognise MHC class I, and they downregulation CD4 and upregulate CD8, to become CD8+ T cells. Both of these thymocytes types are known as single positive thymocytes.

## Negative selection
Success in positive selection allows the thymocyte to undergo a number of maturational changes during the transition to a single positive T cell. The single positive T cells upregulate the chemokine receptor CCR7, causing migration from the cortex to the medulla. At this stage the key maturation process involves negative selection, the elimination of autoreactive thymocytes.
The key disadvantage in a gene rearrangement process for T cell receptors is that by random chance, some arrangements of gene fragments will create a T cell receptor capable of binding self-peptides presented on MHC class I or MHC class II. If T cells bearing these T cell receptors were to enter the periphery, they would be capable of activating an immune response against self, resulting in autoimmunity. Negative selection is the process evolved to reduce this risk. During negative selection, all thymocytes with a high affinity for binding self peptides presented on MHC class I or class II are induced to upregulate Bim, a protein which drives apoptosis. Cells which do not have a high affinity for self ('safe' cells) survive negative selection.
Negative selection can occur at the double positive stage in the cortex. However the repertoire of peptides in the cortex is limited to those expressed by epithelial cells, and double positive cells are poor at undergoing negative selection. Therefore the most important site for negative selection is the medulla, once cells are at the single positive stage. In order to remove thymocytes reactive to peripheral organs, the gene AIRE drives the expression of multiple peripheral antigens, such as insulin, creating an "immunological self-shadow". This allows single positive thymocytes to be exposed to a more complex set of self-antigens than is present in the cortex, and therefore more efficiently deletes those T cells which are autoreactive.
Single positive thymocytes remain in the medulla for 1-2 weeks, surveying self-antigens to test for autoreactivity. During this time they undergo final maturational changes, and then exit the thymus using S1P and CCR7. Upon entry to the peripheral bloodstream, the cells are considered mature T cells, and not thymocytes.

# Cancer
Thymocytes that gain oncogenic mutations allowing uncontrolled proliferation can become thymic lymphomas.

# Alternative lineages
As well as classical T cells, a number of alternative cell lineages develop in the thymus, including gamma-delta T cells, Natural Killer T cells and lymphoid dendritic cells.