A laboratory test that uses antibodies to detect specific chemical antigens in cells or tissue samples viewed under a microscope. This procedure can be used to help detect and classify cancer cells. It is also one of the methods used for estrogen receptor assays and progesterone receptor assays.