Heterochromatin drives organization of conventional and inverted nuclei [preprint]