3d-dart/server/plugins/PlotData.py
def ReadPar(self,infile):

		"""Read 3DNA generated base-pair and base-pair step parameter file (*.par) and append
		   to bpparr database"""

		readfile = file(infile, 'r')
		lines = readfile.readlines()

		lib = {}
		for n in range(13):
			lib[n] = []

		for line in lines[3:]:
			params = []
			for n in range(0,13):	
		 		params.append(line.split()[n])	
			lib[0].append(str(params[0]))
			for value in range(1,13):
				lib[value].append(float(params[value]))

		if self.sequence == None:
			self.sequence = lib[0]
			self.bpparmr['shear'] = lib[1]
			self.bpparmr['stretch'] = lib[2]
			self.bpparmr['stagger'] = lib[3]
			self.bpparmr['buckle'] = lib[4]
			self.bpparmr['proptw'] = lib[5]
			self.bpparmr['opening'] = lib[6]
			self.bpparmr['shift'] = lib[7]
			self.bpparmr['slide'] = lib[8]
			self.bpparmr['rise'] = lib[9]
			self.bpparmr['tilt'] = lib[10]
			self.bpparmr['roll'] = lib[11]
			self.bpparmr['twist'] = lib[12]
		elif len(self.sequence) == len(lib[0]):
			self.bpparmr['shear'] = lib[1]
			self.bpparmr['stretch'] = lib[2]
			self.bpparmr['stagger'] = lib[3]
			self.bpparmr['buckle'] = lib[4]
			self.bpparmr['proptw'] = lib[5]
			self.bpparmr['opening'] = lib[6]
			self.bpparmr['shift'] = lib[7]
			self.bpparmr['slide'] = lib[8]
			self.bpparmr['rise'] = lib[9]
			self.bpparmr['tilt'] = lib[10]
			self.bpparmr['roll'] = lib[11]
			self.bpparmr['twist'] = lib[12]
		else:
			print("Number of base-pairs in reference does not match the number of base-pairs in the model(s): %i versus %i" % (len(lib[0]),len(self.sequence)))
			print("\nNo reference used")	
		
		lib.clear()
Read 3DNA generated base-pair and base-pair step parameter file (*.par) and append
		   to bpparr database
Read 3DNA generated base-pair and base-pair step parameter file (*.par) and append
to bpparr database
Read 3DNA generated base - pair and base - pair step parameter file ( * . par ) and append to bpparr database
def ReadPar(self,infile):
		readfile = file(infile, 'r')
		lines = readfile.readlines()
		lib = {}
		for n in range(13):
			lib[n] = []
		for line in lines[3:]:
			params = []
			for n in range(0,13):	
		 		params.append(line.split()[n])	
			lib[0].append(str(params[0]))
			for value in range(1,13):
				lib[value].append(float(params[value]))
		if self.sequence == None:
			self.sequence = lib[0]
			self.bpparmr['shear'] = lib[1]
			self.bpparmr['stretch'] = lib[2]
			self.bpparmr['stagger'] = lib[3]
			self.bpparmr['buckle'] = lib[4]
			self.bpparmr['proptw'] = lib[5]
			self.bpparmr['opening'] = lib[6]
			self.bpparmr['shift'] = lib[7]
			self.bpparmr['slide'] = lib[8]
			self.bpparmr['rise'] = lib[9]
			self.bpparmr['tilt'] = lib[10]
			self.bpparmr['roll'] = lib[11]
			self.bpparmr['twist'] = lib[12]
		elif len(self.sequence) == len(lib[0]):
			self.bpparmr['shear'] = lib[1]
			self.bpparmr['stretch'] = lib[2]
			self.bpparmr['stagger'] = lib[3]
			self.bpparmr['buckle'] = lib[4]
			self.bpparmr['proptw'] = lib[5]
			self.bpparmr['opening'] = lib[6]
			self.bpparmr['shift'] = lib[7]
			self.bpparmr['slide'] = lib[8]
			self.bpparmr['rise'] = lib[9]
			self.bpparmr['tilt'] = lib[10]
			self.bpparmr['roll'] = lib[11]
			self.bpparmr['twist'] = lib[12]
		else:
			print("Number of base-pairs in reference does not match the number of base-pairs in the model(s): %i versus %i" % (len(lib[0]),len(self.sequence)))
			print("\nNo reference used")	
		lib.clear()
def ReadPar ( self , infile ) : readfile = file ( infile , 'r' ) lines = readfile . readlines ( ) lib = { } for n in range ( 13 ) : lib [ n ] = [ ] for line in lines [ 3 : ] : params = [ ] for n in range ( 0 , 13 ) : params . append ( line . split ( ) [ n ] ) lib [ 0 ] . append ( str ( params [ 0 ] ) ) for value in range ( 1 , 13 ) : lib [ value ] . append ( float ( params [ value ] ) ) if self . sequence == None : self . sequence = lib [ 0 ] self . bpparmr [ 'shear' ] = lib [ 1 ] self . bpparmr [ 'stretch' ] = lib [ 2 ] self . bpparmr [ 'stagger' ] = lib [ 3 ] self . bpparmr [ 'buckle' ] = lib [ 4 ] self . bpparmr [ 'proptw' ] = lib [ 5 ] self . bpparmr [ 'opening' ] = lib [ 6 ] self . bpparmr [ 'shift' ] = lib [ 7 ] self . bpparmr [ 'slide' ] = lib [ 8 ] self . bpparmr [ 'rise' ] = lib [ 9 ] self . bpparmr [ 'tilt' ] = lib [ 10 ] self . bpparmr [ 'roll' ] = lib [ 11 ] self . bpparmr [ 'twist' ] = lib [ 12 ] elif len ( self . sequence ) == len ( lib [ 0 ] ) : self . bpparmr [ 'shear' ] = lib [ 1 ] self . bpparmr [ 'stretch' ] = lib [ 2 ] self . bpparmr [ 'stagger' ] = lib [ 3 ] self . bpparmr [ 'buckle' ] = lib [ 4 ] self . bpparmr [ 'proptw' ] = lib [ 5 ] self . bpparmr [ 'opening' ] = lib [ 6 ] self . bpparmr [ 'shift' ] = lib [ 7 ] self . bpparmr [ 'slide' ] = lib [ 8 ] self . bpparmr [ 'rise' ] = lib [ 9 ] self . bpparmr [ 'tilt' ] = lib [ 10 ] self . bpparmr [ 'roll' ] = lib [ 11 ] self . bpparmr [ 'twist' ] = lib [ 12 ] else : print ( "Number of base-pairs in reference does not match the number of base-pairs in the model(s): %i versus %i" % ( len ( lib [ 0 ] ) , len ( self . sequence ) ) ) print ( "\nNo reference used" ) lib . clear ( )
Read 3DNA generated base-pair and base-pair step parameter file (*.par) and append
to bpparr database
Read 3DNA generated base - pair and base - pair step parameter file ( * . par ) and append to bpparr database
"""Read 3DNA generated base-pair and base-pair step parameter file (*.par) and append
		   to bpparr database"""
self
infile