Near future developments

39 views
Skip to first unread message

Björn Johansson

unread,
Mar 30, 2017, 1:41:15 AM3/30/17
to pydna
I have managed to get three students to work on pydna for short projects for a couple of months each.
The projects have these titles:

Speed up of the pydna assembly algorithm
The idea is to speed up the assembly algorithm with graph-tool as an alternative to networkx.
Also if time permits to make the algorithm more efficient and safer in general.

A dynamic and interactive Javascript component for pydna
This project aims at writing javascript for rich representations in Jupyter notebooks for the Assembly and Contig classes.
These objects are so complex that it would be nice to have an image to click on in order to see which sequences recombined and in which order.
I was inspired by the AngularPlasmid component.

Automatic restriction strategy strategy finder for Synthetic Biology Constructs

Here the idea is to suggest optimal restriction digest strategies in order to differentiate a number of sequences.
Input would be a list of sequences and at least a smallest  desirable restriction fragment. Possibly also a list of 
available restriction enzymes. This could be useful for analyzing recombination products from random or combinatorial assembly.

Look out for these functionalities in the coming months.
Questions and comments are welcome.

cheers,
Bjorn

Mark Budde

unread,
Mar 31, 2017, 12:58:53 PM3/31/17
to Björn Johansson, pydna
That looks like a good plan. 

For a while I've been wanting to implement a restriction fragment (golden gate) strategy for assembling a list of fragments. The idea is that the network analysis should be identical to the current assembly algorithm, but the links would be determined the same way that ligations are currently done (plus the reverse complement). 

Currently when I simulate this I just try to assemble until I get a circular assembly. However, there are plenty of times when multiple outcomes are possible, and these would be useful to have. Here is the ligate code I currently use:


def ligate(fragmentList):
    """fragmentList: a list of fragments to ligate together"""


    assembly = fragmentList.pop(0) #seed the assembly with the first piece
    while len(fragmentList):
        for i, z in enumerate(fragmentList):
            success = False
            try:
                assembly = assembly + fragmentList[i]
                fragmentList.pop(i)
                success = True
                break
            except TypeError: pass
            
            try:
                assembly = assembly + fragmentList[i].reverse_complement()
                fragmentList.pop(i)
                success = True
                break
            except TypeError: pass

            try:
                assembly = assembly.reverse_complement() + fragmentList[i]
                fragmentList.pop(i)
                success = True
                break
            except TypeError: pass
            
            try:
                assembly = assembly.reverse_complement() + fragmentList[i].reverse_complement()
                fragmentList.pop(i)
                success = True
                break
            except TypeError: pass

        if not success:
            print('Error')
            print('Assembly: ')
            print(assembly)
            print('Not assembled:')
            for f in fragmentList:
                print(f)
            raise Exception("fragments do not assemble into a single DNA molecule.")
    try:
        assembly = assembly.looped()
    except:
        pass
    assembly.name, assembly.id, assembly.description = ('.','.','.')
    return assembly

-Mark

Björn Johansson

unread,
Apr 4, 2017, 12:45:12 AM4/4/17
to pydna, bjor...@gmail.com
Hi that looks like a brute force approach, I though about  it and came up with a way to use the Assembly class for this.
Basically, if you set the limit = 4 and only_terminal_overlaps=True, then assembly will occur only considering the four flanking nucleotides.

The golden gate linkers can be zipped with the sequences and added to primers using the assembly_fragments function.

I made a Jupyter notebook to demonstrate this point here (see golden gate folder), I found a bug in the assembly_fragments function while working on this, so to run the notebook, you need the 2.0.0a3 version that I am uploading right now.

cheers,
Bjorn


Reply all
Reply to author
Forward
0 new messages