class Plasmid(Sequence):
    AbResDict = {"Tet":"ctagcat","Amp":"CACTACTG"}
    def __init__(self,seqstring):
        Sequence.__init__(self,seqstring)
    def ABres(self,ab):
        if self.AbResDict[ab] in self.seqstring:
            return True
        else:
            return False

This code is part of the book "Python for Bioinformatics", by Sebastian Bassi (sbassi@genesdigitales.com). Return to home page.