<jupyter_start><jupyter_text>Designing purR sequences (c) 2020 <NAME> and <NAME>. This work is licensed under a [Creative Commons Attribution License CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/). All code contained herein is licensed under an [MIT license](https://opensource.org/licenses/MIT).<jupyter_code>import wgregseq
%load_ext autoreload
%autoreload 2

import pandas as pd<jupyter_output>Bad key savefig.frameon in file /Users/sbeeler/anaconda3/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle, line 421 ('savefig.frameon : True')
You probably need to get an updated matplotlibrc file from
https://github.com/matplotlib/matplotlib/blob/v3.3.2/matplotlibrc.template
or from the matplotlib source distribution

Bad key verbose.level in file /Users/sbeeler/anaconda3/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle, line 472 ('verbose.level  : silent      # one of silent, helpful, debug, debug-annoying')
You probably need to get an updated matplotlibrc file from
https://github.com/matplotlib/matplotlib/blob/v3.3.2/matplotlibrc.template
or from the matplotlib source distribution

Bad key verbose.fileo in file /Users/sbeeler/anaconda3/lib/python3.7/site-packages/matplotlib/mpl-data/stylelib/_classic_test.mplstyle, line 473 ('verbose.fileo  : sys.stdout  # a log filename, sys.stdout or sys.stderr')
You probably need to g[...]<jupyter_text>Define the sequences we want to work with:- `lacUV5_purR_overlap`: TCGAG**TTTACA**CACGCAAACGTTTTCGTG**TATAAT**GTGTGG - `lacUV5_purR_downstream`: TCGAG**TTTACA**CTTTATGCTTCCGGCTCG**TATAAT**GTGTGGACGCAAACGTTTTCGTWith the -10 and -35 sites in bold for reference, and the purR binding site underlined.<jupyter_code>lacUV5_purR_overlap = "TCGAGTTTACACACGCAAACGTTTTCGTGTATAATGTGTGG"
lacUV5_purR_downstream = "TCGAGTTTACACTTTATGCTTCCGGCTCGTATAATGTGTGGACGCAAACGTTTTCGT"<jupyter_output><empty_output><jupyter_text>Let's make sure to figure out which region of each sequence we want to mutate (i.e. just the purR binding site):<jupyter_code>lacUV5_purR_overlap[12:28]
lacUV5_purR_downstream[-16:]<jupyter_output><empty_output><jupyter_text>Constructs  LacUV5 with operator downstream<jupyter_code>mutants_single = wgregseq.mutations_det(lacUV5_purR_downstream, mut_per_seq=1, site_start=-16, keep_wildtype=True)
downstream_df_single = pd.DataFrame({"seq":mutants_single})
downstream_df_single["description"] = "lacUV5 purR downstream single mutant"
downstream_df_single.tail()
mutants_double = wgregseq.mutations_det(lacUV5_purR_downstream, mut_per_seq=2, site_start=-16)
downstream_df_double = pd.DataFrame({"seq":mutants_double})
downstream_df_double["description"] = "lacUV5 purR downstream double mutant"
downstream_df_double.tail()<jupyter_output><empty_output><jupyter_text>LacUV5 with operator overlapping<jupyter_code>mutants_single = wgregseq.mutations_det(lacUV5_purR_overlap, mut_per_seq=1, site_start=12, site_end=28, keep_wildtype=True)
overlap_df_single = pd.DataFrame({"seq":mutants_single})
overlap_df_single["description"] = "lacUV5 purR overlap single mutant"
overlap_df_single.tail()
mutants_double = wgregseq.mutations_det(lacUV5_purR_overlap, mut_per_seq=2, site_start=12, site_end=28)
overlap_df_double = pd.DataFrame({"seq":mutants_double})
overlap_df_double["description"] = "lacUV5 purR overlap double mutant"
overlap_df_double.tail()<jupyter_output><empty_output><jupyter_text>Combine them all<jupyter_code>purR_df = pd.concat([downstream_df_single, downstream_df_double, overlap_df_single, overlap_df_double], ignore_index=True)
purR_df.tail()
purR_df.to_csv("purR_twist_order.csv")<jupyter_output><empty_output>