CRISPR-based system for detecting DNA transfer and recording biological signals