Specific histone modifications play critical roles in the control of encystation and antigenic variation in the early-branching eukaryote Giardia lamblia.