Skip to content

Commit ede2b3f

Browse files
authored
Modify only_adjacent_edges to rely on overlapping locations only (#602)
* example to reproduce, should change to grouping by overlap only for only_adjacent_edges (drop support for partial overlap) * suppress known test warnings * change how only_adjacent_edges works, now it wont work for partial overhangs, but work properly in other cases * remove comment * fix assembly_uses_only_adjacent_edges * better solution with partially_digested_seqs_in_restriction_ligation_assembly * fix partially_digested_seqs_in_restriction_ligation_assembly to handle pre-cut inputs and add decicated test for this * Add inversion assembly support for single-input recombination (#603) * remove comment * first version working with two examples * keep back-compatibility and add deprecation warnings * added tests * add recombinase_assembly * add history validations to test to ensure inversion is correctly validated * update replay_products for recombinase * restore only_adjacent_edges=True in restriction_ligation_assembly * fix tests + copilot feedback
1 parent 231626e commit ede2b3f

11 files changed

Lines changed: 623 additions & 149 deletions

docs/notebooks/hackathon_copenhagen_2025.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,9 +908,9 @@
908908
}
909909
],
910910
"source": [
911-
"from pydna.assembly2 import homologous_recombination_excision\n",
911+
"from pydna.assembly2 import homologous_recombination_excision_or_inversion\n",
912912
"\n",
913-
"products = homologous_recombination_excision(transformed_genome, limit=10)\n",
913+
"products = homologous_recombination_excision_or_inversion(transformed_genome, limit=10)\n",
914914
"\n",
915915
"print(products[0].seq)\n",
916916
"print(products[1].seq)"
@@ -977,7 +977,7 @@
977977
"name": "python",
978978
"nbconvert_exporter": "python",
979979
"pygments_lexer": "ipython3",
980-
"version": "3.12.11"
980+
"version": "3.12.2"
981981
}
982982
},
983983
"nbformat": 4,

docs/notebooks/history.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
" ligation_assembly,\n",
5858
" gateway_assembly,\n",
5959
" homologous_recombination_integration,\n",
60-
" homologous_recombination_excision,\n",
60+
" homologous_recombination_excision_or_inversion,\n",
6161
" cre_lox_integration,\n",
62-
" cre_lox_excision,\n",
62+
" cre_lox_excision_or_inversion,\n",
6363
" pcr_assembly,\n",
6464
" crispr_integration,\n",
6565
")\n",
@@ -320,7 +320,7 @@
320320
"insert = Dseqrecord(f\"{homology}gggg{homology}\")\n",
321321
"integration_product, *_ = homologous_recombination_integration(genome, [insert], 20)\n",
322322
"\n",
323-
"excision_product, *_ = homologous_recombination_excision(integration_product, 20)\n",
323+
"excision_product, *_ = homologous_recombination_excision_or_inversion(integration_product, 20)\n",
324324
"\n",
325325
"genome.name = \"genome\"\n",
326326
"insert.name = \"insert\"\n",
@@ -367,7 +367,7 @@
367367
"a = Dseqrecord(f\"cccccc{LOXP_SEQUENCE}aaaaa\")\n",
368368
"b = Dseqrecord(f\"{LOXP_SEQUENCE}bbbbb\", circular=True)\n",
369369
"integration_product, *_ = cre_lox_integration(a, [b])\n",
370-
"excision_product, *_ = cre_lox_excision(integration_product)\n",
370+
"excision_product, *_ = cre_lox_excision_or_inversion(integration_product)\n",
371371
"\n",
372372
"a.name = \"genome\"\n",
373373
"b.name = \"plasmid\"\n",

pytest.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[pytest]
2+
filterwarnings =
3+
ignore:Partial overlaps can return wrong products.*:UserWarning
4+
ignore:Some recombination products were discarded because they had off-target cuts.*:UserWarning
5+
ignore:The user_assembly_design function is experimental and may change in future versions.*:FutureWarning
6+
ignore:Increasing length of locus line to allow long name.*:
7+
ignore:Feature qualifier key.*:Bio.BiopythonWarning
8+
ignore:Truncated LOCUS line found - is this correct\?.*:Bio.BiopythonWarning
9+
ignore:LOCUS line is wrongly formatted, we used a more permissive parser.*:UserWarning
10+
ignore:The primer_screen module is experimental.*:FutureWarning
11+
12+
markers =
13+
mpl_image_compare

0 commit comments

Comments
 (0)