3d-dart/server/plugins/ModelNucleicAcids.py
def ReadMultiout(self, files):
		
		"""Read statistics for base-pair and base-pair step parameters from multiout file and 
		   append to database"""
		
		lib = {}
		for n in range(26):
			lib[n] = []
		
		bp = re.compile("nr   bp      freq.        shear           stretch")
		bpstep = re.compile("nr   bpstep    freq.      shift           slide")
		readfile = file(files, 'r')
		lines = readfile.readlines()
		linecount = 1
		countstart = []
		for line in lines:
			line = line.strip()
			result1 = bp.match(line)
			result2 = bpstep.match(line)
			if result1:
				bplines = self._ReadTable(linenr=len(countstart),outfile=lines)	
			elif result2:
				bpsteplines = self._ReadTable(linenr=len(countstart),outfile=lines)
			linecount += 1
        		countstart.append(linecount)	
	
		bpsteplines.insert(0,([0.00001]*15))
	
		for lines in bplines:
			lines = lines[1:15]
			for value in range(14):
				try:
					lib[value].append(TransformDash(lines[value]))
				except:
					lib[value].append(lines[value])
		for lines in bpsteplines:
			lines = lines[3:15]
			for value in range(12):
				lib[value+14].append(TransformDash(lines[value]))	
		
		del bpsteplines,bplines
		
		self.baseref = DatabaseDeamon()
		self.baseref.Load('sequence',lib[0])
		self.baseref.Load('shear',lib[2])
		self.baseref.Load('shearsd',lib[3])
		self.baseref.Load('stretch',lib[4])
		self.baseref.Load('stretchsd',lib[5])
		self.baseref.Load('stagger',lib[6])
		self.baseref.Load('staggersd',lib[7])
		self.baseref.Load('buckle',lib[8])
		self.baseref.Load('bucklesd',lib[9])
		self.baseref.Load('proptw',lib[10])
		self.baseref.Load('proptwsd',lib[11])		
		self.baseref.Load('opening',lib[12])
		self.baseref.Load('openingsd',lib[13])
		self.baseref.Load('shift',lib[14])
		self.baseref.Load('shiftsd',lib[15])
		self.baseref.Load('slide',lib[16])
		self.baseref.Load('slidesd',lib[17])
		self.baseref.Load('rise',lib[18])
		self.baseref.Load('risesd',lib[19])
		self.baseref.Load('tilt',lib[20])
		self.baseref.Load('tiltsd',lib[21])
		self.baseref.Load('roll',lib[22])
		self.baseref.Load('rollsd',lib[23])		
		self.baseref.Load('twist',lib[24])
		self.baseref.Load('twistsd',lib[25])
		
		lib.clear()
Read statistics for base-pair and base-pair step parameters from multiout file and 
		   append to database
Read statistics for base-pair and base-pair step parameters from multiout file and
append to database
Read statistics for base - pair and base - pair step parameters from multiout file and append to database
def ReadMultiout(self, files):
		lib = {}
		for n in range(26):
			lib[n] = []
		bp = re.compile("nr   bp      freq.        shear           stretch")
		bpstep = re.compile("nr   bpstep    freq.      shift           slide")
		readfile = file(files, 'r')
		lines = readfile.readlines()
		linecount = 1
		countstart = []
		for line in lines:
			line = line.strip()
			result1 = bp.match(line)
			result2 = bpstep.match(line)
			if result1:
				bplines = self._ReadTable(linenr=len(countstart),outfile=lines)	
			elif result2:
				bpsteplines = self._ReadTable(linenr=len(countstart),outfile=lines)
			linecount += 1
        		countstart.append(linecount)	
		bpsteplines.insert(0,([0.00001]*15))
		for lines in bplines:
			lines = lines[1:15]
			for value in range(14):
				try:
					lib[value].append(TransformDash(lines[value]))
				except:
					lib[value].append(lines[value])
		for lines in bpsteplines:
			lines = lines[3:15]
			for value in range(12):
				lib[value+14].append(TransformDash(lines[value]))	
		del bpsteplines,bplines
		self.baseref = DatabaseDeamon()
		self.baseref.Load('sequence',lib[0])
		self.baseref.Load('shear',lib[2])
		self.baseref.Load('shearsd',lib[3])
		self.baseref.Load('stretch',lib[4])
		self.baseref.Load('stretchsd',lib[5])
		self.baseref.Load('stagger',lib[6])
		self.baseref.Load('staggersd',lib[7])
		self.baseref.Load('buckle',lib[8])
		self.baseref.Load('bucklesd',lib[9])
		self.baseref.Load('proptw',lib[10])
		self.baseref.Load('proptwsd',lib[11])		
		self.baseref.Load('opening',lib[12])
		self.baseref.Load('openingsd',lib[13])
		self.baseref.Load('shift',lib[14])
		self.baseref.Load('shiftsd',lib[15])
		self.baseref.Load('slide',lib[16])
		self.baseref.Load('slidesd',lib[17])
		self.baseref.Load('rise',lib[18])
		self.baseref.Load('risesd',lib[19])
		self.baseref.Load('tilt',lib[20])
		self.baseref.Load('tiltsd',lib[21])
		self.baseref.Load('roll',lib[22])
		self.baseref.Load('rollsd',lib[23])		
		self.baseref.Load('twist',lib[24])
		self.baseref.Load('twistsd',lib[25])
		lib.clear()
def ReadMultiout ( self , files ) : lib = { } for n in range ( 26 ) : lib [ n ] = [ ] bp = re . compile ( "nr   bp      freq.        shear           stretch" ) bpstep = re . compile ( "nr   bpstep    freq.      shift           slide" ) readfile = file ( files , 'r' ) lines = readfile . readlines ( ) linecount = 1 countstart = [ ] for line in lines : line = line . strip ( ) result1 = bp . match ( line ) result2 = bpstep . match ( line ) if result1 : bplines = self . _ReadTable ( linenr = len ( countstart ) , outfile = lines ) elif result2 : bpsteplines = self . _ReadTable ( linenr = len ( countstart ) , outfile = lines ) linecount += 1 countstart . append ( linecount ) bpsteplines . insert ( 0 , ( [ 0.00001 ] * 15 ) ) for lines in bplines : lines = lines [ 1 : 15 ] for value in range ( 14 ) : try : lib [ value ] . append ( TransformDash ( lines [ value ] ) ) except : lib [ value ] . append ( lines [ value ] ) for lines in bpsteplines : lines = lines [ 3 : 15 ] for value in range ( 12 ) : lib [ value + 14 ] . append ( TransformDash ( lines [ value ] ) ) del bpsteplines , bplines self . baseref = DatabaseDeamon ( ) self . baseref . Load ( 'sequence' , lib [ 0 ] ) self . baseref . Load ( 'shear' , lib [ 2 ] ) self . baseref . Load ( 'shearsd' , lib [ 3 ] ) self . baseref . Load ( 'stretch' , lib [ 4 ] ) self . baseref . Load ( 'stretchsd' , lib [ 5 ] ) self . baseref . Load ( 'stagger' , lib [ 6 ] ) self . baseref . Load ( 'staggersd' , lib [ 7 ] ) self . baseref . Load ( 'buckle' , lib [ 8 ] ) self . baseref . Load ( 'bucklesd' , lib [ 9 ] ) self . baseref . Load ( 'proptw' , lib [ 10 ] ) self . baseref . Load ( 'proptwsd' , lib [ 11 ] ) self . baseref . Load ( 'opening' , lib [ 12 ] ) self . baseref . Load ( 'openingsd' , lib [ 13 ] ) self . baseref . Load ( 'shift' , lib [ 14 ] ) self . baseref . Load ( 'shiftsd' , lib [ 15 ] ) self . baseref . Load ( 'slide' , lib [ 16 ] ) self . baseref . Load ( 'slidesd' , lib [ 17 ] ) self . baseref . Load ( 'rise' , lib [ 18 ] ) self . baseref . Load ( 'risesd' , lib [ 19 ] ) self . baseref . Load ( 'tilt' , lib [ 20 ] ) self . baseref . Load ( 'tiltsd' , lib [ 21 ] ) self . baseref . Load ( 'roll' , lib [ 22 ] ) self . baseref . Load ( 'rollsd' , lib [ 23 ] ) self . baseref . Load ( 'twist' , lib [ 24 ] ) self . baseref . Load ( 'twistsd' , lib [ 25 ] ) lib . clear ( )
Read statistics for base-pair and base-pair step parameters from multiout file and
append to database
Read statistics for base - pair and base - pair step parameters from multiout file and append to database
"""Read statistics for base-pair and base-pair step parameters from multiout file and 
		   append to database"""
self
files