Competition between calnexin and BiP in the endoplasmic reticulum can lead to the folding or degradation of human thyroperoxidase.