3d-dart/server/plugins/ModelNucleicAcids.py
def _GlobalVariation(self,base,value,sd,variance,scale,smooth=None):
		
		"""Apply variance to the parameter in a weighted manner. More conserved values (measured as amound of variation based on sd) will be introduced
		   with a larger frequency then less conserved parameters. The smoothing factor determines the final value"""
		
		value = array(value)
		sd = array(sd)
		base = array(base)
			
		tsd = array([std(value[1:len(value)])]*len(value))
		weight = (2-pow((sqrt(sd/tsd)),scale))*value
		
		if not smooth == None:
			tmp = []
			maxp = max(weight[1:len(weight)])*smooth 
			minp = min(weight[1:len(weight)])*((1.0-smooth)+1)
			for n in range(len(weight)):
				if weight[n] > maxp or weight[n] < minp:
					tmp.append(weight[n])
				else:
					tmp.append(base[n])
			return (base+(((tmp)-base)*variance)).tolist()
				
		return (base+(((weight)-base)*variance)).tolist()
Apply variance to the parameter in a weighted manner. More conserved values (measured as amound of variation based on sd) will be introduced
		   with a larger frequency then less conserved parameters. The smoothing factor determines the final value
Apply variance to the parameter in a weighted manner. More conserved values (measured as amound of variation based on sd) will be introduced
with a larger frequency then less conserved parameters. The smoothing factor determines the final value
Apply variance to the parameter in a weighted manner . More conserved values ( measured as amound of variation based on sd ) will be introduced with a larger frequency then less conserved parameters . The smoothing factor determines the final value
def _GlobalVariation(self,base,value,sd,variance,scale,smooth=None):
		value = array(value)
		sd = array(sd)
		base = array(base)
		tsd = array([std(value[1:len(value)])]*len(value))
		weight = (2-pow((sqrt(sd/tsd)),scale))*value
		if not smooth == None:
			tmp = []
			maxp = max(weight[1:len(weight)])*smooth 
			minp = min(weight[1:len(weight)])*((1.0-smooth)+1)
			for n in range(len(weight)):
				if weight[n] > maxp or weight[n] < minp:
					tmp.append(weight[n])
				else:
					tmp.append(base[n])
			return (base+(((tmp)-base)*variance)).tolist()
		return (base+(((weight)-base)*variance)).tolist()
def _GlobalVariation ( self , base , value , sd , variance , scale , smooth = None ) : value = array ( value ) sd = array ( sd ) base = array ( base ) tsd = array ( [ std ( value [ 1 : len ( value ) ] ) ] * len ( value ) ) weight = ( 2 - pow ( ( sqrt ( sd / tsd ) ) , scale ) ) * value if not smooth == None : tmp = [ ] maxp = max ( weight [ 1 : len ( weight ) ] ) * smooth minp = min ( weight [ 1 : len ( weight ) ] ) * ( ( 1.0 - smooth ) + 1 ) for n in range ( len ( weight ) ) : if weight [ n ] > maxp or weight [ n ] < minp : tmp . append ( weight [ n ] ) else : tmp . append ( base [ n ] ) return ( base + ( ( ( tmp ) - base ) * variance ) ) . tolist ( ) return ( base + ( ( ( weight ) - base ) * variance ) ) . tolist ( )
Apply variance to the parameter in a weighted manner.
Apply variance to the parameter in a weighted manner .
"""Apply variance to the parameter in a weighted manner. More conserved values (measured as amound of variation based on sd) will be introduced
		   with a larger frequency then less conserved parameters. The smoothing factor determines the final value"""
self
base
value
sd
variance
scale
smooth