@BIOQ
In bacteria CRISPR acts as a defence system by recognising foreign viral DNA sequences and incorporating it into the bacteria’s CRISPR sequence/genome as a “spacer” upstream of the PAM. This occurs as cas9 is able to cut the viral DNA at a specific sequence of nucleotides (restriction site) complementary to the nucletides of the short guide RNA
This allows the bacteria to have a memory of past viral infections such that in future if the same virus invades, a faster, stronger, greater response is triggered as the cas9 rapidly cuts the viral DNA inducing a mutation in it and preventing it from replicating, hence preventing viral infection/spread in the bacterium. The PAM a sequence of nucletides downstream of the gene of interest in the virus which helps cas9 differentiate between the virus as a “non self” molecule and the bacterias own CRISPR genome as being “self”