def getWorkdir(self, hide_dir=False, str_=True): if hide_dir: return utils.returnPath( self.workDir / "Scripts" / ("_" + self.name) / "pipeline", str_) else: return utils.returnPath( self.workDir / "Scripts" / self.name / "pipeline", str_)
def renameLocalDir(self): work_dir_prefix = utils.returnPath(self.workDir / "Scripts", False) work_dir_off = work_dir_prefix / ("_" + self.name) work_dir_on = work_dir_prefix / self.name if self.run: work_dir = Path(work_dir_on / "pipeline") if (os.path.isdir(work_dir_off)): try: os.rename(work_dir_off, work_dir_on) except: raise OSError( f"Could not rename {work_dir_off} to {work_dir_on}\n \ try running 'drop update' to reset file structure\n") else: logger.info(f"{self.name} has been turned off in the config file") work_dir = Path(work_dir_off / "pipeline") if (os.path.isdir(work_dir_on)): try: os.rename(work_dir_on, work_dir_off) except: raise OSError( f"Could not rename {work_dir_on} to {work_dir_off}\n \ try running 'drop update' to reset file structure\n") return work_dir
def getFilePattern(self, str_=True, expandStr=False): pattern = self.pattern if expandStr: pattern = pattern.__str__().replace("{", "{{").replace("}", "}}") return utils.returnPath(pattern, str_=str_)
def getWorkdir(self, str_=True): return utils.returnPath(Path("Scripts") / self.name / "pipeline", str_)
def getHtmlFromScript(self, path, str_=True): path = Path(path).with_suffix(".html") file_name = wbuild.utils.pathsepsToUnderscore(str(path), dotsToUnderscore=False) html_output_path = self.getHtmlOutputPath(str_=False) return utils.returnPath(html_output_path / file_name, str_=str_)
def getHtmlOutputPath(self, str_=True): return utils.returnPath(self.htmlOutputPath, str_=str_)
def getProcessedResultsDir(self, str_=True): return utils.returnPath(self.processedResultsDir, str_=str_)
def getRoot(self, str_=True): return utils.returnPath(self.root, str_=str_)
def getFilePattern(self, str_=True): return utils.returnPath(self.pattern, str_=str_)
def getFastaDict(self, str_=True): return utils.returnPath(self.fastaDict, str_)
def getFastaFile(self, str_=True): return utils.returnPath(self.fastaFile, str_)