def makeFilesForETomoSampleRecon(processdir, stackdir,aligndir, templatedir, seriesname, thickness, pixelsize,yspacing,has_rotation=False): ''' Make or link local files required by etomo to redo sampling, creating tomopitch model, and reconstruct the volume. ''' # etomo status file createETomoBoundaryModelEDF(processdir,templatedir,seriesname,thickness,pixelsize) # required by remaking sample tomograms inside etomo if has_rotation: apDisplay.printWarning('eTomo wants to regenerate global alignment from non-rotated local alignment. This alignment with rotation will not work right') else: # prexf file is generated from database values if this function is called from tomomaker. It is better not to change it if exists. prexf = seriesname+".prexf" alignprexf = os.path.join(aligndir,prexf) localprexf = os.path.join(processdir,prexf) apFile.safeCopy(alignprexf,localprexf) writeETomoNewstComTemplate(processdir, seriesname) rawtltname = '%s.rawtlt' % (seriesname) shutil.copy(os.path.join(stackdir,rawtltname),os.path.join(processdir,rawtltname)) # required by tomopitch model making tomopitchname = 'tomopitch.com' imodcomdir = os.path.join(os.environ['IMOD_DIR'],'com') tomopitchpath = os.path.join(processdir,tomopitchname) shutil.copy(os.path.join(imodcomdir,tomopitchname),tomopitchpath) apFile.replaceUniqueLinePatternInTxtFile(tomopitchpath,'SpacingInY','SpacingInY\t%.1f\n' % yspacing) # required by "Final Aligned Stack" step stackname = '%s.st' % (seriesname) apFile.safeSymLink(os.path.join(stackdir,stackname),os.path.join(processdir,stackname))
def makeFilesForETomoSampleRecon(processdir, stackdir, aligndir, templatedir, seriesname, thickness, pixelsize, yspacing, has_rotation=False): ''' Make or link local files required by etomo to redo sampling, creating tomopitch model, and reconstruct the volume. ''' # etomo status file createETomoBoundaryModelEDF(processdir, templatedir, seriesname, thickness, pixelsize) # required by remaking sample tomograms inside etomo if has_rotation: apDisplay.printWarning( 'eTomo wants to regenerate global alignment from non-rotated local alignment. This alignment with rotation will not work right' ) else: # prexf file is generated from database values if this function is called from tomomaker. It is better not to change it if exists. prexf = seriesname + ".prexf" alignprexf = os.path.join(aligndir, prexf) localprexf = os.path.join(processdir, prexf) apFile.safeCopy(alignprexf, localprexf) writeETomoNewstComTemplate(processdir, seriesname) rawtltname = '%s.rawtlt' % (seriesname) shutil.copy(os.path.join(stackdir, rawtltname), os.path.join(processdir, rawtltname)) # required by tomopitch model making tomopitchname = 'tomopitch.com' imodcomdir = os.path.join(os.environ['IMOD_DIR'], 'com') tomopitchpath = os.path.join(processdir, tomopitchname) shutil.copy(os.path.join(imodcomdir, tomopitchname), tomopitchpath) apFile.replaceUniqueLinePatternInTxtFile(tomopitchpath, 'SpacingInY', 'SpacingInY\t%.1f\n' % yspacing) # required by "Final Aligned Stack" step stackname = '%s.st' % (seriesname) apFile.safeSymLink(os.path.join(stackdir, stackname), os.path.join(processdir, stackname))
def linkStackRawtltFiles(stackdir, processdir, seriesname): for ext in ('st', 'rawtlt'): filename = seriesname + '.' + ext source = os.path.join(stackdir, filename) destination = os.path.join(processdir, filename) apFile.safeSymLink(source, destination)
def linkStackRawtltFiles(stackdir,processdir,seriesname): for ext in ('st','rawtlt'): filename = seriesname+'.'+ext source = os.path.join(stackdir,filename) destination = os.path.join(processdir,filename) apFile.safeSymLink(source, destination)