<jupyter_start><jupyter_text>1. import, merge, sum  HUES64 rep 1<jupyter_code>for i, f in enumerate(HUES64_rep1_tfxn1_fs):
    if i == 0:
        HUES64_rep1_tfxn1 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep1_tfxn1))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep1_tfxn1 = HUES64_rep1_tfxn1.merge(tmp, on="barcode")
HUES64_rep1_tfxn1["count"] = HUES64_rep1_tfxn1[["count_x", "count_y"]].sum(axis=1)
HUES64_rep1_tfxn1.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep1_tfxn1.head()
for i, f in enumerate(HUES64_rep1_tfxn2_fs):
    if i == 0:
        HUES64_rep1_tfxn2 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep1_tfxn2))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep1_tfxn2 = HUES64_rep1_tfxn2.merge(tmp, on="barcode")
HUES64_rep1_tfxn2["count"] = HUES64_rep1_tfxn2[["count_x", "count_y"]].sum(axis=1)
HUES64_rep1_tfxn2.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep1_tfxn2.head()
for i, f in enumerate(HUES64_rep1_tfxn3_fs):
    if i == 0:
        HUES64_rep1_tfxn3 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep1_tfxn3))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep1_tfxn3 = HUES64_rep1_tfxn3.merge(tmp, on="barcode")
HUES64_rep1_tfxn3["count"] = HUES64_rep1_tfxn3[["count_x", "count_y"]].sum(axis=1)
HUES64_rep1_tfxn3.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep1_tfxn3.head()<jupyter_output>239653
239653<jupyter_text>HUES64 rep 2<jupyter_code>for i, f in enumerate(HUES64_rep2_tfxn1_fs):
    if i == 0:
        HUES64_rep2_tfxn1 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep2_tfxn1))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep2_tfxn1 = HUES64_rep2_tfxn1.merge(tmp, on="barcode")
HUES64_rep2_tfxn1["count"] = HUES64_rep2_tfxn1[["count_x", "count_y"]].sum(axis=1)
HUES64_rep2_tfxn1.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep2_tfxn1.head()
for i, f in enumerate(HUES64_rep2_tfxn2_fs):
    if i == 0:
        HUES64_rep2_tfxn2 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep2_tfxn2))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep2_tfxn2 = HUES64_rep2_tfxn2.merge(tmp, on="barcode")
HUES64_rep2_tfxn2["count"] = HUES64_rep2_tfxn2[["count_x", "count_y"]].sum(axis=1)
HUES64_rep2_tfxn2.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep2_tfxn2.head()
for i, f in enumerate(HUES64_rep2_tfxn3_fs):
    if i == 0:
        HUES64_rep2_tfxn3 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep2_tfxn3))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep2_tfxn3 = HUES64_rep2_tfxn3.merge(tmp, on="barcode")
HUES64_rep2_tfxn3["count"] = HUES64_rep2_tfxn3[["count_x", "count_y"]].sum(axis=1)
HUES64_rep2_tfxn3.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep2_tfxn3.head()<jupyter_output>239653
239653<jupyter_text>HUES64 rep 3<jupyter_code>for i, f in enumerate(HUES64_rep3_tfxn1_fs):
    if i == 0:
        HUES64_rep3_tfxn1 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep3_tfxn1))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep3_tfxn1 = HUES64_rep3_tfxn1.merge(tmp, on="barcode")
HUES64_rep3_tfxn1["count"] = HUES64_rep3_tfxn1[["count_x", "count_y"]].sum(axis=1)
HUES64_rep3_tfxn1.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep3_tfxn1.head()
for i, f in enumerate(HUES64_rep3_tfxn2_fs):
    if i == 0:
        HUES64_rep3_tfxn2 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep3_tfxn2))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep3_tfxn2 = HUES64_rep3_tfxn2.merge(tmp, on="barcode")
HUES64_rep3_tfxn2["count"] = HUES64_rep3_tfxn2[["count_x", "count_y"]].sum(axis=1)
HUES64_rep3_tfxn2.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep3_tfxn2.head()
for i, f in enumerate(HUES64_rep3_tfxn3_fs):
    if i == 0:
        HUES64_rep3_tfxn3 = pd.read_table(f, sep="\t")
        print(len(HUES64_rep3_tfxn3))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        HUES64_rep3_tfxn3 = HUES64_rep3_tfxn3.merge(tmp, on="barcode")
HUES64_rep3_tfxn3["count"] = HUES64_rep3_tfxn3[["count_x", "count_y"]].sum(axis=1)
HUES64_rep3_tfxn3.drop(["count_x", "count_y"], axis=1, inplace=True)
HUES64_rep3_tfxn3.head()<jupyter_output>239653
239653<jupyter_text>mESC rep 1<jupyter_code>for i, f in enumerate(mESC_rep1_tfxn1_fs):
    if i == 0:
        mESC_rep1_tfxn1 = pd.read_table(f, sep="\t")
        print(len(mESC_rep1_tfxn1))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        mESC_rep1_tfxn1 = mESC_rep1_tfxn1.merge(tmp, on="barcode")
mESC_rep1_tfxn1["count"] = mESC_rep1_tfxn1[["count_x", "count_y"]].sum(axis=1)
mESC_rep1_tfxn1.drop(["count_x", "count_y"], axis=1, inplace=True)
mESC_rep1_tfxn1.head()<jupyter_output>239653
239653<jupyter_text>mESC rep 2<jupyter_code>for i, f in enumerate(mESC_rep2_tfxn1_fs):
    if i == 0:
        mESC_rep2_tfxn1 = pd.read_table(f, sep="\t")
        print(len(mESC_rep2_tfxn1))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        mESC_rep2_tfxn1 = mESC_rep2_tfxn1.merge(tmp, on="barcode")
mESC_rep2_tfxn1["count"] = mESC_rep2_tfxn1[["count_x", "count_y", "count"]].sum(axis=1)
mESC_rep2_tfxn1.drop(["count_x", "count_y"], axis=1, inplace=True)
mESC_rep2_tfxn1.head()<jupyter_output>239653
239653
239653<jupyter_text>mESC rep 3<jupyter_code>for i, f in enumerate(mESC_rep3_tfxn1_fs):
    if i == 0:
        mESC_rep3_tfxn1 = pd.read_table(f, sep="\t")
        print(len(mESC_rep3_tfxn1))
    else:
        tmp = pd.read_table(f, sep="\t")
        print(len(tmp))
        mESC_rep3_tfxn1 = mESC_rep3_tfxn1.merge(tmp, on="barcode")
mESC_rep3_tfxn1["count"] = mESC_rep3_tfxn1[["count_x", "count_y", "count"]].sum(axis=1)
mESC_rep3_tfxn1.drop(["count_x", "count_y"], axis=1, inplace=True)
mESC_rep3_tfxn1.head()<jupyter_output>239653
239653
239653<jupyter_text>2. write files<jupyter_code>HUES64_rep1_tfxn1.to_csv("../../../GEO_submission/MPRA__HUES64__rep1__tfxn1.BARCODES.txt", sep="\t", index=False)
HUES64_rep1_tfxn2.to_csv("../../../GEO_submission/MPRA__HUES64__rep1__tfxn2.BARCODES.txt", sep="\t", index=False)
HUES64_rep1_tfxn3.to_csv("../../../GEO_submission/MPRA__HUES64__rep1__tfxn3.BARCODES.txt", sep="\t", index=False)
HUES64_rep2_tfxn1.to_csv("../../../GEO_submission/MPRA__HUES64__rep2__tfxn1.BARCODES.txt", sep="\t", index=False)
HUES64_rep2_tfxn2.to_csv("../../../GEO_submission/MPRA__HUES64__rep2__tfxn2.BARCODES.txt", sep="\t", index=False)
HUES64_rep2_tfxn3.to_csv("../../../GEO_submission/MPRA__HUES64__rep2__tfxn3.BARCODES.txt", sep="\t", index=False)
HUES64_rep3_tfxn1.to_csv("../../../GEO_submission/MPRA__HUES64__rep3__tfxn1.BARCODES.txt", sep="\t", index=False)
HUES64_rep3_tfxn2.to_csv("../../../GEO_submission/MPRA__HUES64__rep3__tfxn2.BARCODES.txt", sep="\t", index=False)
HUES64_rep3_tfxn3.to_csv("../../../GEO_submission/MPRA__HUES64__rep3__tfxn3.BARCODES.txt", sep="\t", index=False)
mESC_rep1_tfxn1.to_csv("../../../GEO_submission/MPRA__mESC__rep1__tfxn1.BARCODES.txt", sep="\t", index=False)
mESC_rep2_tfxn1.to_csv("../../../GEO_submission/MPRA__mESC__rep2__tfxn1.BARCODES.txt", sep="\t", index=False)
mESC_rep3_tfxn1.to_csv("../../../GEO_submission/MPRA__mESC__rep3__tfxn1.BARCODES.txt", sep="\t", index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16779145163424639, 'fraction_numerical': 0.0788672753738256, 'mean_word_length': 4.827293754818813, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '4449', 'license': 'MIT', 'n_tokens_mistral': 3901, 'n_tokens_neox': 3687, 'n_words': 394, 'path': 'analysis/01__mpra/00__preprocess_counts/00__make_GEO_files.ipynb', 'repo_name': 'Mele-Lab/2020_GenomeBiology_CisTransMPRA', 'size': '7557'}