Type IIS , SapI cut --Sticky overhangs not assembled . Help..code attached

10 views
Skip to first unread message

hari jayaram

unread,
Jun 13, 2024, 6:26:38 PM6/13/24
to pydna
Hi
I am trying to use pyDNA to stimulate a simple cloning example that I know should work as a positive control.

My code given below does generate two fragments whose Dseqrecord outputs are given below . The overhangs in printed output seem to have the correct ends. Yet the circular assembly is blank and hence does not print any output. Any help troubleshooting this will be greatly appreciated. Its been a long time since I used pyDNA and know I am close to getting this example to work. 
Thanks for a great library and for your help
Hari

My output:

Dseqrecord
circular: False
size: 3971
ID: id
Name: name
Description: description
Number of features: 0
/molecule_type=DNA
Dseq(-3971)
GGTCATC..AAAA  
        GTAG..TTTTTAC

Dseqrecord
circular: False
size: 4143
ID: id
Name: name
Description: description
Number of features: 0
/molecule_type=DNA
Dseq(-4143)
ATGAAGA..GGAC  
        TTCT..CCTGCCA
Assembled products:

#########################
Code with Vector file and input truncated
#########################

# Import necessary modules from pyDNA
from io import StringIO

from Bio import SeqIO
from pydna.dseqrecord import Dseqrecord
from pydna.assembly import Assembly
from pydna.amplify import Anneal
from Bio.Restriction import SapI

# Step 1: Import the GenBank file for the plasmid vector
# Assume the file "pd441-ch.gb" is in the current directory
genbank_file = "inputvector.gb"
biopython_record = SeqIO.read(genbank_file, "genbank")


# Convert Biopython SeqRecord to pydna Dseqrecord
plasmid = Dseqrecord(biopython_record.seq, circular=False)

# Verify the plasmid import
# print(f"Pasmid Sequence:{plasmid}")

# Step 2: Simulate the digestion of the vector with SapI to generate the backbone

backbone_digested = plasmid.cut(SapI)

# Verify the digestion result
backbone = None
for index,fragment in enumerate(backbone_digested):
if len(fragment) > 1000:
backbone = fragment

# Step 3: Represent an insert sequence from a text string
insert_sequence_str = "TACACGTACTTAGTCGCTGAAGCT..........GGGGACGGTAGAAGAGCCGTCAATCGAGTTCGTACCTA"
insert_sequence = Dseqrecord(insert_sequence_str)

# Verify the insert sequence
# print(insert_sequence)

# Step 4: Simulate the digestion of the insert sequence with SapI
insert_digested = insert_sequence.cut(SapI)

insert_chosen = None
for index,fragment in enumerate(insert_digested):
if len(fragment.seq) >= 1000:
insert_chosen = fragment


# Step 5: Assemble the digested backbone and insert sequences
# Assuming we have identified the correct backbone and insert fragments to ligate
# Here we select the first fragment of each for simplicity
print(backbone)
print(insert_chosen)
assembly = Assembly([insert_chosen,backbone])
assembled_products = assembly.assemble_circular()

# Verify the assembly result
print("Assembled products:")
for product in assembled_products:
print(product)
if product.ok():
print("Assembly successful!")
else:
print("Assembly failed.")

hari jayaram

unread,
Jun 14, 2024, 6:26:40 AM6/14/24
to pydna
Hi All
I figured it out looking at examples from the cheat sheet and cookbook. The above test code worked great when I substituted the code to do the circular assembly using

(insert_chosen + backbone).looped()

Instead of 

assembly = Assembly([insert_chosen,backbone])
assembled_products = assembly.assemble_circular()

Which silently failed to complete the circular "assembly". I am looking for help in understanding why the "Assembly ([insert_chosen,backbone])" failed .

Thanks a ton
Hari

Manuel Lera Ramírez

unread,
May 1, 2025, 6:43:17 AMMay 1
to pydna
Hi Hari,

Sorry for the super late reply, I was not even aware there was a google group. I hope you manage to solve your issue, but otherwise, could you please create an issue on github? Also we organise online meetings every month an a half for pydna users. If you would like to attend please let us know.

Best,
Manu

Reply all
Reply to author
Forward
0 new messages