<jupyter_start><jupyter_text>Get rid of some non-numeric values and change data types<jupyter_code>for col in ['DP', 'GQ', 'MQ', 'QD']:
    print(len(df[df[col]== "."]))
myFilter = (df["DP"]!= ".") & (df["GQ"]!= ".") & (df["MQ"]!= ".") & (df["QD"]!= ".")
df = df[myFilter]
print(df.shape)
# change data type 
cols = ['DP', 'GQ', 'MQ', "QD"]
for col in cols:
    df[col]= df[col].astype("float")
df.to_csv("long_cleared_UpdateAF.csv")<jupyter_output><empty_output><jupyter_text>Apply logsistic regression model<jupyter_code>df.describe()
df["TYPE"] = df["TYPE"].astype("category")
this_formula = "UNMATCH ~ TYPE + DP + GQ + QUAL + FS + AF + MQ + QD"
res = sm.formula.glm(formula=this_formula, family=sm.families.Binomial(), data=df).fit() 
res.summary()
print("Coefficeients")
print(res.params)
print()
print("p-Values")
print(res.pvalues)
print()
print("Dependent variables")
print(res.model.endog_names)
df["QualByDepth"] = df["GQ"]/(df["DP"]+1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22950819672131148, 'fraction_numerical': 0.0010245901639344263, 'mean_word_length': 6.573643410852713, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '506126', 'license': 'Apache-2.0', 'n_tokens_mistral': 409, 'n_tokens_neox': 391, 'n_words': 71, 'path': '.ipynb_checkpoints/logistic_reg_data_clean-UpdateAF-checkpoint.ipynb', 'repo_name': 'plrlhb12/compare_variants', 'size': '976'}