Open manulera opened 11 months ago
OK, lots to digest. In principle I don't mind putting this alongside and eventually replace the existing code. Ill read it carefully and get back to you.
Yes, actually the code has slightly changed since, although it is still in the same spirit. I am currently using that new assembly module to do PCR, ligations (also partial) and homologous recombination. I will adapt for gibson and golden gate as well. I am just writing slightly different algorithm
functions for each case.
If you think it can be useful, I can give you a short overview on zoom before you dive into it.
Hi @BjornFJohansson, when you merge the branches you mentioned in the call into cutsite_pairs, let me know and I can add the new assembly implementation.
Hi @BjornFJohansson I had started working on a similar refactoring to #157 for the assemblies (find which assemblies can be made with one function, execute them with another). To get this to work, I had to change things significantly, so my implementation has become quite different. I still use a graph, but the meaning of edges is different. I have not implemented the
Contig
functionality, but I could do something similar, if you think it would make sense to include this assembly in pydna. For now, it is in the ShareYourCloning repo.You can find the implementation in this_file. It passes all the tests that pydna's assembly passes, excluding the order in which fragments are returned, and that it only returns unique assemblies (see test file).
If you want to have a look, I would start from the docstring of
Assembly
, and thenadd_edges_from_match
to understand how it works. I think it's quite simplified from the original implementation, for example, the construction of the graph is very short (the functionadd_edges_from_match
is quite short as well):Let me know what you think.