Exemple #1
0
def promoter_assemblies_build_more_than_384():
    utr_linkers = [
        "UTR1-RBS1",
        "UTR1-RBS2",
        "UTR1-RBS3",
        "UTR2-RBS1",
        "UTR2-RBS2",
        "UTR2-RBS3",
        "UTR3-RBS1",
        "UTR3-RBS2",
        "UTR3-RBS3",
    ]
    promoter_assemblies = []
    for utr_linker in utr_linkers:
        promoter_assemblies += [
            bsb.BasicAssembly(
                f"promoter_construct_{ind}_{utr_linker}",
                bsb.BASIC_SEVA_PARTS["v0.1"]["26"],
                bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMP"],
                promoter,
                bsb.BASIC_BIOLEGIO_LINKERS["v0.1"][utr_linker],
                bsb.BASIC_CDS_PARTS["v0.1"]["sfGFP"],
                bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMS"],
            ) for ind, promoter in enumerate(
                bsb.BASIC_PROMOTER_PARTS["v0.1"].values())
        ]
    return bsb.BasicBuild(*promoter_assemblies)
Exemple #2
0
def small_build_example():
    return bsb.BasicBuild(
        bsb.BasicAssembly(
            "First_Assembly_With_18",
            bsb.BASIC_SEVA_PARTS["v0.1"]["18"],
            bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMP"],
            bsb.BASIC_CDS_PARTS["v0.1"]["sfGFP"],
            bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMS"],
        ),
        bsb.BasicAssembly(
            "Second_Assembly_With_26",
            bsb.BASIC_SEVA_PARTS["v0.1"]["26"],
            bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMP"],
            bsb.BASIC_CDS_PARTS["v0.1"]["sfGFP"],
            bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMS"],
        ),
    )
Exemple #3
0
def five_part_assembly(five_part_assembly_parts, five_part_assembly_linkers):
    zipped_parts_linkers = zip(five_part_assembly_linkers,
                               five_part_assembly_parts)
    parts_linkers = []
    for part_linker in zipped_parts_linkers:
        parts_linkers += list(part_linker)
    print([part_linker.id for part_linker in parts_linkers])
    print([type(part_linker) for part_linker in parts_linkers])
    return bsb.BasicAssembly("5_part", *parts_linkers)
Exemple #4
0
def test_assembly_exception_same_utr_linker(cmr_p15a_basicpart, gfp_basicpart):
    from basicsynbio.main import AssemblyException

    with pytest.raises(
        AssemblyException, match="BasicAssembly initiated with UTR1-S used 2 times."
    ):
        bsb.BasicAssembly(
            "test",
            cmr_p15a_basicpart,
            bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["UTR1-RBS1"],
            gfp_basicpart,
            bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["UTR1-RBS2"],
        )
def build_json():
    promoter_assemblies = (bsb.BasicAssembly(
        f"promoter_construct_{ind}",
        bsb.BASIC_SEVA_PARTS["v0.1"]["26"],
        bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMP"],
        promoter,
        bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["UTR1-RBS2"],
        bsb.BASIC_CDS_PARTS["v0.1"]["sfGFP"],
        bsb.BASIC_BIOLEGIO_LINKERS["v0.1"]["LMS"],
    ) for ind, promoter in enumerate(bsb.BASIC_PROMOTER_PARTS["v0.1"].values())
                           )
    build = bsb.BasicBuild(*promoter_assemblies)
    return build
Exemple #6
0
def test_assembly_error(gfp_basicpart, cmr_p15a_basicpart):
    import basicsynbio.main as bsb_main

    with pytest.raises(bsb_main.AssemblyException):
        bsb.BasicAssembly("test", gfp_basicpart, cmr_p15a_basicpart)