uht-tooling 0.1.7__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/PKG-INFO +96 -8
  2. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/README.md +94 -6
  3. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/pyproject.toml +2 -2
  4. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/cli.py +40 -0
  5. uht_tooling-0.1.9/src/uht_tooling/workflows/design_kld.py +687 -0
  6. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/design_slim.py +75 -1
  7. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/gui.py +101 -27
  8. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/mut_rate.py +9 -9
  9. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling.egg-info/PKG-INFO +96 -8
  10. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling.egg-info/SOURCES.txt +3 -1
  11. uht_tooling-0.1.9/tests/test_design_kld.py +169 -0
  12. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/setup.cfg +0 -0
  13. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/__init__.py +0 -0
  14. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/models/__init__.py +0 -0
  15. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/__init__.py +0 -0
  16. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/design_gibson.py +0 -0
  17. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/mutation_caller.py +0 -0
  18. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/nextera_designer.py +0 -0
  19. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/profile_inserts.py +0 -0
  20. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling/workflows/umi_hunter.py +0 -0
  21. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling.egg-info/dependency_links.txt +0 -0
  22. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling.egg-info/entry_points.txt +0 -0
  23. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling.egg-info/requires.txt +0 -0
  24. {uht_tooling-0.1.7 → uht_tooling-0.1.9}/src/uht_tooling.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uht-tooling
3
- Version: 0.1.7
3
+ Version: 0.1.9
4
4
  Summary: Tooling for ultra-high throughput screening workflows.
5
5
  Author: Matt115A
6
- License: MIT
6
+ License-Expression: MIT
7
7
  Requires-Python: >=3.8
8
8
  Description-Content-Type: text/markdown
9
9
  Requires-Dist: biopython==1.85
@@ -82,6 +82,7 @@ Each command mirrors a workflow module. Common entry points:
82
82
  | --- | --- |
83
83
  | `uht-tooling nextera-primers` | Generate Nextera XT primer pairs from a binding-region CSV. |
84
84
  | `uht-tooling design-slim` | Design SLIM mutagenesis primers from FASTA/CSV inputs. |
85
+ | `uht-tooling design-kld` | Design KLD (inverse PCR) mutagenesis primers. |
85
86
  | `uht-tooling design-gibson` | Produce Gibson mutagenesis primers and assembly plans. |
86
87
  | `uht-tooling mutation-caller` | Summarise amino-acid substitutions from long-read FASTQ files. |
87
88
  | `uht-tooling umi-hunter` | Cluster UMIs and call consensus genes. |
@@ -141,6 +142,46 @@ Mutation nomenclature examples:
141
142
  - `T241Del` (deletion)
142
143
  - `T241TS` (insert Ser after Thr241)
143
144
  - `L46GP` (replace Leu46 with Gly-Pro)
145
+ - `A123:NNK` (library mutation with degenerate codon)
146
+
147
+ #### Library mutations with degenerate codons
148
+
149
+ For saturation mutagenesis and library generation, SLIM supports degenerate (IUPAC ambiguity) codons using the format `<WT_AA><position>:<codon>`. The codon must be exactly 3 characters using valid IUPAC nucleotide codes:
150
+
151
+ | Code | Bases | Mnemonic |
152
+ |------|-------|----------|
153
+ | A, C, G, T | Single base | Standard |
154
+ | R | A, G | puRine |
155
+ | Y | C, T | pYrimidine |
156
+ | S | G, C | Strong |
157
+ | W | A, T | Weak |
158
+ | K | G, T | Keto |
159
+ | M | A, C | aMino |
160
+ | B | C, G, T | not A |
161
+ | D | A, G, T | not C |
162
+ | H | A, C, T | not G |
163
+ | V | A, C, G | not T |
164
+ | N | A, C, G, T | aNy |
165
+
166
+ Common degenerate codon schemes for library construction:
167
+
168
+ | Scheme | Codons | Amino acids | Stop codons | Notes |
169
+ |--------|--------|-------------|-------------|-------|
170
+ | NNK | 32 | 20 | 1 (TAG) | Reduced stop codon frequency |
171
+ | NNS | 32 | 20 | 1 (TAG) | Equivalent to NNK |
172
+ | NNN | 64 | 20 | 3 | All codons, higher stop frequency |
173
+ | NDT | 12 | 12 | 0 | F, L, I, V, Y, H, N, D, C, R, S, G only |
174
+
175
+ Example CSV with mixed mutation types:
176
+ ```csv
177
+ mutations
178
+ A123G
179
+ T50:NNK
180
+ S100:NNS
181
+ T241Del
182
+ ```
183
+
184
+ The workflow validates that the wild-type amino acid matches the template sequence and logs library coverage information (number of possible codons and amino acids) for each degenerate mutation. Primers are generated with the degenerate bases embedded; reverse primers contain the correct IUPAC reverse complements (e.g., K↔M, R↔Y, S↔S).
144
185
 
145
186
  #### Experimental blueprint
146
187
 
@@ -149,6 +190,52 @@ Mutation nomenclature examples:
149
190
  - Combine 10 µL from each PCR with 10 µL H-buffer (150 mM Tris pH 8, 400 mM NaCl, 60 mM EDTA) for a 30 µL annealing reaction: 99 °C for 3 min, then two cycles of 65 °C for 5 min followed by 30 °C for 15 min, hold at 4 °C.
150
191
  - Transform directly into NEB 5-alpha or BL21 (DE3) cells without additional cleanup. The protocol has been validated for simultaneous introduction of dozens of mutations.
151
192
 
193
+ ### KLD primer design
194
+
195
+ KLD (Kinase-Ligation-DpnI) is an alternative mutagenesis method using inverse PCR to amplify the entire plasmid with mutations incorporated at the primer junction.
196
+
197
+ - Inputs: Same as SLIM design
198
+ - `data/design_kld/kld_template_gene.fasta`
199
+ - `data/design_kld/kld_context.fasta`
200
+ - `data/design_kld/kld_target_mutations.csv` (single `mutations` column)
201
+ - Run:
202
+ ```bash
203
+ uht-tooling design-kld \
204
+ --gene-fasta data/design_kld/kld_template_gene.fasta \
205
+ --context-fasta data/design_kld/kld_context.fasta \
206
+ --mutations-csv data/design_kld/kld_target_mutations.csv \
207
+ --output-dir results/design_kld/
208
+ ```
209
+ - Output: `results/design_kld/KLD_primers.csv` plus logs.
210
+
211
+ Mutation nomenclature: Same as SLIM (substitution, deletion, insertion, indel, library).
212
+
213
+ #### KLD vs SLIM
214
+
215
+ | Method | Primers | Mechanism | Best for |
216
+ |--------|---------|-----------|----------|
217
+ | SLIM | 4 per mutation | Overlap assembly | Multiple simultaneous mutations |
218
+ | KLD | 2 per mutation | Inverse PCR + ligation | Single mutations, simpler workflow |
219
+
220
+ #### KLD primer design rules
221
+
222
+ - Forward primer: Mutation codon at 5' end + downstream template-binding region
223
+ - Reverse primer: Reverse complement of upstream region, 5' end adjacent to forward
224
+ - Tm calculated on template-binding regions only (50-65°C target)
225
+ - Tm difference between primers kept within 5°C
226
+ - GC content 40-60%
227
+ - Binding region 18-24 bp
228
+
229
+ #### Experimental workflow
230
+
231
+ 1. PCR amplify entire plasmid with KLD primer pair
232
+ 2. DpnI digest to remove methylated template
233
+ 3. T4 PNK phosphorylation of 5' ends
234
+ 4. T4 DNA ligase to circularize
235
+ 5. Transform into competent cells
236
+
237
+ NEB sells a KLD Enzyme Mix (M0554) that combines these steps.
238
+
152
239
  ### Gibson assembly primers
153
240
 
154
241
  - Inputs mirror the SLIM workflow but use `data/design_gibson/`.
@@ -253,12 +340,13 @@ Key points:
253
340
  ### Tabs and capabilities
254
341
 
255
342
  1. **Nextera XT** – forward/reverse primer inputs with CSV preview.
256
- 2. **SLIM** – template/context FASTA text areas plus mutation list.
257
- 3. **Gibson** – multi-mutation support using `+` syntax.
258
- 4. **Mutation Caller** – upload FASTQ and template FASTA, then enter flanks and gene length bounds inline.
259
- 5. **UMI Hunter** – long-read UMI clustering with flank entry, UMI length bounds, mutation threshold, and minimum cluster size.
260
- 6. **Profile Inserts** – interactive probe table plus multiple FASTQ uploads with adjustable fuzzy-match ratio.
261
- 7. **EP Library Profile** – FASTQ uploads plus plasmid and region FASTA inputs.
343
+ 2. **SLIM** – template/context FASTA text areas plus mutation list (supports library codons like `R57:NNK`).
344
+ 3. **KLD** – inverse-PCR primer design using the same mutation list format (including library codons like `R57:NNK`).
345
+ 4. **Gibson** – multi-mutation support using `+` syntax.
346
+ 5. **Mutation Caller** – upload FASTQ and template FASTA, then enter flanks and gene length bounds inline.
347
+ 6. **UMI Hunter** – long-read UMI clustering with flank entry, UMI length bounds, mutation threshold, and minimum cluster size.
348
+ 7. **Profile Inserts** – interactive probe table plus multiple FASTQ uploads with adjustable fuzzy-match ratio.
349
+ 8. **EP Library Profile** – FASTQ uploads plus plasmid and region FASTA inputs.
262
350
 
263
351
  ### Workflow tips
264
352
 
@@ -53,6 +53,7 @@ Each command mirrors a workflow module. Common entry points:
53
53
  | --- | --- |
54
54
  | `uht-tooling nextera-primers` | Generate Nextera XT primer pairs from a binding-region CSV. |
55
55
  | `uht-tooling design-slim` | Design SLIM mutagenesis primers from FASTA/CSV inputs. |
56
+ | `uht-tooling design-kld` | Design KLD (inverse PCR) mutagenesis primers. |
56
57
  | `uht-tooling design-gibson` | Produce Gibson mutagenesis primers and assembly plans. |
57
58
  | `uht-tooling mutation-caller` | Summarise amino-acid substitutions from long-read FASTQ files. |
58
59
  | `uht-tooling umi-hunter` | Cluster UMIs and call consensus genes. |
@@ -112,6 +113,46 @@ Mutation nomenclature examples:
112
113
  - `T241Del` (deletion)
113
114
  - `T241TS` (insert Ser after Thr241)
114
115
  - `L46GP` (replace Leu46 with Gly-Pro)
116
+ - `A123:NNK` (library mutation with degenerate codon)
117
+
118
+ #### Library mutations with degenerate codons
119
+
120
+ For saturation mutagenesis and library generation, SLIM supports degenerate (IUPAC ambiguity) codons using the format `<WT_AA><position>:<codon>`. The codon must be exactly 3 characters using valid IUPAC nucleotide codes:
121
+
122
+ | Code | Bases | Mnemonic |
123
+ |------|-------|----------|
124
+ | A, C, G, T | Single base | Standard |
125
+ | R | A, G | puRine |
126
+ | Y | C, T | pYrimidine |
127
+ | S | G, C | Strong |
128
+ | W | A, T | Weak |
129
+ | K | G, T | Keto |
130
+ | M | A, C | aMino |
131
+ | B | C, G, T | not A |
132
+ | D | A, G, T | not C |
133
+ | H | A, C, T | not G |
134
+ | V | A, C, G | not T |
135
+ | N | A, C, G, T | aNy |
136
+
137
+ Common degenerate codon schemes for library construction:
138
+
139
+ | Scheme | Codons | Amino acids | Stop codons | Notes |
140
+ |--------|--------|-------------|-------------|-------|
141
+ | NNK | 32 | 20 | 1 (TAG) | Reduced stop codon frequency |
142
+ | NNS | 32 | 20 | 1 (TAG) | Equivalent to NNK |
143
+ | NNN | 64 | 20 | 3 | All codons, higher stop frequency |
144
+ | NDT | 12 | 12 | 0 | F, L, I, V, Y, H, N, D, C, R, S, G only |
145
+
146
+ Example CSV with mixed mutation types:
147
+ ```csv
148
+ mutations
149
+ A123G
150
+ T50:NNK
151
+ S100:NNS
152
+ T241Del
153
+ ```
154
+
155
+ The workflow validates that the wild-type amino acid matches the template sequence and logs library coverage information (number of possible codons and amino acids) for each degenerate mutation. Primers are generated with the degenerate bases embedded; reverse primers contain the correct IUPAC reverse complements (e.g., K↔M, R↔Y, S↔S).
115
156
 
116
157
  #### Experimental blueprint
117
158
 
@@ -120,6 +161,52 @@ Mutation nomenclature examples:
120
161
  - Combine 10 µL from each PCR with 10 µL H-buffer (150 mM Tris pH 8, 400 mM NaCl, 60 mM EDTA) for a 30 µL annealing reaction: 99 °C for 3 min, then two cycles of 65 °C for 5 min followed by 30 °C for 15 min, hold at 4 °C.
121
162
  - Transform directly into NEB 5-alpha or BL21 (DE3) cells without additional cleanup. The protocol has been validated for simultaneous introduction of dozens of mutations.
122
163
 
164
+ ### KLD primer design
165
+
166
+ KLD (Kinase-Ligation-DpnI) is an alternative mutagenesis method using inverse PCR to amplify the entire plasmid with mutations incorporated at the primer junction.
167
+
168
+ - Inputs: Same as SLIM design
169
+ - `data/design_kld/kld_template_gene.fasta`
170
+ - `data/design_kld/kld_context.fasta`
171
+ - `data/design_kld/kld_target_mutations.csv` (single `mutations` column)
172
+ - Run:
173
+ ```bash
174
+ uht-tooling design-kld \
175
+ --gene-fasta data/design_kld/kld_template_gene.fasta \
176
+ --context-fasta data/design_kld/kld_context.fasta \
177
+ --mutations-csv data/design_kld/kld_target_mutations.csv \
178
+ --output-dir results/design_kld/
179
+ ```
180
+ - Output: `results/design_kld/KLD_primers.csv` plus logs.
181
+
182
+ Mutation nomenclature: Same as SLIM (substitution, deletion, insertion, indel, library).
183
+
184
+ #### KLD vs SLIM
185
+
186
+ | Method | Primers | Mechanism | Best for |
187
+ |--------|---------|-----------|----------|
188
+ | SLIM | 4 per mutation | Overlap assembly | Multiple simultaneous mutations |
189
+ | KLD | 2 per mutation | Inverse PCR + ligation | Single mutations, simpler workflow |
190
+
191
+ #### KLD primer design rules
192
+
193
+ - Forward primer: Mutation codon at 5' end + downstream template-binding region
194
+ - Reverse primer: Reverse complement of upstream region, 5' end adjacent to forward
195
+ - Tm calculated on template-binding regions only (50-65°C target)
196
+ - Tm difference between primers kept within 5°C
197
+ - GC content 40-60%
198
+ - Binding region 18-24 bp
199
+
200
+ #### Experimental workflow
201
+
202
+ 1. PCR amplify entire plasmid with KLD primer pair
203
+ 2. DpnI digest to remove methylated template
204
+ 3. T4 PNK phosphorylation of 5' ends
205
+ 4. T4 DNA ligase to circularize
206
+ 5. Transform into competent cells
207
+
208
+ NEB sells a KLD Enzyme Mix (M0554) that combines these steps.
209
+
123
210
  ### Gibson assembly primers
124
211
 
125
212
  - Inputs mirror the SLIM workflow but use `data/design_gibson/`.
@@ -224,12 +311,13 @@ Key points:
224
311
  ### Tabs and capabilities
225
312
 
226
313
  1. **Nextera XT** – forward/reverse primer inputs with CSV preview.
227
- 2. **SLIM** – template/context FASTA text areas plus mutation list.
228
- 3. **Gibson** – multi-mutation support using `+` syntax.
229
- 4. **Mutation Caller** – upload FASTQ and template FASTA, then enter flanks and gene length bounds inline.
230
- 5. **UMI Hunter** – long-read UMI clustering with flank entry, UMI length bounds, mutation threshold, and minimum cluster size.
231
- 6. **Profile Inserts** – interactive probe table plus multiple FASTQ uploads with adjustable fuzzy-match ratio.
232
- 7. **EP Library Profile** – FASTQ uploads plus plasmid and region FASTA inputs.
314
+ 2. **SLIM** – template/context FASTA text areas plus mutation list (supports library codons like `R57:NNK`).
315
+ 3. **KLD** – inverse-PCR primer design using the same mutation list format (including library codons like `R57:NNK`).
316
+ 4. **Gibson** – multi-mutation support using `+` syntax.
317
+ 5. **Mutation Caller** – upload FASTQ and template FASTA, then enter flanks and gene length bounds inline.
318
+ 6. **UMI Hunter** – long-read UMI clustering with flank entry, UMI length bounds, mutation threshold, and minimum cluster size.
319
+ 7. **Profile Inserts** – interactive probe table plus multiple FASTQ uploads with adjustable fuzzy-match ratio.
320
+ 8. **EP Library Profile** – FASTQ uploads plus plasmid and region FASTA inputs.
233
321
 
234
322
  ### Workflow tips
235
323
 
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "uht-tooling"
7
- version = "0.1.7"
7
+ version = "0.1.9"
8
8
  description = "Tooling for ultra-high throughput screening workflows."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
11
- license = { text = "MIT" }
11
+ license = "MIT"
12
12
  authors = [{ name = "Matt115A" }]
13
13
  dependencies = [
14
14
  "biopython==1.85",
@@ -4,6 +4,7 @@ from typing import Optional
4
4
  import typer
5
5
 
6
6
  from uht_tooling.workflows.design_gibson import run_design_gibson
7
+ from uht_tooling.workflows.design_kld import run_design_kld
7
8
  from uht_tooling.workflows.design_slim import run_design_slim
8
9
  from uht_tooling.workflows.mutation_caller import (
9
10
  expand_fastq_inputs as expand_fastq_inputs_mutation,
@@ -66,6 +67,45 @@ def design_slim_command(
66
67
  typer.echo(f"SLIM primers written to {output_dir / 'SLIM_primers.csv'}")
67
68
 
68
69
 
70
+ @app.command("design-kld", help="Design KLD (inverse PCR) primers from user-specified FASTA/CSV inputs.")
71
+ def design_kld_command(
72
+ gene_fasta: Path = typer.Option(..., exists=True, readable=True, help="Path to the gene FASTA file."),
73
+ context_fasta: Path = typer.Option(
74
+ ...,
75
+ exists=True,
76
+ readable=True,
77
+ help="Path to the context FASTA file containing the plasmid or genomic sequence.",
78
+ ),
79
+ mutations_csv: Path = typer.Option(
80
+ ...,
81
+ exists=True,
82
+ readable=True,
83
+ help="CSV file containing a 'mutations' column with the desired edits.",
84
+ ),
85
+ output_dir: Path = typer.Option(
86
+ ...,
87
+ dir_okay=True,
88
+ writable=True,
89
+ help="Directory where results will be written.",
90
+ ),
91
+ log_path: Optional[Path] = typer.Option(
92
+ None,
93
+ dir_okay=False,
94
+ writable=True,
95
+ help="Optional path to write a dedicated log file for this run.",
96
+ ),
97
+ ):
98
+ """Design KLD (inverse PCR) primers from user-provided inputs."""
99
+ result_path = run_design_kld(
100
+ gene_fasta=gene_fasta,
101
+ context_fasta=context_fasta,
102
+ mutations_csv=mutations_csv,
103
+ output_dir=output_dir,
104
+ log_path=log_path,
105
+ )
106
+ typer.echo(f"KLD primers written to {result_path}")
107
+
108
+
69
109
  @app.command("nextera-primers", help="Generate Nextera XT primers from binding region CSV input.")
70
110
  def nextera_primers_command(
71
111
  binding_csv: Path = typer.Option(