BjornFJohansson / pydna

Clone with Python! Data structures for double stranded DNA & simulation of homologous recombination, Gibson assembly, cut & paste cloning.
Other
166 stars 45 forks source link

Wrong feature locations after sticky-end ligation #88

Closed jan-glx closed 1 year ago

jan-glx commented 2 years ago

The new feature locations computed when adding two DSeqrecords with sticky ends are off:

from pydna.genbank import Genbank
from Bio.Restriction import BamHI, NdeI
gb = Genbank("bjornjobb@gmail.com")
puc19 = gb.nucleotide("M77789.2")
bb, insert = puc19.cut(NdeI,BamHI)
puc19_ = (bb + insert).looped().synced(puc19)
print(puc19_.extract_feature(2), "\n")
print(puc19.extract_feature(6))
Dseqrecord
circular: False
size: 137
ID: pBR322
Name: pBR322
Description: description_rc
Number of features: 1
/molecule_type=DNA
Dseq(-137)
TTCG..TTAA
AAGC..AATT 

Dseqrecord
circular: False
size: 137
ID: pBR322
Name: pBR322
Description: Cloning vector pUC19, complete sequence_rc
Number of features: 1
/molecule_type=DNA
Dseq(-137)
TCGC..GGGC
AGCG..CCCG
print(puc19_.features[2], "\n")
print(puc19.features[6], "\n")
type: misc_feature
location: [539:676](-)
qualifiers:
    Key: note, Value: ['pBR322']

type: misc_feature
location: [547:684](-)
qualifiers:
    Key: note, Value: ['pBR322']
BjornFJohansson commented 2 years ago

Thanks! Ill have a look at this.

BjornFJohansson commented 2 years ago

Still working on this, regular work came in the way.

BjornFJohansson commented 1 year ago

Have a solution for this, look out for a new release.

BjornFJohansson commented 1 year ago

Solved in 5.2.0 I hope. Feel free to reopen if not.