def validate_inputs(self): """Validate inputs.""" validate_bam_file(self.bam, check_exist=True) validate_bed_file(self.output) validate_string(self.quant, choices=["cDNA", "reads"]) validate_integer(self.multimax) validate_string(self.group_by, choices=["start", "middle", "end"])
def test_validate_bed_file(self): message = "Bed file file.txt should have a valid bed extension." with self.assertRaisesRegex(ValueError, message): validate_bed_file("file.txt", check_exist=False) message = "Bed file file.bed does not exist." with self.assertRaisesRegex(ValueError, message): validate_bed_file("file.bed", check_exist=True) bed = self.make_bed(intervals=[["chr1", 10, 20, ".", 12, "+"]]) validate_bed_file(bed, check_exist=True)
def validate_inputs(self): """Validate inputs.""" validate_bed_file(self.sites, check_exist=True) validate_bed_file(self.outfile)