def viewDnaOrderFile(self, openFileInEditor=True): """ Writes a DNA Order file in comma-separated values (CSV) format and opens it in a text editor. The user must save the file to a permanent location using the text editor. @see: Ui_DnaFlyout.orderDnaCommand @see: writeDnaOrderFile() @TODO: assy.getAllDnaObjects(). """ dnaSequence = self.getDnaSequence(format='CSV') if dnaSequence: tmpdir = find_or_make_Nanorex_subdir('temp') fileBaseName = 'DnaOrder' temporaryFile = os.path.join(tmpdir, "%s.csv" % fileBaseName) writeDnaOrderFile(temporaryFile, self.assy, self.getNumberOfBases(), self.getNumberOfBases(unassignedOnly=True), dnaSequence) if openFileInEditor: open_file_in_editor(temporaryFile) return
def viewDnaOrderFile(self, openFileInEditor = True): """ Opens a text editor and loads a temporary text file containing all the DNA strand names and their sequences in the current DNA object. It will look something like this: Strand1,ATCAGCTACGCATCGCT Strand2,TAGTCGATGCGTAGCGA ... Strandn, ... The user can then save the file to a permanent location using the text editor the file is loaded (and displayed) in. @see: Ui_DnaFlyout.orderDnaCommand @see: writeDnaOrderFile() @TODO: assy.getAllDnaObjects(). """ dnaSequence = self.getDnaSequence(format = 'CSV') if dnaSequence: tmpdir = find_or_make_Nanorex_subdir('temp') fileBaseName = 'DnaOrder' temporaryFile = os.path.join(tmpdir, "%s.csv" % fileBaseName) writeDnaOrderFile(temporaryFile, self.assy, dnaSequence) if openFileInEditor: open_file_in_editor(temporaryFile)
def viewDnaOrderFile(self, openFileInEditor = True): """ Writes a DNA Order file in comma-separated values (CSV) format and opens it in a text editor. The user must save the file to a permanent location using the text editor. @see: Ui_DnaFlyout.orderDnaCommand @see: writeDnaOrderFile() @TODO: assy.getAllDnaObjects(). """ dnaSequence = self.getDnaSequence(format = 'CSV') if dnaSequence: tmpdir = find_or_make_Nanorex_subdir('temp') fileBaseName = 'DnaOrder' temporaryFile = os.path.join(tmpdir, "%s.csv" % fileBaseName) writeDnaOrderFile(temporaryFile, self.assy, self.getNumberOfBases(), self.getNumberOfBases(unassignedOnly = True), dnaSequence) if openFileInEditor: open_file_in_editor(temporaryFile) return
def open_tmp_inputfile(self): '''Writes a temporary GAMESS inputfile of the current Gamess jig and opens the file in an editor. ''' # Make tmp_inputfile filename (i.e. ~/Nanorex/temp/jigname_parms_info.inp) from platform_dependent.PlatformDependent import find_or_make_Nanorex_subdir tmpdir = find_or_make_Nanorex_subdir('temp') basename = self.gamessJig.name + "-" + self.gamessJig.gms_parms_info('_') tmp_inputfile = os.path.join(tmpdir, "%s.inp" % basename) # Write INP file (in ~/Nanorex/temp subdirectory) from analysis.GAMESS.files_gms import writegms_inpfile writegms_inpfile(tmp_inputfile, self.gamessJig) from platform_dependent.PlatformDependent import open_file_in_editor open_file_in_editor(tmp_inputfile)
def openGNUplotFile(self): """Opens the current GNUplot file in an editor. """ open_file_in_editor(self.plotFile)
def openTraceFile(self): """Opens the current tracefile in an editor. """ open_file_in_editor(self.traceFile)
def openGNUplotFile(self): """Opens the current GNUplot file in an editor. """ open_file_in_editor(self.plotFile)
def openTraceFile(self): """Opens the current tracefile in an editor. """ open_file_in_editor(self.traceFile)