klavinslab / coral Goto Github PK
View Code? Open in Web Editor NEWCoral, a library and framework for specifying synthetic biology design processes.
Home Page: http://coral.readthedocs.org
License: MIT License
Coral, a library and framework for specifying synthetic biology design processes.
Home Page: http://coral.readthedocs.org
License: MIT License
EG
>>> from coral import DNA
>>> foo = DNA("ATTTTT")
>>> "CCGG" + foo
ATTTTTCCGG
TAAAAAGGCC
>>> "CCGG" + foo.top
ATTTTTCCGG
>>> foo.top + "CCGG"
ATTTTTCCGG
Upon execution of design.gibson, the coral.DNA objects in the seq_list are altered. Input *seq_list * should remain unchanged following execution of this method. We should investigate the source of this bug.
it is not working, I got this error:
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
Coral is currently compatible only with Python 2.
[end of output]
When trying to digest the vector pENTR223.1 with an SfiI RestrictionSite object from the Rebase.get() method, I noticed that it always returns a single uncut DNA object, when it should cut twice and return two sequences. I tried a few things and it seems like the issue is that the SfiI recognition sequence contains 5 'N' bases, GGCCNNNNNGGCC. I manually created two restriction site objects with the ambiguous N's replaced with the corresponding vector sequences, which worked fine. I also tried the reverse, N-masking the vector sequence at the cut site, which caused weird behavior with the rebase restriction site. That digest output the 2 correct fragments, as well as two empty DNA objects. Below is the script I used for testing.
import coral as cor
# fragment of pENTR223.1
# original seq and N-masked version
vector_seq = 'cccaaataatgattttattttgactgatagtgacctgttcgttgcaacaaattgatgagcaatgcttttttataatgccaactttgtacaaaaaagcaga' \
'agggccgtcaaggccagaaggagatataaccatgtaaggcctcatgggcccagctttcttgtacaaagttggcattataaaaaataattgctcatcaatt'
vector_seq_NNNNN = 'cccaaataatgattttattttgactgatagtgacctgttcgttgcaacaaattgatgagcaatgcttttttataatgccaactttgtacaaaaaagcaga' \
'agggccNNNNNggccagaaggagatataaccatgtaaggccNNNNNggcccagctttcttgtacaaagttggcattataaaaaataattgctcatcaatt'
vector = cor.DNA(vector_seq, circular=True) # DNA object from original vector sequence
vector_NNNNN = cor.DNA(vector_seq_NNNNN, circular=True) # DNA object from vector sequence with NNNNN to match SfiI cut site
# define restriction sites
# from rebase
reb = cor.database.Rebase()
sfiI = reb.get('SfiI')
# make two manually defined sfiI restriction sites
sfiIa = cor.sequence.RestrictionSite(cor.DNA('GGCCgtcaaGGCC'), (8, 5) )
sfiIb = cor.sequence.RestrictionSite(cor.DNA('GGCCtcatgGGCC'), (8, 5) )
# digest original vector with sfiI from rebase
# yields one fragment... does not cut!
digest_one = cor.reaction.digest(vector.copy(), sfiI)
print('Original vector with rebase sfiI digest yields ' + str(len(digest_one)) + ' fragments')
# digest N-masked vector with sfiI from rebase
# yields 4 fragments... 2 empty objects and 2 correct objects
digest_two = cor.reaction.digest(vector_NNNNN.copy(), sfiI)
print('N-masked vector with rebase sfiI digest yields ' + str(len(digest_two)) + ' fragments')
for seq in digest_two:
print(len(seq))
# digest original vector with manually defined sfiI sites
# yields two fragments... correct!
digest_three = cor.reaction.digest(vector.copy(), sfiIa)
digest_three = cor.reaction.digest(digest_three[0].copy(), sfiIb)
print('Original vector with manually defined sfiI digest yields ' + str(len(digest_three)) + ' fragments')
# digest N-masked vector with manually defined sfiI sites
# yields one fragment... does not cut!
digest_four = cor.reaction.digest(vector_NNNNN.copy(), sfiIa)
digest_four = cor.reaction.digest(digest_three[0].copy(), sfiIb)
print('N-masked vector with manually defined sfiI digest yields ' + str(len(digest_four)) + ' fragments')
When I edit a plasmid with Coral and write it to a file, the annotation colors are lost.
Error that arises when implementing a PCR with overlapping primers: "NotImplementedError: Primer dimer amplification unimplemented."
To reproduce:
import coral as pbt
t = pbt.DNA("CACCAC")
x3 = pbt.DNA("CATTGCATCTATAAACGAGTCTTAC")
x4= pbt.DNA("CATTGCTTAACATACAGAGTCTTAC")
b = pbt.DNA("CTGTCCTTTATTTCGCTCTTCC")
c = pbt.DNA("CATTGCCACCTCCACCCTCCAG")
a3 = pbt.DNA("CATTGCATATTTCCCAGAGTCTTAC")
a4 = pbt.DNA("CATTGCCAACCCATTCGAGTCTTAC")
JoinX4X3 = b + t + x4 + t + x3 + t + a3 + a3 + c
JoinX4 = b + t + x4 + t + a2 + t + c
template2 = b + t + x4 + t
primer_f2, primer_r2 = pbt.design.primers(template2, tm=74, overhangs=(pbt.DNA(""), (a2 + t + c).reverse_complement()))
rxn2 = pbt.reaction.pcr(JoinX4X3,primer_f2,primer_r2)
Coral does not appear to be Python 3 compatible, but setup.py and pip will allow it to install in a Python 3 environment, only to have it fail on initial import. It might make sense to have a check for this in setup.py.
Annealing (e.g. when running design.pcr
) with a primer that's longer than the template results in this error: ValueError: Search pattern longer than searchable sequence.
.
To reproduce:
import coral as crl
template = crl.design.random_dna(50)
primer1, primer2 = crl.design.primers(template, overhangs=[crl.design.random_dna(200), crl.DNA('')])
crl.reaction.pcr(template, primer1, primer2)
Suggested solution: limit template search sequence length by both the primer length and the template length.
When installing pymbt, I get the following error:
error: can't copy 'pymbt/analysis/_sequencing/calign.c': doesn't exist or not a regular file
It goes away after I manually run
cythonize(['pymbt/analysis/_sequencing/calign.pyx'])
and restart the build.
I'm using Python 2.7 and Cython 0.23.
.locate doesn't seem to find all of the sequences that are present in a sequence file that is read in through the .read_sequencing. However when I put in the sequence of the file manually using the .DNA("") command .locate finds all the sequences present. The below code should find three instances of sequences in the targetSequences list but only finds one when the DNA file is uploaded using .read_sequencing.
Here is example code of what I'm referring to:
seqs = cr.seqio.read_sequencing('/Users/milesgander/Desktop/10-317729264_seq')
targetNames = ["W5", "W8", "W10", "W14", "W17", "W19", "W20", "W22", "W34", "W36", 'F1', "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10"]
targetSequences = [cr.DNA('GGAACGTGATTGAATAACTT'), cr.DNA('ACCAACGCAAAAAGATTTAG'), cr.DNA('CATTGCCATACACCTTGAGG'), cr.DNA('GAAAATCACAACTCTACTGA'), cr.DNA('GAAGTCAGTTGACAGAGTCG'), cr.DNA('GTGGTAACTTGCTCCATGTC'), cr.DNA('CTTTACGTATAGGTTTAGAG'), cr.DNA('CGCATTTCCTATTCAAACTT'), cr.DNA('GCAACCCACAAATATCCAGT'), cr.DNA('GTGACATAAACATTCGACTC'), cr.DNA('GGGCAAAGAGACGCTTGTCG'), cr.DNA('GAAGTCATCGCTTCTTGTCG'), cr.DNA('GAGTTGACAAAGTATAACTT'), cr.DNA('GAAGTTTCAGAATCTCGACG'), cr.DNA('GGCTAGGATCCATCTGACTT'), cr.DNA('GCAACCATAGACTCTCCAGG'), cr.DNA('ACCACAACTGAGTCGAACCT'), cr.DNA('GGGTAGCAACACTCGTACTT'), cr.DNA('GTAAAAGATAACTCTGTTGC'), cr.DNA('TCTACCCGAGACTCAAACGG') ]
inds=[]
names=[]
seq=seqs[1]
for x in range(0, 19):
y=seq.locate(targetSequences[x])
if y[0]!=[]:
inds.append(y[0])
names.append(targetNames[x])
if y[1]!=[]:
inds.append(y[1])
names.append(targetNames[x])
print y
print seq.name
print names
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.