def __init__( self, nucleotideContentObject=None, solution=None, label="", args={ 'ntcontent_range': (0, 9), 'mutable_region': None, 'cds_region': None, 'keep_aa': True }): if nucleotideContentObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.ntcontent_range = args['ntcontent_range'] self.sequence = solution.sequence[self.ntcontent_range[0]:self. ntcontent_range[1] + 1] self.mutable_region = args['mutable_region'] if args.has_key( 'mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key( 'cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key( 'keep_aa') else solution.keep_aa self.set_scores() self.set_level() else: Feature.__init__(self, nucleotideContentObject) self.ntcontent_range = nucleotideContentObject.ntcontent_range self.sequence = nucleotideContentObject.sequence self.mutable_region = nucleotideContentObject.mutable_region self.cds_region = nucleotideContentObject.cds_region self.keep_aa = nucleotideContentObject.keep_aa self.scores = nucleotideContentObject.scores
def __init__( self, caiObject=None, solution=None, label="", args={ 'cai_range': (0, 59), 'mutable_region': None, 'cds_region': None, 'keep_aa': True }): if caiObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.cai_range = args['cai_range'] self.sequence = solution.sequence[self.cai_range[0]:( self.cai_range[1] + 1)] self.mutable_region = args['mutable_region'] if args.has_key( 'mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key( 'cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key( 'keep_aa') else solution.keep_aa self.set_scores() self.set_level() else: #copy instance Feature.__init__(self, caiObject) self.cai_range = caiObject.cai_range self.sequence = caiObject.sequence self.mutable_region = caiObject.mutable_region self.cds_region = caiObject.cds_region self.keep_aa = caiObject.keep_aa self.codons_cai = caiObject.codons_cai self.scores = caiObject.scores
def __init__(self, motifObject=None, solution=None, label="", args = { 'pwm' : None, 'motif_range' : (0,9), 'mutable_region' : None, 'cds_region' : None, 'keep_aa' : True }): if motifObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.pwm = args['pwm'] self.motif_range = args['motif_range'] self.sequence = solution.sequence[self.motif_range[0]:self.motif_range[1]+1] self.mutable_region = [i-self.motif_range[0] for i in set(range(self.motif_range[0],self.motif_range[1]+1)) & set(args['mutable_region'])] if args.has_key('mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key('cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key('keep_aa') else solution.keep_aa self.set_scores() self.set_level() else: #copy instance Feature.__init__(self, solution=motifObject.solution, label=motifObject.label) self.pwm = motifObject.pwm self.motif_range = motifObject.motif_range self.sequence = motifObject.sequence self.mutable_region = motifObject.mutable_region self.cds_region = motifObject.cds_region self.keep_aa = motifObject.keep_aa self.scores = motifObject.scores
def __init__(self, structureObject = None, solution = None, label="", args = { 'structure_range' : (0,59), 'mutable_region' : None, 'cds_region' : None, 'keep_aa' : True }): if structureObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.structurefile = solution.solid + label self.structure_range = args['structure_range'] self.sequence = solution.sequence[self.structure_range[0]:(self.structure_range[1]+1)] self.mutable_region = args['mutable_region'] if args.has_key('mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key('cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key('keep_aa') else solution.keep_aa self.set_scores() self.set_level() else: #copy instance Feature.__init__(self, structureObject) self.structurefile = structureObject.structurefile self.structure_range = structureObject.structure_range self.sequence = structureObject.sequence self.mutable_region = structureObject.mutable_region self.cds_region = structureObject.cds_region self.keep_aa = structureObject.keep_aa self.scores = structureObject.scores
def __init__(self, bottleneckObject=None, solution=None, label="", args={ 'bottleneck_range': (0, 59), 'mutable_region': None, 'keep_aa': True }): if bottleneckObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.bottleneck_range = args['bottleneck_range'] self.sequence = solution.sequence[self.bottleneck_range[0]:self. bottleneck_range[1] + 1] self.mutable_region = args['mutable_region'] if args.has_key( 'mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key( 'cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key( 'keep_aa') else solution.keep_aa self.set_scores() self.set_level() self.calculate_mutable_segments() else: #copy instance Feature.__init__(self, bottleneckObject) self.bottleneck_range = bottleneckObject.bottleneck_range self.sequence = bottleneckObject.sequence self.mutable_region = bottleneckObject.mutable_region self.keep_aa = bottleneckObject.keep_aa self.segmentMutation = bottleneckObject.segmentMutation self.bot_scores = bottleneckObject.bot_scores self.bot_smooth = bottleneckObject.bot_smooth self.scores = bottleneckObject.scores
def __init__(self, bottleneckObject = None, solution= None, label="", args = { 'bottleneck_range' : (0,59), 'mutable_region' : None , 'keep_aa' : True}): if bottleneckObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.bottleneck_range = args['bottleneck_range'] self.sequence = solution.sequence[self.bottleneck_range[0]:self.bottleneck_range[1]+1] self.mutable_region = args['mutable_region'] if args.has_key('mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key('cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key('keep_aa') else solution.keep_aa self.set_scores() self.set_level() self.calculate_mutable_segments() else: #copy instance Feature.__init__(self, bottleneckObject) self.bottleneck_range = bottleneckObject.bottleneck_range self.sequence = bottleneckObject.sequence self.mutable_region = bottleneckObject.mutable_region self.keep_aa = bottleneckObject.keep_aa self.segmentMutation = bottleneckObject.segmentMutation self.bot_scores = bottleneckObject.bot_scores self.bot_smooth = bottleneckObject.bot_smooth self.scores = bottleneckObject.scores
def __init__( self, structureObject=None, solution=None, label="", args={ 'structure_range': (0, 59), 'acc_region': [], 'window': 50, 'mutable_region': None, 'cds_region': None, 'keep_aa': True }): #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.structurefile = solution.solid + label self.structure_range = args['structure_range'] self.acc_region = args['acc_region'] if args.has_key( 'acc_region') else [] self.window = args['window'] if args.has_key('window') else 50 self.sequence = solution.sequence[self.structure_range[0]:( self.structure_range[1] + 1)] self.mutable_region = args['mutable_region'] if args.has_key( 'mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key( 'cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key( 'keep_aa') else solution.keep_aa self.set_scores() self.set_level()
def __init__(self, duplexObject=None, solution1=None, solution2=None, label="", args={ 'rnaMolecule1region': None, 'rnaMolecule2region': None }): if duplexObject == None: #General properties of feature Feature.__init__(self, solution=solution1, label=label) #Specifics of this Feature self.solution = solution1 self.solution2 = solution2 self.duplexFile = str(solution1.solid) + '-' + str( solution2.solid) + label self.rnaMolecule1region = args['rnaMolecule1region'] self.rnaMolecule1seq = self.solution.sequence[ self.rnaMolecule1region[0]:(self.rnaMolecule1region[1] + 1)] self.mutable_region = args['mutable_region1'] if args.has_key( 'mutable_region1') else None self.cds_regions = args['cds_regions1'] if args.has_key( 'cds_regions1') else None self.keep_aa = args['keep_aa1'] if args.has_key( 'keep_aa1') else False self.rnaMolecule2region = args['rnaMolecule2region'] self.rnaMolecule2seq = self.solution2.sequence[ self.rnaMolecule2region[0]:(self.rnaMolecule2region[1] + 1)] self.mutable_region2 = args['mutable_region2'] if args.has_key( 'mutable_region2') else None self.cds_regions2 = args['cds_regions2'] if args.has_key( 'cds_regions2') else None self.keep_aa2 = args['keep_aa2'] if args.has_key( 'keep_aa2') else False self.set_scores() self.set_level() else: #General properties of feature Feature.__init__(self, duplexObject) #Specifics of this Feature self.solution = duplexObject.solution self.solution2 = duplexObject.solution2 self.duplexFile = duplexObject.duplexFile self.rnaMolecule1region = duplexObject.rnaMolecule1region self.rnaMolecule1seq = duplexObject.rnaMolecule1seq self.mutable_region = duplexObject.mutable_region self.cds_regions = duplexObject.cds_regions self.keep_aa = duplexObject.keep_aa self.rnaMolecule2region = duplexObject.rnaMolecule2region self.rnaMolecule2seq = duplexObject.rnaMolecule2seq self.mutable_region2 = duplexObject.mutable_region2 self.cds_regions2 = duplexObject.cds_regions2 self.keep_aa2 = duplexObject.keep_aa2 self.scores = duplexObject.scores
def __init__( self, motifObject=None, solution=None, label="", args={ 'pwm': None, 'motif_range': (0, 9), 'mutable_region': None, 'cds_region': None, 'keep_aa': True }): if motifObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.pwm = args['pwm'] self.motif_range = args['motif_range'] self.sequence = solution.sequence[self.motif_range[0]:self. motif_range[1] + 1] self.mutable_region = [ i - self.motif_range[0] for i in set(range(self.motif_range[0], self.motif_range[1] + 1)) & set(args['mutable_region']) ] if args.has_key('mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key( 'cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key( 'keep_aa') else solution.keep_aa self.set_scores() self.set_level() else: #copy instance Feature.__init__(self, solution=motifObject.solution, label=motifObject.label) self.pwm = motifObject.pwm self.motif_range = motifObject.motif_range self.sequence = motifObject.sequence self.mutable_region = motifObject.mutable_region self.cds_region = motifObject.cds_region self.keep_aa = motifObject.keep_aa self.scores = motifObject.scores
def __init__(self, structureObject = None, solution = None, label="", args = { 'structure_range' : (0,59), 'acc_region' : [], 'window' : 50, 'mutable_region' : None, 'cds_region' : None, 'keep_aa' : True }): #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.structurefile = solution.solid + label self.structure_range = args['structure_range'] self.acc_region = args['acc_region'] if args.has_key('acc_region') else [] self.window = args['window'] if args.has_key('window') else 50 self.sequence = solution.sequence[self.structure_range[0]:(self.structure_range[1]+1)] self.mutable_region = args['mutable_region'] if args.has_key('mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key('cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key('keep_aa') else solution.keep_aa self.set_scores() self.set_level()
def __init__(self, duplexObject=None, solution1=None, solution2=None, label="", args = { 'rnaMolecule1region' : None, 'rnaMolecule2region' : None }): if duplexObject == None: #General properties of feature Feature.__init__(self, solution=solution1, label=label) #Specifics of this Feature self.solution = solution1 self.solution2 = solution2 self.duplexFile = str(solution1.solid) + '-' + str(solution2.solid) + label self.rnaMolecule1region = args['rnaMolecule1region'] self.rnaMolecule1seq = self.solution.sequence[self.rnaMolecule1region[0]:(self.rnaMolecule1region[1]+1)] self.mutable_region = args['mutable_region1'] if args.has_key('mutable_region1') else None self.cds_regions = args['cds_regions1'] if args.has_key('cds_regions1') else None self.keep_aa = args['keep_aa1'] if args.has_key('keep_aa1') else False self.rnaMolecule2region = args['rnaMolecule2region'] self.rnaMolecule2seq = self.solution2.sequence[self.rnaMolecule2region[0]:(self.rnaMolecule2region[1]+1)] self.mutable_region2 = args['mutable_region2'] if args.has_key('mutable_region2') else None self.cds_regions2 = args['cds_regions2'] if args.has_key('cds_regions2') else None self.keep_aa2 = args['keep_aa2'] if args.has_key('keep_aa2') else False self.set_scores() self.set_level() else: #General properties of feature Feature.__init__(self, duplexObject) #Specifics of this Feature self.solution = duplexObject.solution self.solution2 = duplexObject.solution2 self.duplexFile = duplexObject.duplexFile self.rnaMolecule1region = duplexObject.rnaMolecule1region self.rnaMolecule1seq = duplexObject.rnaMolecule1seq self.mutable_region = duplexObject.mutable_region self.cds_regions = duplexObject.cds_regions self.keep_aa = duplexObject.keep_aa self.rnaMolecule2region = duplexObject.rnaMolecule2region self.rnaMolecule2seq = duplexObject.rnaMolecule2seq self.mutable_region2 = duplexObject.mutable_region2 self.cds_regions2 = duplexObject.cds_regions2 self.keep_aa2 = duplexObject.keep_aa2 self.scores = duplexObject.scores
def __init__(self, nucleotideContentObject = None, solution=None, label="", args = { 'ntcontent_range' : (0,9), 'mutable_region' : None, 'cds_region' : None, 'keep_aa' : True }): if nucleotideContentObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.ntcontent_range = args['ntcontent_range'] self.sequence = solution.sequence[self.ntcontent_range[0]:self.ntcontent_range[1]+1] self.mutable_region = args['mutable_region'] if args.has_key('mutable_region') else solution.mutable_region self.cds_region = args['cds_region'] if args.has_key('cds_region') else solution.cds_region self.keep_aa = args['keep_aa'] if args.has_key('keep_aa') else solution.keep_aa self.set_scores() self.set_level() else: Feature.__init__(self, nucleotideContentObject) self.ntcontent_range = nucleotideContentObject.ntcontent_range self.sequence = nucleotideContentObject.sequence self.mutable_region = nucleotideContentObject.mutable_region self.cds_region = nucleotideContentObject.cds_region self.keep_aa = nucleotideContentObject.keep_aa self.scores = nucleotideContentObject.scores
def __init__( self, structureObject=None, solution=None, label="", args={ 'structure_range': (0, 59), 'mutable_region': None, 'cds_region': None, 'keep_aa': True }): if structureObject == None: #create new instance #General properties of feature Feature.__init__(self, solution=solution, label=label) #Specifics of this Feature self.structurefile = solution.solid + label self.structure_range = args['structure_range'] self.sequence = solution.sequence[self.structure_range[0]:( self.structure_range[1] + 1)] self.mutable_region = args[ 'mutable_region'] if 'mutable_region' in args else solution.mutable_region self.cds_region = args[ 'cds_region'] if 'cds_region' in args else solution.cds_region self.keep_aa = args[ 'keep_aa'] if 'keep_aa' in args else solution.keep_aa self.set_scores() self.set_level() else: #copy instance Feature.__init__(self, structureObject) self.structurefile = structureObject.structurefile self.structure_range = structureObject.structure_range self.sequence = structureObject.sequence self.mutable_region = structureObject.mutable_region self.cds_region = structureObject.cds_region self.keep_aa = structureObject.keep_aa self.scores = structureObject.scores
def mutate(self): return Feature.randomMutation(self, mutable_region=self.mutable_region)