Automata Code for CRISPR
To run the experiment, run the ./run_experiment.sh shell ./run_experiment.sh
The levenshtein directory contains the levenshtein automata generated by AutomataZoo/Levenshtein/code/lev We generated each levenshtein automaton from the gRNA sequence without PAM, and then added the final three PAM states (NGG).
-
Strip PAM from the source sequence sgRNA -> sgRNA_without_PAM
-
Generate a Levenshtein automaton from the sequence without PAM lev -d 4 -f sgRNA_without_Pam -> lev_1_4_sgRNA_without_PAM.anml
-
Add PAM states to the end of the Levenshtein, by making all reporting states point to the first base in the PAM (N), and making the last G report lev_1_4_sgRNA_without_PAM.anml -> lev_1_4_sgRNA_with_PAM.anml
-
Translate ANML automata into MNRL automata to work with hscompile vasim -m lev_1_4_sgRNA_with_PAM.anml -> lev_1_4_sgRNA_with_PAM.mnrl
-
Compile the resulting Levenshtein + PAM automaton into a Hyperscan database with hscompile hscompile lev_1_4_sgRNA_with_PAM.mnrl lev_1_4_sgRNA_with_PAM.hs
-
Run the database against the forward-strand genome hsrun lev_1_4_sgRNA_with_PAM.hs