import os
import numpy as np
import pandas as pd
import sys

PATH = 'tmp'
result = []
ts_name = 'targetscan_70_output.txt'

for path in os.listdir(PATH):
    print('processing', path)
    gene = pd.read_csv(os.path.join(PATH, path, ts_name),
            sep='\t', index_col=0).index.unique().shape[0]
    result.append(gene)
    print(gene)
print(np.median(result) // 443)
