<commit_before>import os.path
import sys

class Format(object):

    def __init__(self, path, program):
        self.path = path
        self.program = program
        if not program:
            self.check()

    def check(self):
        if not os.path.isfile(self.path):
            sys.exit("File " + self.path + " doesn't exist")


class Fastq(Format):
    
    def __init__(self, path, program=None):
        super(Fastq, self).__init__(path, program)


class Fasta(Format):
    
    def __init__(self, path, program=None):
        super(Fasta, self).__init__(path, program)


class Bam(Format):
    
    def __init__(self, path, program=None):
        super(Bam, self).__init__(path, program)


class Sam(Format):
    
    def __init__(self, path, program=None):
        super(Sam, self).__init__(path, program)


class Bai(Format):
    
    def __init__(self, path, program=None):
        super(Bai, self).__init__(path, program)


class Sai(Format):
    
    def __init__(self, path, program=None):
        super(Sai, self).__init__(path, program)


class Bcf(Format):
    
    def __init__(self, path, program=None):
        super(Bcf, self).__init__(path, program)


class Vcf(Format):
    
    def __init__(self, path, program=None):
        super(Vcf, self).__init__(path, program)


class Bowtie2Index(Format):

    def __init__(self, path, program=None):
        super(Bowtie2Index, self).__init__(path, program)

    def check(self):
        pass
<commit_msg>Now implemented file existence checking<commit_after>import os.path
import sys

class Format(object):

    def __init__(self, path, program):
        self.path = path
        self.program = program
        if not program:
            self.check()

    def check(self):
        if not os.path.isfile(self.path):
            sys.exit("File " + self.path + " doesn't exist")


class Fastq(Format):
    
    def __init__(self, path, program=None):
        super(Fastq, self).__init__(path, program)


class Fasta(Format):
    
    def __init__(self, path, program=None):
        super(Fasta, self).__init__(path, program)


class Bam(Format):
    
    def __init__(self, path, program=None):
        super(Bam, self).__init__(path, program)


class Sam(Format):
    
    def __init__(self, path, program=None):
        super(Sam, self).__init__(path, program)


class Bai(Format):
    
    def __init__(self, path, program=None):
        super(Bai, self).__init__(path, program)


class Sai(Format):
    
    def __init__(self, path, program=None):
        super(Sai, self).__init__(path, program)


class Bcf(Format):
    
    def __init__(self, path, program=None):
        super(Bcf, self).__init__(path, program)


class Vcf(Format):
    
    def __init__(self, path, program=None):
        super(Vcf, self).__init__(path, program)


class Bowtie2Index(Format):

    def __init__(self, path, program=None):
        super(Bowtie2Index, self).__init__(path, program)

    def check(self):
        files = [".1", ".2", ".3", ".4", ".rev.1", ".rev.2"]
        files = [self.path + f + ".bt2" for f in files]
        for f in files:
            if not os.path.isfile(f):
                sys.exit("File " + f + " doesn't exist")


{'fraction_non_alphanumeric': 0.13352095059412133, 'fraction_numerical': 0.0034396497811131957, 'mean_word_length': 2.719767441860465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4682914', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1026, 'n_words': 251}