Code Monkey home page Code Monkey logo

coral's People

Contributors

eyu-boltthreads avatar jvrana avatar nbolten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coral's Issues

Cython has to be run manually

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.

ubuntu-22.04-python3

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]

.locate doesn't seem to be working properly with the seqio.read_sequencing command

.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')

seq commented out below is the would be manually entered sequence

seq=cr.DNA("NNNNNNNNNNNNNNNGNTTTCNGTATAATGTTACATGCGTACACGCGTCTGTACAGAAAAAAAAGAAAAATTTGAAATATAANTAACGTTCTTAATACTAACATAACTATAAAAAAATAAATAGGGACCTAGACTTCAGGTTGTCTAACTCCTTCCTTTTCGGTTAGAGCGGATGTGGGGGGAGGGCGTGAATGTAAGCGTGACATAACTAATTGACTCGAGGTCGACGGTATCAGTCCCATTCGCCATGCCGAAGCATGTTGCCCAGCCGGCGCCAGCGAGGAGGCTGGGACCATGCCGGCCAAAAGCACCGACTCGGTGCCACTTTTTCAAGTTGATAACGGACTAGCCTTATTTTAACTTGCTATTTCTAGCTCTAAAACAAGTTATTCAATCACGTTCCGACGAGCTTACTCGTTTCGTCCTCACGGACTCATCAGGGAACGTTTGTAGATCCACTAGTTCTAGAATCCAATATCTAGATTAGTGTGTGTATTTGTGTTTGTGTGTCTATAGAAGTATAGTAATTTATGCGGAACGTGATTGAATAACTTAGGAAAGAATATTTAGAGAAAAGAAGAAAACAAGAGTTTTATATACATACAGAGCACATGCATGCCAAAGTTTGAATAGGAAATGCGATACAGTACCCGGGCTGCAGGAATTTACTTATTAGTCAAGTAGGGGAATAATTTCAGGGAACTGGTTTCAACCTTTTTTTTCAGCTTTTTCCAAATCAGAGAGAGCAGAAGGTAATAGAAGGTGTAAGAAAATGAGATAGATACATGCGTGGGTCAATTGCCTTGTGTCATCATTTACTCCAGGCAGGTTGCATCACTCCATTGAGGTTGTGCCCGTTTTTTGCCTGTTTGTGCCCCTGTTCTCTGTAGTTGCGCTAAGAGAATGGACCTATGAACTGATGGTTGGTGAAGAAAACAATATTTTGGTGCTGGGATTCTTTTTTTTTTCTGGATGCCAGCTTAAAAAGCGGGCTCCATTATATTTAGTGGNNGCCAGGGAATAAACTGTNCACCCANACACCTACGATGTTANATATTCTGTGNANCCCNNCCCCCCTNNTTTTGGGGCATGTANNNNNNACANNNNNNNNAAANGNTAANTTTTTNNNCTAAATAAANNNNNAAAATCNNNNNCTNNTTNNNNNTTTACNNNNNNNNNNNANNNNNNNNNNNANNNNNANNNNNNNNNNCTTTTNCNNNNNCTGNNNNAANNNNNNNNN")

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

Primer dimer amplification error

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)

Restriction sites containing ambiguous bases do not digest targets

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')

Can't anneal a primer longer than the template

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.