def read_counts(sample_labels, counts_files):
    """ Reads the counts from an input file. """
    cpt = {}
    cpt_genome = {}
    for sample_label, filename in zip(sample_labels, counts_files):
        cpt[sample_label] = {}
        with open(filename, 'r') as counts_fh:
            for line in counts_fh:
                if not line.startswith('#'):
                    feature = tuple(line.split('\t')[0].split(','))
                    cpt[sample_label][feature] = float(line.split('\t')[1])
                    cpt_genome[feature] = float(line.rstrip().split('\t')[2])
    return cpt, cpt_genome
