예제 #1
0
def test_genbank_function_set_email(monkeypatch):
    from pydna.genbank import Genbank
    mock_Gb = mock.MagicMock()
    monkeypatch.setenv("pydna_cached_funcs", "")
    monkeypatch.setenv("pydna_email", "*****@*****.**")
    monkeypatch.setattr("pydna.genbank.Genbank", mock_Gb)
    from pydna.genbank import genbank
    s=genbank("X60065")
    mock_Gb.assert_called_with("*****@*****.**")
예제 #2
0
from pydna.genbank  import genbank
from pydna.design   import primer_design
from pydna.amplify  import pcr
from pydna.readers  import read
from pydna.parsers  import parse_primers
from pydna.assembly import Assembly
from pydna.gel      import Gel

###############################################################################

saat = genbank("AF193791 REGION: 78..1895")

saat_pcr_prod = primer_design(saat)

pYPKa=read("pYPKa.gb")

from Bio.Restriction import AjiI

pYPKa_AjiI = pYPKa.linearize(AjiI)

pYPKa_A_saat = ( pYPKa_AjiI + saat_pcr_prod ).looped()

pYPKa_Z_prom = read("pYPKa_Z_TEF1.gb")

pYPKa_E_term = read("pYPKa_E_TPI1.gb")

p567,p577,p468,p467,p568,p578  =  parse_primers('''

>567_pCAPsAjiIF (23-mer)
GTcggctgcaggtcactagtgag
>577_crp585-557 (29-mer)
예제 #3
0
pYPKa = read("pYPKa.gb")

pYPKa_Z = pYPKa.linearize(ZraI)
pYPKa_A = pYPKa.linearize(AjiI)
pYPKa_E = pYPKa.linearize(EcoRV)

bbdict = {"Z": pYPKa_Z, "A": pYPKa_A, "E": pYPKa_E}
fdict = {"Z": "promoter", "A": "gene", "E": "terminator"}

csvfile = "promoter_list_003.csv"
with open(csvfile) as csvfile:
    reader = csv.reader(csvfile)
    for row in reader:
        ins, letter, pf, pr, template, comment = row

        temp = genbank(template)

        insert = pcr(p[int(pf)], p[int(pr)], temp)

        label = f"{ins}_promoter"

        if letter == "Z":

            insert.add_feature(type="promoter",
                               name=label,
                               ApEinfo_label=label,
                               ApEinfo_fwdcolor="#FC6600",
                               ApEinfo_revcolor="#7C4700",
                               fp=p[int(pf)].format("tab").strip(),
                               rp=p[int(pr)].format("tab").strip(),
                               reference=template)