3d-dart/server/plugins/PlotData.py
def ReadMultiout(self, infile):
	
		"""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(infile, '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(self.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(self.TransformDash(lines[value]))	
	
		del bpsteplines,bplines
	
		self.sequence = lib[0]
		self.bpparm['shear'] = lib[2]
		self.bpparmsd['shearsd'] = lib[3]
		self.bpparm['stretch'] = lib[4]
		self.bpparmsd['stretchsd'] = lib[5]
		self.bpparm['stagger'] = lib[6]
		self.bpparmsd['staggersd'] = lib[7]
		self.bpparm['buckle'] = lib[8]
		self.bpparmsd['bucklesd'] = lib[9]
		self.bpparm['proptw'] = lib[10]
		self.bpparmsd['proptwsd'] = lib[11]		
		self.bpparm['opening'] = lib[12]
		self.bpparmsd['openingsd'] = lib[13]
		self.bpparm['shift'] = lib[14]
		self.bpparmsd['shiftsd'] = lib[15]
		self.bpparm['slide'] = lib[16]
		self.bpparmsd['slidesd'] = lib[17]
		self.bpparm['rise'] = lib[18]
		self.bpparmsd['risesd'] = lib[19]
		self.bpparm['tilt'] = lib[20]
		self.bpparmsd['tiltsd'] = lib[21]
		self.bpparm['roll'] = lib[22]
		self.bpparmsd['rollsd'] = lib[23]		
		self.bpparm['twist'] = lib[24]
		self.bpparmsd['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, infile):
		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(infile, '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(self.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(self.TransformDash(lines[value]))	
		del bpsteplines,bplines
		self.sequence = lib[0]
		self.bpparm['shear'] = lib[2]
		self.bpparmsd['shearsd'] = lib[3]
		self.bpparm['stretch'] = lib[4]
		self.bpparmsd['stretchsd'] = lib[5]
		self.bpparm['stagger'] = lib[6]
		self.bpparmsd['staggersd'] = lib[7]
		self.bpparm['buckle'] = lib[8]
		self.bpparmsd['bucklesd'] = lib[9]
		self.bpparm['proptw'] = lib[10]
		self.bpparmsd['proptwsd'] = lib[11]		
		self.bpparm['opening'] = lib[12]
		self.bpparmsd['openingsd'] = lib[13]
		self.bpparm['shift'] = lib[14]
		self.bpparmsd['shiftsd'] = lib[15]
		self.bpparm['slide'] = lib[16]
		self.bpparmsd['slidesd'] = lib[17]
		self.bpparm['rise'] = lib[18]
		self.bpparmsd['risesd'] = lib[19]
		self.bpparm['tilt'] = lib[20]
		self.bpparmsd['tiltsd'] = lib[21]
		self.bpparm['roll'] = lib[22]
		self.bpparmsd['rollsd'] = lib[23]		
		self.bpparm['twist'] = lib[24]
		self.bpparmsd['twistsd'] = lib[25]
		lib.clear()
def ReadMultiout ( self , infile ) : 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 ( infile , '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 ( self . 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 ( self . TransformDash ( lines [ value ] ) ) del bpsteplines , bplines self . sequence = lib [ 0 ] self . bpparm [ 'shear' ] = lib [ 2 ] self . bpparmsd [ 'shearsd' ] = lib [ 3 ] self . bpparm [ 'stretch' ] = lib [ 4 ] self . bpparmsd [ 'stretchsd' ] = lib [ 5 ] self . bpparm [ 'stagger' ] = lib [ 6 ] self . bpparmsd [ 'staggersd' ] = lib [ 7 ] self . bpparm [ 'buckle' ] = lib [ 8 ] self . bpparmsd [ 'bucklesd' ] = lib [ 9 ] self . bpparm [ 'proptw' ] = lib [ 10 ] self . bpparmsd [ 'proptwsd' ] = lib [ 11 ] self . bpparm [ 'opening' ] = lib [ 12 ] self . bpparmsd [ 'openingsd' ] = lib [ 13 ] self . bpparm [ 'shift' ] = lib [ 14 ] self . bpparmsd [ 'shiftsd' ] = lib [ 15 ] self . bpparm [ 'slide' ] = lib [ 16 ] self . bpparmsd [ 'slidesd' ] = lib [ 17 ] self . bpparm [ 'rise' ] = lib [ 18 ] self . bpparmsd [ 'risesd' ] = lib [ 19 ] self . bpparm [ 'tilt' ] = lib [ 20 ] self . bpparmsd [ 'tiltsd' ] = lib [ 21 ] self . bpparm [ 'roll' ] = lib [ 22 ] self . bpparmsd [ 'rollsd' ] = lib [ 23 ] self . bpparm [ 'twist' ] = lib [ 24 ] self . bpparmsd [ '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
infile