  Some prokaryotes possess CRISPR-Cas systems that provide adaptive immunity to
viruses guided by DNA segments called spacers acquired from invading phage.
However, the patchy incidence and limited memory breadth of CRISPR-Cas systems
suggest that their fitness benefits are offset by costs. Here, we propose that
cross-reactive CRISPR targeting can lead to heterologous autoimmunity, whereby
foreign spacers guide self-targeting in a spacer-length dependent fashion.
Balancing antiviral defense against autoimmunity predicts a scaling relation
between spacer length and CRISPR repertoire size. We find evidence for this
scaling through comparative analysis of sequenced prokaryotic genomes, and show
that this association also holds at the level of CRISPR types. In contrast, the
scaling is absent in strains with nonfunctional CRISPR loci. Finally, we
demonstrate that stochastic spacer loss can explain variations around the
scaling relation, even between strains of the same species. Our results suggest
that heterologous autoimmunity is a selective factor shaping the evolution of
CRISPR-Cas systems.
