fix columns
Browse files- affinity-data-combined.parquet +2 -2
- combine_data.py +2 -1
affinity-data-combined.parquet
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:84ad94bcd9f58af607561ddab91522fd892488bec5cbc337bbd33f11d2127fa4
|
3 |
+
size 911748102
|
combine_data.py
CHANGED
@@ -3,7 +3,7 @@ import numpy as np
|
|
3 |
|
4 |
def combine_csv_files(csv_file_list):
|
5 |
# Read and combine all CSV files into a single dataframe
|
6 |
-
combined_df = pd.concat([pd.
|
7 |
|
8 |
# Remove duplicate rows
|
9 |
combined_df = combined_df.drop_duplicates(subset=['seq', 'smiles_can', 'neg_log10_affinity_M'])
|
@@ -30,6 +30,7 @@ def combine_csv_files(csv_file_list):
|
|
30 |
combined_df['affinity_std'] = affinity_std
|
31 |
combined_df['affinity_norm'] = (combined_df['neg_log10_affinity_M'] - affinity_mean) / affinity_std
|
32 |
|
|
|
33 |
return combined_df
|
34 |
|
35 |
combined_df = combine_csv_files(['glaser.parquet', 'davis-filtered.parquet', 'pdbbind-2020-combined.parquet', 'bindingdb-kd-filtered.parquet', 'bindingdb-ki.parquet', 'bindingdb-ic50.parquet'])
|
|
|
3 |
|
4 |
def combine_csv_files(csv_file_list):
|
5 |
# Read and combine all CSV files into a single dataframe
|
6 |
+
combined_df = pd.concat([pd.read_parquet(file) for file in csv_file_list], ignore_index=True)
|
7 |
|
8 |
# Remove duplicate rows
|
9 |
combined_df = combined_df.drop_duplicates(subset=['seq', 'smiles_can', 'neg_log10_affinity_M'])
|
|
|
30 |
combined_df['affinity_std'] = affinity_std
|
31 |
combined_df['affinity_norm'] = (combined_df['neg_log10_affinity_M'] - affinity_mean) / affinity_std
|
32 |
|
33 |
+
combined_df["affinity_uM"] = combined_df["neg_log10_affinity_M"].apply(lambda x: (10**(-x))*1e6)
|
34 |
return combined_df
|
35 |
|
36 |
combined_df = combine_csv_files(['glaser.parquet', 'davis-filtered.parquet', 'pdbbind-2020-combined.parquet', 'bindingdb-kd-filtered.parquet', 'bindingdb-ki.parquet', 'bindingdb-ic50.parquet'])
|