INNER CODE UNIT · Python
validate_input
nloyfer/wgbs_tools · src/python/add_cpg_counts.py:112
def validate_input(self):
# validate output dir:
if not (op.isdir(self.out_dir)):
raise IllegalArgumentError(f'Invalid output dir: {self.out_dir}')
def start_threads(self):
""" Parse each chromosome file in a different process,
and concatenate outputs to pat and unq files """
print(datetime.datetime.now().isoformat() + ': *** starting processing of each chromosome')
name = op.join(self.out_dir, pretty_name(self.bam_path))
is_PE = is_pair_end(self.bam_path, self.gr.genome)
if self.gr.region_str is None:
final_path = name + f'.{self.args.suffix}' + BAM_SUFF
params = []
for c in set_regions(self.bam_path, self.gr):
out_path_name = name + '_' + c
params.append((self.bam_path, out_path_name, c, self.gr.genome,
is_PE, self.args.exclude_flags, self.args.mapq,