Error during Gibson assembly --AttributeError: 'MultiDiGraph' object has no attribute 'node'

18 views
Skip to first unread message

har...@gmail.com

unread,
Oct 23, 2019, 9:20:24 AM10/23/19
to pydna
Hi 
I am new to pyDNA and really like the program . I have successfully used it to test my TypeIIS and retriction cloning strategies and am now trying a circular Gibson assembly. 

When I try the assembly it gives me an error "AttributeError: 'MultiDiGraph' object has no attribute 'node'",

If I reduce the extent of homology overlap , it runs for a long time and does not terminate.

I know the assembly should work because I have designed and successfully implemented the strategy and checked the sequence-please can you tell me what I am doing wrong,

Thanks

Hari


import Bio
from pydna import dseq,dseqrecord
from Bio import Seq, SeqIO
from pydna.dseqrecord import Dseqrecord
backbone = Dseqrecord(str(SeqIO.read("myvector-3733-6271.fasta","fasta").seq),name="back")
insert = Dseqrecord(str(SeqIO.read("myvector-6232-3772.fasta","fasta").seq),name="inserted")
from pydna.assembly import Assembly
a = Assembly(frags=(backbone,insert,backbone),limit=20)
out = a.assemble_circular()




---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-25-266e64ed8464> in <module>()
----> 1 out = a.assemble_circular()


1 frames
/usr/local/lib/python3.6/dist-packages/pydna/assembly.py in <genexpr>(.0)
    342         cpaths_sorted=[]
    343         for cpath in cpaths:
--> 344             order, node = min((self.G.node[node]["order"],node) for node in cpath)
    345             i=cpath.index(node)
    346             cpaths_sorted.append((order, cpath[i:]+cpath[:i]))

AttributeError: 'MultiDiGraph' object has no attribute 'node'


hari jayaram

unread,
Oct 23, 2019, 12:25:11 PM10/23/19
to pydna
Hi All
I tried the example from the source code and it is giving me the same error.
I am using the pydna version 3.0.1 on python 3.6
My Sequences also have homology as indicated in the text superposition below

actacgacgtcgacGCCatcgtgccgcagtcctttttg......gaaatacagcattggtctgGCTatcggcacgaattc
                                            gaaatacagcattggtctgGCTatcggcacgaattc------------------------------
actacgacgtcgacGCCatcgtgccgcagtcctttttg

Thanks

a = Dseqrecord("acgatgctatactgCCCCCtgtgctgtgctcta")
b = Dseqrecord("tgtgctgtgctctaTTTTTtattctggctgtatc")
c = Dseqrecord("tattctggctgtatcGGGGGtacgatgctatactg")
x = Assembly((a,b,c), limit=14)
x
x.assemble_circular()


AttributeError                            Traceback (most recent call last)
<ipython-input-35-b1ec03edd045> in <module>()
      4 x = Assembly((a,b,c), limit=14)
      5 x
----> 6 x.assemble_circular()

--
You received this message because you are subscribed to a topic in the Google Groups "pydna" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pydna/NQd-VvWyePA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pydna+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pydna/19e3a3c8-bbe8-4ea2-82cb-5ee162bfe6b4%40googlegroups.com.

Björn Johansson

unread,
Oct 24, 2019, 1:28:17 AM10/24/19
to pydna
Hi, I did some experimenting and some searching, and it seems that pydna
does not work with networkx version 2.4. Please check if you have that?
The immediate solution is to downgrade to 2.3 for now. Meanwhile I will make another release to fix this.

hari jayaram

unread,
Oct 24, 2019, 9:23:21 AM10/24/19
to Björn Johansson, pydna

Thanks a tonne @BjornFJohansson . I did have networkx version 2.4 which was the default on Google Collaboratory-googles online ipython/jupyter notebook environment. I downgraded networkx to 2.3

!pip3 install networkx==2.3

The assemblies then worked perfectly.

Thanks again for your help. 


--
You received this message because you are subscribed to a topic in the Google Groups "pydna" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pydna/NQd-VvWyePA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pydna+un...@googlegroups.com.

Björn Johansson

unread,
Oct 24, 2019, 9:55:24 AM10/24/19
to pydna
great! look out for a new release within days to fix this! /bjorn
To unsubscribe from this group and all its topics, send an email to pydna+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages