def __init__(self, external_name): if not os.path.isdir(PathResolver.datasets_output_path()): os.makedirs(PathResolver.datasets_output_path()) self.external_name = external_name self.internal_name = self.detect_internal_name() NameConverter.register(self.external_name) self._contigs_count = None
def reads_output_paths(self): input_names = [os.path.basename(p) for p in self.reads_input_paths()] return [PathResolver.datasets_output_path(p) for p in input_names]
def contigs_output_path(self): file_name = os.path.basename(self.contigs_input_path()) return PathResolver.datasets_output_path(file_name)
def _get_output_path(self, input_path): file_name = os.path.basename(input_path) file_name = input_file_name.replace(file_name, self.internal_name) return PathResolver.datasets_output_path(file_name)
def _contigs_files(self): files = glob.glob(PathResolver.datasets_output_path() + '/*') return [ e for e in files if re.match(DataManager.CONTIGS_FNAME_REGEXP, e) ]