From 5116a2178d8568a15ed98f11ec13e9c3d8fd35da Mon Sep 17 00:00:00 2001 From: Mu-En Chung Date: Thu, 28 Nov 2024 14:25:01 +0100 Subject: [PATCH] update demo notebook --- demo/demo_in.txt | 23 ++++++++++++++++++++ demo/seqTeleporter_demo.ipynb | 40 +++++++++++++++++------------------ 2 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 demo/demo_in.txt diff --git a/demo/demo_in.txt b/demo/demo_in.txt new file mode 100644 index 00000000..3090fa1d --- /dev/null +++ b/demo/demo_in.txt @@ -0,0 +1,23 @@ +GENE_NAME=TPP123 +SEQUENCE=MVSVIKEEMKIKLRMEGTVNGHNFVIEGEGKGNPYEGTQTMDLKVTEGGPLPFAYDILSPQFMYGSKAFIKYPADIPDYFKQSFPEGFHWERVMTYEDGGVCTATQNTSLRGDCFFYDVRFDGVNFPPNGPVMQKKTLGWEPSTEKMYVRDGVLKGDVIKALLLEGGGHYRCDFKTTYKAKKDVRLPGYHFVDHRIEILKHDKDYNKVKQYENAVARYSMLPSQAK +FIX_DNA_SEQUENCE=ATGGTTAGCGTGATCAAAGAAGAGATGAAAATCAAACTGCGTATGGAAGGCACCGTGAATGGTCATAATTTTGTGATTGAAGGTGAAGGCAAAGGCAATCCGTATGAAGGTACACAGACCATGGATCTGAAAGTTACCGAAGGTGGTCCGCTGCCGTTTGCATATGATATTCTGAGTCCGCAGTTTATGTATGGCAGCAAAGCCTTTATCAAATATCCGGCAGATATCCCGGATTACTTTAAACAGAGCTTTCCGGAAGGTTTTCATTGGGAACGTGTTATGACCTATGAAGATGGTGGTGTTTGTACCGCAACACAGAATACCAGCCTGCGTGGTGATTGTTTCTTTTATGATGTTCGTTTTGATGGCGTGAACTTTCCGCCTAATGGTCCGGTTATGCAGAAAAAGACCTTAGGTTGGGAACCGAGCACCGAGAAAATGTATGTTCGTGATGGTGTTCTGAAAGGCGACGTTATTAAAGCACTGCTGCTGGAAGGTGGTGGTCATTATCGTTGTGATTTCAAAACCACCTACAAAGCCAAAAAGGATGTTCGTCTGCCTGGTTATCATTTTGTGGATCATCGTATCGAAATCCTGAAACACGATAAGGACTACAACAAAGTGAAACAGTATGAAAATGCCGTTGCGCGTTATAGCATGCTGCCGAGCCAGGCCAAA +CUT_NUMBER_RANGE=(3,4) +MIN_AA_LENGTH=6 +MAX_COST=50000 +MAX_LENGTH_UNEVENNESS=5 +MIN_LIGATION_FIDELITY=0.99 +SATISFACTION_LIGATION_FIDELITY=0.99 +FIDELITY_DATA=FileS01_T4_01h_25C.xlsx +HOST=p_pastoris +FUSION_SITES_USED_BY_BACKBONE=('CTTG', 'TAGC', 'CCAT', 'CGCT', 'TAAT') +DNA_5_PRIME=AATTTGAAGACAA +DNA_3_PRIME=TAATAAATTTGTCTTCTTTAA +ALLOWED_CUT_POSITIONS=(70,75),(105,110),(145,150),(160,162),(180,185) +COST_PER_BP=0.1 +MIN_DNA_LENGTH=100 +MAX_DNA_LENGTH=10000 +MODULE_PLATE_FORMAT=96 +ENZYME=BpiI +BACKBONE_SIZE=3000 +MUTATIONS=[{'position': 63, 'aa': ['L', 'H']}, {'position': 80, 'aa': ['W', 'L']}, {'position': 143, 'aa': ['F', 'I']}, {'position': 158, 'aa': ['A', 'I', 'N']}, {'position': 174, 'aa': ['A', 'I']}, {'position': 194, 'aa': ['F', 'Y']}] +LINKED_MUTATIONS=[(('M', 63, 'H'), ('F', 80, 'L')), (('M', 63, 'L'), ('F', 80, 'W'))] diff --git a/demo/seqTeleporter_demo.ipynb b/demo/seqTeleporter_demo.ipynb index 06e70f38..bcdcfe32 100644 --- a/demo/seqTeleporter_demo.ipynb +++ b/demo/seqTeleporter_demo.ipynb @@ -72,9 +72,9 @@ "SCRIPT_DIR = os.path.dirname(os.path.abspath('__file__'))\n", "sys.path.append(os.path.dirname(SCRIPT_DIR))\n", "\n", - "from proseqteleporter.utils.utils import print_available_resources\n", - "from proseqteleporter.main_libs import (generate_and_optimize_ready_to_click_modules,\n", - " assemble_modules_and_generate_robot_instruction)\n", + "from seqteleporter.utils.utils import print_available_resources\n", + "from seqteleporter.main_libs import (generate_and_optimize_ready_to_click_modules,\n", + " assemble_modules_and_generate_robot_instruction)\n", "\n", "print(f'Here is: {SCRIPT_DIR}')" ] @@ -185,7 +185,7 @@ "\u001B[1mFIX_DNA_SEQUENCE=\u001B[0mATGGTTAGCGTGATCAAAGAAGAGATGAAAATCAAACTGCGTATGGAAGGCACCGTGAATGGTCATAATTTTGTGATTGAAGGTGAAGGCAAAGGCAATCCGTATGAAGGTACACAGACCATGGATCTGAAAGTTACCGAAGGTGGTCCGCTGCCGTTTGCATATGATATTCTGAGTCCGCAGTTTATGTATGGCAGCAAAGCCTTTATCAAATATCCGGCAGATATCCCGGATTACTTTAAACAGAGCTTTCCGGAAGGTTTTCATTGGGAACGTGTTATGACCTATGAAGATGGTGGTGTTTGTACCGCAACACAGAATACCAGCCTGCGTGGTGATTGTTTCTTTTATGATGTTCGTTTTGATGGCGTGAACTTTCCGCCTAATGGTCCGGTTATGCAGAAAAAGACCTTAGGTTGGGAACCGAGCACCGAGAAAATGTATGTTCGTGATGGTGTTCTGAAAGGCGACGTTATTAAAGCACTGCTGCTGGAAGGTGGTGGTCATTATCGTTGTGATTTCAAAACCACCTACAAAGCCAAAAAGGATGTTCGTCTGCCTGGTTATCATTTTGTGGATCATCGTATCGAAATCCTGAAACACGATAAGGACTACAACAAAGTGAAACAGTATGAAAATGCCGTTGCGCGTTATAGCATGCTGCCGAGCCAGGCCAAA\n", "\u001B[1mFUSION_SITES_USED_BY_BACKBONE=\u001B[0m('CTTG', 'TAGC', 'CCAT', 'CGCT', 'TAAT')\n", "\u001B[1mHOST=\u001B[0mp_pastoris\n", - "\u001B[1mFIDELITY_DATA_PATH=\u001B[0mC:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\proseqteleporter\\data\\neb_fidelity_data\\FileS01_T4_01h_25C.xlsx\n", + "\u001B[1mFIDELITY_DATA_PATH=\u001B[0mC:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\seqteleporter\\data\\neb_fidelity_data\\FileS01_T4_01h_25C.xlsx\n", "\u001B[1mMUTATIONS=\u001B[0m[{'position': 63, 'aa': ['L', 'H']}, {'position': 80, 'aa': ['W', 'L']}, {'position': 143, 'aa': ['F', 'I']}, {'position': 158, 'aa': ['A', 'I', 'N']}, {'position': 174, 'aa': ['A', 'I']}, {'position': 194, 'aa': ['F', 'Y']}]\n", "\u001B[1mLINKED_MUTATIONS=\u001B[0m[(('M', 63, 'H'), ('F', 80, 'L')), (('M', 63, 'L'), ('F', 80, 'W'))]\n", "\u001B[1mCUT_NUMBER_RANGE=\u001B[0m(3, 4)\n", @@ -207,7 +207,7 @@ "--------------------------------------------------------------------------------------------------\n", "\u001B[1m Results For 4 Fragments: \u001B[0m\n", " Number of cuts: 3 \n", - " Elapsed time: 4.33 \n", + " Elapsed time: 2.38 \n", " Number of partitions checked: 216\n", " Number of unique partitions checked: 216\n", " Number of unique partitions violating hard constraints: 0\n", @@ -259,15 +259,15 @@ " G[KKDVRLPGYHFVDHRIEILKHDKDYNKVKQYENAVARYSMLPSQAK]\n", "--------------------------------------------------------------------------------------------------\n", "\u001B[1m Result \"best_partitions_by_cut_number\" is exported at:\n", - " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-10-10output\\logs\\best_partitions_by_cut_number_dist_mut_1.json\u001B[0m\n", + " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-11-28output\\logs\\best_partitions_by_cut_number_dist_mut_1.json\u001B[0m\n", "--------------------------------------------------------------------------------------------------\n", "\u001B[1m Result \"params\" is exported at:\n", - " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-10-10output\\logs\\params_dist_mut_1.json\u001B[0m\n", + " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-11-28output\\logs\\params_dist_mut_1.json\u001B[0m\n", "\n", "\u001B[1m\n", "===========================================================================================\n", " SUCCESSFULLY IDENTIFIED OPTIMAL PARTITIONS! \n", - " Total elapsed time: 4.35 seconds\n", + " Total elapsed time: 2.39 seconds\n", "===========================================================================================\u001B[0m\n", "\u001B[1m===========================================================================================\u001B[0m\n", " \u001B[1m GENERATING MODULES \u001B[0m \n", @@ -291,30 +291,30 @@ " Validating dna fragment constraints (enzyme sites)...\n", " Passed validation of mutant dna fragments constraints!\n", "Validating mutant dna fragments by in-silico assembly...\n", - "Random combi in-silico assembly: M63L_F80W_S143I_V158A_F174I_H194Y, \n", + "Random combi in-silico assembly: M63H_F80L_S143I_V158N_F174I_H194F, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: F174I_H194F, \n", + "Random combi in-silico assembly: S143F_V158I_F174I, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: M63L_F80W_S143I_V158A_H194F, \n", + "Random combi in-silico assembly: M63L_F80W_V158I_H194Y, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: M63L_F80W_V158A_F174I_H194Y, \n", + "Random combi in-silico assembly: M63L_F80W_S143I_V158A_F174I_H194F, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: M63H_F80L_S143I_V158A_F174A, \n", + "Random combi in-silico assembly: M63L_F80W_V158N_F174I_H194Y, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: S143I_V158I_F174A_H194Y, \n", + "Random combi in-silico assembly: wild_type, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: M63H_F80L_S143I_V158I_F174A_H194F, \n", + "Random combi in-silico assembly: V158A_F174A_H194F, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: S143F_V158A_F174I_H194F, \n", + "Random combi in-silico assembly: M63L_F80W_S143F_F174A, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: M63L_F80W_S143F_V158A_F174I_H194Y, \n", + "Random combi in-silico assembly: M63H_F80L_S143I_V158A_H194F, \n", " Validation Passed: True\n", - "Random combi in-silico assembly: M63L_F80W_S143I_F174I, \n", + "Random combi in-silico assembly: V158A_F174A_H194F, \n", " Validation Passed: True\n", "Exporting DNA module ordering sheet\n", "--------------------------------------------------------------------------------------------------\n", "\u001B[1m DNA module ordering sheet is exported at:\n", - " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-10-10output\\results\\order_modules_4fragments.xlsx\u001B[0m\n", + " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-11-28output\\results\\order_modules_4fragments.xlsx\u001B[0m\n", "\n", "\u001B[1m\n", "================================================================================================\n", @@ -370,7 +370,7 @@ "The README sheet is validated!\n", "\n", "Plate mapping sheet is exported to:\n", - " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-10-10output\\results\\2024-10-10_source_destination_plate_map.xlsx\n", + " C:\\Users\\GOFKV\\PycharmProjects\\seqTeleporter\\demo\\input_2024-11-28output\\results\\2024-11-28_source_destination_plate_map.xlsx\n", "\n", "Preview of mapping sheet: \n", " Source Plate Target Plate Source Well Target Well Volume_ul \\\n",