Esempio n. 1
0
def no_args():
    species2dict = {}
    for g in GENOMES:
        d = utils.get_seq2count_dict('results/elmdict_'
                                     + g + '.txt',
                                     float(0))
        entropy = utils.get_species_entropy(d)
        with open(os.path.join(RESULTSDIR, g + '.elm_entropy'), 'w') as f:
            for elm in entropy:
                f.write(elm + '\t' + str(entropy[elm]) + '\n')
    for flu in FLU_NAMES:
        d = utils.get_seq2count_dict('results/flu_elmdict_'
                                     + flu,
                                     float(0))
        entropy = utils.get_species_entropy(d)
        with open(os.path.join(RESULTSDIR, 'flu_' + flu + '.elm_entropy'), 'w') as f:
            for elm in entropy:
                f.write(elm + '\t' + str(entropy[elm]) + '\n')
Esempio n. 2
0
def one_arg(afile):
    d = utils.get_seq2count_dict(afile, float(0))
    entropy = utils.get_species_entropy(d)
    for elm in entropy:
        print elm + '\t' + str(entropy[elm])