"
+ ]
+ },
+ "execution_count": null,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "from IPython.display import Image\n",
+ "Image(url=\"https://oup.silverchair-cdn.com/oup/backfile/Content_public/Journal/femsyr/24/10.1093_femsyr_foae026/1/m_foae026fig3.jpeg?Expires=1730974846&Signature=iBKvkhkUn1823IljQ~1uFEnKO0VqWrwiXADvCwQLz6Yv8yDEAFkgt~tsLrXKFTmGYIq3ZINcj5a5yNgs4cP4NeCvRcQh7Ad~1ZejIwNrjqw51CJhGcZWPzz~NDr93QVLZZd2Re41cJNFKFmEu756KxrHQxwKTQe2QPMPfiKBvhvo8J28PERj3vNjZ3LQRsFp9qUPpdsZEyWIiNY92jsuy448YyuaGCgaC2ExGDLeuArTEJmq8gtb0QnTPV0dEdtoxIfZpgavdvO~QyqikjCLj6hebUYU1lH7StuS8oqCQE82CXO0IUcjYF6m2Lb0evXhqdLDQe90M-NrKjzNRmBA0A__&Key-Pair-Id=APKAIE5G5CRDK6RD3PGA\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Figure 1. oligo assisted repair in K. phaffi. "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "\n",
+ "- Basically we can make two cuts in the genome, and repair it with an oligo (Figure 1A, 1B).\n",
+ "\n",
+ "\n",
+ "- We can start by loading in our target. Here we have integrated LAC12 in our K. phaffi strain but want to knock it out. \n",
+ "\n",
+ "\n",
+ "- Let's see how this can be implemented in pydna\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "\n",
+ " \n",
+ ""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#Install pydna for colab.\n",
+ "%%capture\n",
+ "!pip install git+https://github.com/BjornFJohansson/pydna.git@dev_bjorn"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Import the gene we are going to work with"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Dseqrecord\n",
+ "circular: False\n",
+ "size: 7127\n",
+ "ID: X06997.1\n",
+ "Name: X06997\n",
+ "Description: Kluyveromyces lactis LAC12 gene for lactose permease\n",
+ "Number of features: 8\n",
+ "/molecule_type=DNA\n",
+ "/topology=linear\n",
+ "/data_file_division=PLN\n",
+ "/date=25-JUL-2016\n",
+ "/accessions=['X06997']\n",
+ "/sequence_version=1\n",
+ "/keywords=['lactose permease', 'unidentified reading frame']\n",
+ "/source=Kluyveromyces lactis\n",
+ "/organism=Kluyveromyces lactis\n",
+ "/taxonomy=['Eukaryota', 'Fungi', 'Dikarya', 'Ascomycota', 'Saccharomycotina', 'Saccharomycetes', 'Saccharomycetales', 'Saccharomycetaceae', 'Kluyveromyces']\n",
+ "/references=[Reference(title='Primary structure of the lactose permease gene from the yeast Kluyveromyces lactis. Presence of an unusual transcript structure', ...), Reference(title='Direct Submission', ...)]\n",
+ "/comment=the sequence submitted starts from the 5'end of LAC4 gene but goes\n",
+ "to the opposite direction; therefore, base number 1 is -1199 of\n",
+ "LAC4 gene; for LAC4 gene seq. see\n",
+ "Mol. Cell. Biol. (1987)7,4369-4376.\n",
+ "Dseq(-7127)\n",
+ "GCGA..TTCG\n",
+ "CGCT..AAGC\n"
+ ]
+ }
+ ],
+ "source": [
+ "from pydna.dseqrecord import Dseqrecord\n",
+ "from pydna.crispr import cas9, protospacer\n",
+ "from pydna.genbank import Genbank\n",
+ "\n",
+ "# initalize your favourite gene\n",
+ "gb = Genbank(\"myself@email.com\") # Tell Genbank who you are!\n",
+ "gene = gb.nucleotide(\"X06997\") # Kluyveromyces lactis LAC12 gene for lactose permease that have been integrated into K. phaffi\n",
+ "target_dseq = Dseqrecord(gene)\n",
+ "print(target_dseq)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Next we have chosen some guides and can add them to our cas9 enzymes and simulate the cuts."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "cutting with guide 1: (Dseqrecord(-135), Dseqrecord(-6992))\n",
+ "cutting with guide 2: (Dseqrecord(-6793), Dseqrecord(-334))\n"
+ ]
+ }
+ ],
+ "source": [
+ "\n",
+ "# Choose guides\n",
+ "guides = [\"CCCTAAGTCCTTTGAAGATT\", \"TATTATTTTGAGGTGCTTTA\"]\n",
+ "\n",
+ "# Create an enzyme object with the protospacer\n",
+ "enzyme = cas9(guides[0])\n",
+ "\n",
+ "# Simulate the cut with enzyme1\n",
+ "print('cutting with guide 1:', target_dseq.cut(enzyme))\n",
+ "\n",
+ "# Create an enzyme from the protospacer\n",
+ "enzyme2 = cas9(guides[1])\n",
+ "\n",
+ "# Simulate the cut with enzyme2\n",
+ "print('cutting with guide 2:', target_dseq.cut(enzyme2))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "With these guides I would be able to generate a stable KO with a repair 60/90mer oligo."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "My repair oligo for this experiment : AGGTGAACACACTCTGATGTAGTGCAGTCCCTAAGTCCTTTGAAGTTACGGACTCCTCGACCGATGCCCTTGAGAGCCTTCAACCCAGTC \n",
+ "My repair oligo for this experiment length : 90 \n"
+ ]
+ }
+ ],
+ "source": [
+ "repair_oligo = target_dseq.cut(enzyme)[0][-45:]+target_dseq.cut(enzyme2)[-1][:45]\n",
+ "repair_oligo.name = 'My repair oligo for this experiment'\n",
+ "print(f'{repair_oligo.name} : {repair_oligo.seq} ')\n",
+ "print(f'{repair_oligo.name} length : {len(repair_oligo.seq)} ')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The final edit gene would look like this in a case of homologous recombination. \n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "name|45\n",
+ " \\/\n",
+ " /\\\n",
+ " 45|My repair oligo for this experiment|45\n",
+ " \\/\n",
+ " /\\\n",
+ " 45|name
"
+ ],
+ "text/plain": [
+ "Contig(-469)"
+ ]
+ },
+ "execution_count": null,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "from pydna.assembly import Assembly\n",
+ "\n",
+ "my_KO = Assembly((target_dseq.cut(enzyme)[0],repair_oligo, target_dseq.cut(enzyme2)[-1]), limit = 20 )\n",
+ "my_assembly_KO, *rest = my_KO.assemble_linear()\n",
+ "my_assembly_KO"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": ".venv",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.11.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}