# Write results
f = open(output_file,'w')
line = 'ct_all\t%s\tseq\n'%('\t'.join(['ct_%d'%n for n in sample_nums]))
f.write(line)
for i in indices:
    seq = seqs[i]
    counts = seq_to_counts_dict[seq]
    line = '\t'.join([str(x) for x in counts]) + '\t' + seq + '\n'
    f.write(line)
f.close()