Chromatin immunoprecipitations were performed as described previously with minor changes (Zwart et al., 2013). Samples were crosslinked in solution A with 2mM DSG (CovaChem) for 25 minutes at room temperature. After 25 minutes, 1% formaldehyde was added for 20 minutes and subsequently quenched with glycine. Samples were lysed as described (Schmidt et al., 2009) and sonicated for at least 10 cycles of 30s on, 30s off using a Diagenode Bioruptor Pico. For each ChIP, 5ug of antibody was conjugated with 50ul Protein A magnetic beads. Antibodies used were AR (sc-816, Santa Cruz), H3K27ac (39133, Active Motif), H3K4me3 (Ab8580, Abcam) and H3K27me3 (39155, Active Motif). Immunoprecipitated DNA was processed for library preparation (Part# 0801-0303, KAPA biosystems kit). Immunoprecipitated DNA was processed for library preparation (Part# 0801-0303, KAPA biosystems kit).