<commit_before>"""
This is the main program of AsmVar. It's the most top interface of all the
AsmVar's tool sets.
"""
import sys
import profile

#### My Own Module
import check
import commandline_options as cmdopts
import executor as exe

def checking():

    pass

    return

def genotype():

    gnt_opt = cmdopts.genotype()
    gnt_exe = exe.VariantsGenotype(gnt_opt.vcffile, 
                                   [f.split(':') for f in loadList(gnt_opt.bamfile)], 
                                   gnt_opt.ref_fasta_file,
                                   gnt_opt)
	# Calculat the variants' genotype and output
    gnt_exe.genotyping()

def loadList(file_name):

    I = open(file_name)
    file_list = [l.strip('\n') for l in I]
    I.close()

    return file_list


###############################################################################
if __name__ == '__main__':

    runner = {'genotype':genotype}

    if len(sys.argv) == 1 or (sys.argv[1] not in runner):
        print >> sys.stderr, '[Usage] python %s' % sys.argv[0]
        print >> sys.stderr, '  Option:\n\tgenotype'
        sys.exit(1)

    command = sys.argv[1]
    #runner[command]()
    profile.run("genotype()") # Debug
    print >> sys.stderr, '*************** ALL DONE ***************\n'

<commit_msg>add a profile to monitor the performance of program<commit_after>"""
This is the main program of AsmVar. It's the most top interface of all the
AsmVar's tool sets.
"""
import sys
import profile

#### My Own Module
import check
import commandline_options as cmdopts
import executor as exe

def checking():

    pass

    return

def genotype():

    gnt_opt = cmdopts.genotype()
    gnt_exe = exe.VariantsGenotype(gnt_opt.vcffile, 
                                   [f.split(':') for f in loadList(gnt_opt.bamfile)], 
                                   gnt_opt.ref_fasta_file,
                                   gnt_opt)
	# Calculat the variants' genotype and output
    gnt_exe.genotyping()

def loadList(file_name):

    I = open(file_name)
    file_list = [l.strip('\n') for l in I]
    I.close()

    return file_list


###############################################################################
if __name__ == '__main__':

    runner = {'genotype':genotype}

    if len(sys.argv) == 1 or (sys.argv[1] not in runner):
        print >> sys.stderr, '[Usage] python %s' % sys.argv[0]
        print >> sys.stderr, '  Option:\n\tgenotype'
        sys.exit(1)

    command = sys.argv[1]
    runner[command]()
    #profile.run("genotype()") # Debug
    print >> sys.stderr, '*************** ALL DONE ***************\n'


{'fraction_non_alphanumeric': 0.19201228878648233, 'fraction_numerical': 0.0038402457757296467, 'mean_word_length': 2.603042876901798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4775915', 'n_tokens_mistral': 851, 'n_tokens_neox': 803, 'n_words': 220}