Exemplo n.º 1
0
def test_no_alignment_flip():
    seq = ( 
"MGKLVALVLLGVGLSLVGEMFLAFRERVNASREVEPVEPENCHLIEELESGSEDIDILPSGLAFISSGLKYP" +
"GMPNFAPDEPGKIFLMDLNEQNPRAQALEISGGFDKELFNPHGISIFIDKDNTVYLYVVNHPHMKSTVEIFK" +
"FEEQQRSLVYLKTIKHELLKSVNDIVVLGPEQFYATRDHYFTNSLLSFFEMILDLRWTYVLFYSPREVKVVA" +
"KGFCSANGITVSADQKYVYVADVAAKNIHIMEKHDNWDLTQLKVIQLGTLVDNLTVDPATGDILAGCHPNPM" +
"KLLNYNPEDPPGSEVLRIQNVLSEKPRVSTVYANNGSVLQGTSVASVYHGKILIGTVFHKTLYCEL")

    species_id = 'human'

    range_ = SequenceRange(183, 265, seq)
    template_id = TemplateID('4zrn', 'A')
    alignment = DomainAlignment(
"YFTNSLLSFFEMILDLRWT---YVLFYSPRE-----VKVVA---KGFCSANGITVSAD-Q--K-YVYVADVAAKNIHIMEKHDNWDLTQLKVIQLGT",
"YSTEMYLEFFAREYGLKYTVLRYANVYGPRQDPYGEAGVVAIFTERMLRGEEVHIFGDGEYVRDYVYVDDVVRANLLAMEKGDN------EVFNIGT",
                        range_, template_id)

    context = modeler._prepare_context(alignment.template_id.pdbid)
    context.set_main_target(seq, species_id, alignment.template_id.chain_id)

    chain_alignments = modeler._make_alignments(seq, species_id, alignment, context, None)
    for chain_id in chain_alignments:

        _log.debug("got alignment {}: {}".format(chain_id, chain_alignments[chain_id]))
        ok_(chain_alignments[chain_id].target_alignment.replace('-','') in seq)
Exemplo n.º 2
0
def test_no_alignment_flip():
    seq = ( 
"MGKLVALVLLGVGLSLVGEMFLAFRERVNASREVEPVEPENCHLIEELESGSEDIDILPSGLAFISSGLKYP" +
"GMPNFAPDEPGKIFLMDLNEQNPRAQALEISGGFDKELFNPHGISIFIDKDNTVYLYVVNHPHMKSTVEIFK" +
"FEEQQRSLVYLKTIKHELLKSVNDIVVLGPEQFYATRDHYFTNSLLSFFEMILDLRWTYVLFYSPREVKVVA" +
"KGFCSANGITVSADQKYVYVADVAAKNIHIMEKHDNWDLTQLKVIQLGTLVDNLTVDPATGDILAGCHPNPM" +
"KLLNYNPEDPPGSEVLRIQNVLSEKPRVSTVYANNGSVLQGTSVASVYHGKILIGTVFHKTLYCEL")

    species_id = 'human'

    range_ = SequenceRange(183, 265, seq)
    template_id = TemplateID('4zrn', 'A')
    alignment = DomainAlignment(
"YFTNSLLSFFEMILDLRWT---YVLFYSPRE-----VKVVA---KGFCSANGITVSAD-Q--K-YVYVADVAAKNIHIMEKHDNWDLTQLKVIQLGT",
"YSTEMYLEFFAREYGLKYTVLRYANVYGPRQDPYGEAGVVAIFTERMLRGEEVHIFGDGEYVRDYVYVDDVVRANLLAMEKGDN------EVFNIGT",
                        range_, template_id)

    context = modeler._prepare_context(alignment.template_id.pdbid)
    context.set_main_target(seq, species_id, alignment.template_id.chain_id)

    chain_alignments = modeler._make_alignments(seq, species_id, alignment, context, None)
    for chain_id in chain_alignments:

        _log.debug("got alignment {}: {}".format(chain_id, chain_alignments[chain_id]))
        ok_(chain_alignments[chain_id].target_alignment.replace('-','') in seq)
Exemplo n.º 3
0
def test_align_with_repeats():
    sequence = """MRRGRLLEIALGFTVLLASYTSHGADANLEAGNVKETRASRAKRRGGGGHD
ALKGPNVCGSRYNAYCCPGWKTLPGGNQCIVPICRHSCGDGFCSRPNMCTCPSGQIAPSCGSRSIQHCN
IRCMNGGSCSDDHCLCQKGYIGTHCGQPVCESGCLNGGRCVAPNRCACTYGFTGPQCERDYRTGPCFTV
ISNQMCQGQLSGIVCTKTLCCATVGRAWGHPCEMCPAQPHPCRRGFIPNIRTGACQDVDECQAIPGLCQ
GGNCINTVGSFECKCPAGHKLNEVSQKCEDIDECSTIPGICEGGECTNTVSSYFCKCPPGFYTSPDGTR
CIDVRPGYCYTALTNGRCSNQLPQSITKMQCCCDAGRCWSPGVTVAPEMCPIRATEDFNKLCSVPMVIP
GRPEY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CPQGYLQHYQWNQ
CVDENECLSAHICGGASCHNTLGSYKCMCPAGFQYEQFSGGCQDINECGSAQAPCSYGCSNTEGGYLCG
CPPGYFRIGQGHCVSGMGMGRGNPEPPVSGEMDDNSLSPEACYECKINGYPKRGRKRRSTNETDASNIE
DQSETEANVSLASWDVEKTAIFAFNISHVSNKVRILELLPALTTLTNHNRYLIESGNEDGFFKINQKEG
ISYLHFTKKKPVAGTYSLQISSTPLYKKKELNQLEDKYDKDYLSGELGDNLKMKIQVLLH
""".replace('\n','')

    template_id = TemplateID('2w86', 'A')

    residue_number = 545

    domain_alignments = domain_aligner.get_domain_alignments(sequence, residue_number, template_id)
    domain_alignment = select_best_domain_alignment(domain_alignments)

    context = modeler._prepare_context(template_id.pdbid)
    context.set_main_target(sequence, 'HUMAN', template_id.chain_id)

    alignments = modeler._make_alignments(sequence, 'HUMAN', domain_alignment, context, residue_number)
    alignment = alignments[template_id.chain_id]

    ok_(alignment.is_target_residue_covered(residue_number))
Exemplo n.º 4
0
def test_align_with_repeats():
    sequence = """MRRGRLLEIALGFTVLLASYTSHGADANLEAGNVKETRASRAKRRGGGGHD
ALKGPNVCGSRYNAYCCPGWKTLPGGNQCIVPICRHSCGDGFCSRPNMCTCPSGQIAPSCGSRSIQHCN
IRCMNGGSCSDDHCLCQKGYIGTHCGQPVCESGCLNGGRCVAPNRCACTYGFTGPQCERDYRTGPCFTV
ISNQMCQGQLSGIVCTKTLCCATVGRAWGHPCEMCPAQPHPCRRGFIPNIRTGACQDVDECQAIPGLCQ
GGNCINTVGSFECKCPAGHKLNEVSQKCEDIDECSTIPGICEGGECTNTVSSYFCKCPPGFYTSPDGTR
CIDVRPGYCYTALTNGRCSNQLPQSITKMQCCCDAGRCWSPGVTVAPEMCPIRATEDFNKLCSVPMVIP
GRPEYPPPPLGPIPPVLPVPPGFPPGPQIPVPRPPVEYLYPSREPPRVLPVNVTDYCQLVRYLCQNGRC
IPTPGSYRCECNKGFQLDLRGECIDVDECEKNPCAGGEC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RGNPEPPVSGEMDDNSLSPEACYECKINGYPKRGRKRRSTNETDASNIE
DQSETEANVSLASWDVEKTAIFAFNISHVSNKVRILELLPALTTLTNHNRYLIESGNEDGFFKINQKEG
ISYLHFTKKKPVAGTYSLQISSTPLYKKKELNQLEDKYDKDYLSGELGDNLKMKIQVLLH
""".replace('\n','')

    template_id = TemplateID('2w86', 'A')

    residue_number = 545

    domain_alignments = domain_aligner.get_domain_alignments(sequence, residue_number, template_id)
    domain_alignment = select_best_domain_alignment(domain_alignments)

    context = modeler._prepare_context(template_id.pdbid)
    context.set_main_target(sequence, 'HUMAN', template_id.chain_id)

    alignments = modeler._make_alignments(sequence, 'HUMAN', domain_alignment, context, residue_number)
    alignment = alignments[template_id.chain_id]

    ok_(alignment.is_target_residue_covered(residue_number))
Exemplo n.º 5
0
def test_align_filamin():
    sequence = """
MSSSHSRAGQSAAGAAPGGGVDTRDAEMPATEKDLAEDAPWKKIQQNTFTRWCNEHLKCVSKRIANLQTDLS
DGLRLIALLEVLSQKKMHRKHNQRPTFRQMQLENVSVALEFLDRESIKLVSIDSKAIVDGNLKLILGLIWTL
ILHYSISMPMWDEEEDEEAKKQTPKQRLLGWIQNKLPQLPITNFSRDWQSGRALGALVDSCAPGLCPDWDSW
DASKPVTNAREAMQQADDWLGIPQVITPEEIVDPNVDEHSVMTYLSQFPKAKLKPGAPLRPKLNPKKARAYG
PGIEPTGNMVKKRAEFTVETRSAGQGEVLVYVEDPAGHQEEAKVTANNDKNRTFSVWYVPEVTGTHKVTVLF
AGQHIAKSPFEVYVDKSQGDASKVTAQGPGLEPSGNIANKTTYFEIFTAGAGTGEVEVVIQDPMGQKGTVEP
QLEARGDSTYRCSYQPTMEGVHTVHVTFAGVPIPRSPYTVTVGQACNPSACRAVGRGLQPKGVRVKETADFK
VYTKGAGSGELKVTVKGPKGEERVKQKDLGDGVYGFEYYPMVPGTYIVTITWGGQNIGRSPFEVKVGTECGN
QKVRAWGPGLEGGVVGKSADFVVEAIGDDVGT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GAGIGPTIQIGEETVITVDTKAAGKGKVTCTVCTPDGSEVDVDVVENEDGTFDIFYTAPQPGKYVICVRFGG
EHVPNSPFQVTALAGDQPSVQPPLRSQQLAPQYTYAQGGQQTWAPERPLVGVNGLDVTSLRPFDLVIPFTIK
KGEITGEVRMPSGKVAQPTITDNKDGTVTVRYAPSEAGLHEMDIRYDNMHIPGSPLQFYVDYVNCGHVTAYG
PGLTHGVVNKPATFTVNTKDAGEGGLSLAIEGPSKAEISCTDNQDGTCSVSYLPVLPGDYSILVKYNEQHVP
GSPFTARVTGDDSMRMSHLKVGSAADIPINISETDLSLLTATVVPPSGREEPCLLKRLRNGHVGISFVPKET
GEHLVHVKKNGQHVASSPIPVVISQSEIGDASRVRVSGQGLHEGHTFEPAEFIIDTRDAGYGGLSLSIEGPS
KVDINTEDLEDGTCRVTYCPTEPGNYIINIKFADQHVPGSPFSVKVTGEGRVKESITRRRRAPSVANVGSHC
DLSLKIPEISIQDMTAQVTSPSGKTHEAEIVEGENHTYCIRFVPAEMGTHTVSVKYKGQHVPGSPFQFTVGP
LGEGGAHKVRAGGPGLERAEAGVPAEFSIWTREAGAGGLAIAVEGPSKAEISFEDRKDGSCGVAYVVQEPGD
YEVSVKFNEEHIPDSPFVVPVASPSGDARRLTVSSLQESGLKVNQPASFAVSLNGAKGAIDAKVHSPSGALE
ECYVTEIDQDKYAVRFIPRENGVYLIDVKFNGTHIPGSPFKIRVGEPGHGGDPGLVSAYGAGLEGGVTGNPA
EFVVNTSNAGAGALSVTIDGPSKVKMDCQECPEGYRVTYTPMAPGSYLISIKYGGPYHIGGSPFKAKVTGPR
LVSNHSLHETSSVFVDSLTKATCAPQHGAPGPGPADASKVVAKGLGLSKAYVGQKSSFTVDCSKAGNNMLLV
GVHGPRTPCEEILVKHVGSRLYSVSYLLKDKGEYTLVVKWGDEHIPGSPYRVVVP
""".replace('\n','')

    template_id = TemplateID('4M9P', 'A')

    residue_number = 429

    domain_alignments = domain_aligner.get_domain_alignments(sequence, residue_number, template_id)
    ok_(len(domain_alignments) > 0)
    domain_alignment = select_best_domain_alignment(domain_alignments)

    context = modeler._prepare_context(template_id.pdbid)
    context.set_main_target(sequence, 'HUMAN', template_id.chain_id)

    alignments = modeler._make_alignments(sequence, 'HUMAN', domain_alignment, context, residue_number)
    alignment = alignments[template_id.chain_id]

    _log.debug("alignment is {}".format(alignment))

    ok_(alignment.is_target_residue_covered(residue_number))
Exemplo n.º 6
0
def test_align_filamin():
    sequence = """
MSSSHSRAGQSAAGAAPGGGVDTRDAEMPATEKDLAEDAPWKKIQQNTFTRWCNEHLKCVSKRIANLQTDLS
DGLRLIALLEVLSQKKMHRKHNQRPTFRQMQLENVSVALEFLDRESIKLVSIDSKAIVDGNLKLILGLIWTL
ILHYSISMPMWDEEEDEEAKKQTPKQRLLGWIQNKLPQLPITNFSRDWQSGRALGALVDSCAPGLCPDWDSW
DASKPVTNAREAMQQADDWLGIPQVITPEEIVDPNVDEHSVMTYLSQFPKAKLKPGAPLRPKLNPKKARAYG
PGIEPTGNMVKKRAEFTVETRSAGQGEVLVYVEDPAGHQEEAKVTANNDKNRTFSVWYVPEVTGTHKVTVLF
AGQHIAKSPFEVYVDKSQGDASKVTAQGPGLEPSGNIANKTTYFEIFTAGAGTGEVEVVIQDPMGQKGTVEP
QLEARGDSTYRCSYQPTMEGVHTVHVTFAGVPIPRSPYTVTVGQACNPSACRAVGRGLQPKGVRVKETADFK
VYTKGAGSGELKVTVKGPKGEERVKQKDLGDGVYGFEYYPMVPGTYIVTITWGGQNIGRSPFEVKVGTECGN
QKVRAWGPGLEGGVVGKSADFVVEAIGDDVGTLGFSVEGPSQAKIECDDKGDGSCDVRYWPQEAGEYAVHVL
CNSEDIRLSPFMADIRDAPQDFHPDRVKARGPGLEKTGVAVNKPAEFTVDAKHGGKAPLRVQVQDNEGCPVE
ALVKDNGNGTYSCSYVPRKPVKHTAMVSWGGVSIPNSPFRVNVGAGSHPNKVKVYGPGVAKTGLKAHEPTYF
TVDCAE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GSPLQFYVDYVNCGHVTAYG
PGLTHGVVNKPATFTVNTKDAGEGGLSLAIEGPSKAEISCTDNQDGTCSVSYLPVLPGDYSILVKYNEQHVP
GSPFTARVTGDDSMRMSHLKVGSAADIPINISETDLSLLTATVVPPSGREEPCLLKRLRNGHVGISFVPKET
GEHLVHVKKNGQHVASSPIPVVISQSEIGDASRVRVSGQGLHEGHTFEPAEFIIDTRDAGYGGLSLSIEGPS
KVDINTEDLEDGTCRVTYCPTEPGNYIINIKFADQHVPGSPFSVKVTGEGRVKESITRRRRAPSVANVGSHC
DLSLKIPEISIQDMTAQVTSPSGKTHEAEIVEGENHTYCIRFVPAEMGTHTVSVKYKGQHVPGSPFQFTVGP
LGEGGAHKVRAGGPGLERAEAGVPAEFSIWTREAGAGGLAIAVEGPSKAEISFEDRKDGSCGVAYVVQEPGD
YEVSVKFNEEHIPDSPFVVPVASPSGDARRLTVSSLQESGLKVNQPASFAVSLNGAKGAIDAKVHSPSGALE
ECYVTEIDQDKYAVRFIPRENGVYLIDVKFNGTHIPGSPFKIRVGEPGHGGDPGLVSAYGAGLEGGVTGNPA
EFVVNTSNAGAGALSVTIDGPSKVKMDCQECPEGYRVTYTPMAPGSYLISIKYGGPYHIGGSPFKAKVTGPR
LVSNHSLHETSSVFVDSLTKATCAPQHGAPGPGPADASKVVAKGLGLSKAYVGQKSSFTVDCSKAGNNMLLV
GVHGPRTPCEEILVKHVGSRLYSVSYLLKDKGEYTLVVKWGDEHIPGSPYRVVVP
""".replace('\n','')

    template_id = TemplateID('4M9P', 'A')

    residue_number = 429

    domain_alignments = domain_aligner.get_domain_alignments(sequence, residue_number, template_id)
    ok_(len(domain_alignments) > 0)
    domain_alignment = select_best_domain_alignment(domain_alignments)

    context = modeler._prepare_context(template_id.pdbid)
    context.set_main_target(sequence, 'HUMAN', template_id.chain_id)

    alignments = modeler._make_alignments(sequence, 'HUMAN', domain_alignment, context, residue_number)
    alignment = alignments[template_id.chain_id]

    _log.debug("alignment is {}".format(alignment))

    ok_(alignment.is_target_residue_covered(residue_number))
Exemplo n.º 7
0
def test_align_rab3d():
    sequence = "MDEDVLTTLKILIIGESGVGKSSLLLRFTDDTFDPELAATIGVDFKVKTISVDGN" + \
"KAKLAIWVTLHQQTANFFLKSQIGNSPILKWAMWQYDTAGQERFRTLTPSYYRGAQGVILVYDVTRRDTF" + \
"VKLDNWLNELETYCTRNDIVNMLVGNKIDKENREVDRNEGLKFARKHSMLFIEASAKTCDGVQCAFEELV" + \
"EKIIQTPGLWESENQNKGVKLSHREEGQGGGACGGYCSVL"

    template_id = TemplateID('2GF9', 'A')

    residue_number = 70

    domain_alignments = domain_aligner.get_domain_alignments(sequence, residue_number, template_id)
    if len(domain_alignments) > 0:
        domain_alignment = select_best_domain_alignment(domain_alignments)

        context = modeler._prepare_context(template_id.pdbid)
        context.set_main_target(sequence, 'HUMAN', template_id.chain_id)

        alignments = modeler._make_alignments(sequence, 'HUMAN', domain_alignment, context, residue_number)
        alignment = alignments[template_id.chain_id]

        ok_(alignment.is_target_residue_covered(residue_number))
Exemplo n.º 8
0
def test_align_rab3d():
    sequence = "MDEDVLTTLKILIIGESGVGKSSLLLRFTDDTFDPELAATIGVDFKVKTISVDGN" + \
"KAKLAIWVTLHQQTANFFLKSQIGNSPILKWAMWQYDTAGQERFRTLTPSYYRGAQGVILVYDVTRRDTF" + \
"VKLDNWLNELETYCTRNDIVNMLVGNKIDKENREVDRNEGLKFARKHSMLFIEASAKTCDGVQCAFEELV" + \
"EKIIQTPGLWESENQNKGVKLSHREEGQGGGACGGYCSVL"

    template_id = TemplateID('2GF9', 'A')

    residue_number = 70

    domain_alignments = domain_aligner.get_domain_alignments(sequence, residue_number, template_id)
    if len(domain_alignments) > 0:
        domain_alignment = select_best_domain_alignment(domain_alignments)

        context = modeler._prepare_context(template_id.pdbid)
        context.set_main_target(sequence, 'HUMAN', template_id.chain_id)

        alignments = modeler._make_alignments(sequence, 'HUMAN', domain_alignment, context, residue_number)
        alignment = alignments[template_id.chain_id]

        ok_(alignment.is_target_residue_covered(residue_number))