-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from jyaacoub/development
Development
- Loading branch information
Showing
29 changed files
with
20,591 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,19 @@ | ||
#%% | ||
from src.data_processing.datasets import PDBbindDataset | ||
from src.utils import config as cfg | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
# %% | ||
from src.data_analysis.figures import prepare_df, fig3_edge_feat | ||
from src.utils import config | ||
|
||
# d0 = pd.read_csv(f'{cfg.DATA_ROOT}/DavisKibaDataset/davis/nomsa_anm/full/XY.csv', index_col=0) | ||
d0 = pd.read_csv(f'{cfg.DATA_ROOT}/PDBbindDataset/nomsa_anm/full/XY.csv', index_col=0) | ||
from transformers import AutoTokenizer, AutoModel | ||
|
||
d0['len'] = d0.prot_seq.str.len() | ||
|
||
# %% | ||
n, bins, patches = plt.hist(d0['len'], bins=20) | ||
# Set labels and title | ||
plt.xlabel('Protein Sequence length') | ||
plt.ylabel('Frequency') | ||
plt.title('Histogram of Protein Sequence length (davis)') | ||
df = prepare_df('results/model_media/model_stats.csv') | ||
|
||
# Add counts to each bin | ||
for count, x, patch in zip(n, bins, patches): | ||
plt.text(x + 0.5, count, str(int(count)), ha='center', va='bottom') | ||
# %% | ||
fig3_edge_feat(df, show=True, exclude=[]) | ||
|
||
cutoff= 1500 | ||
print(f"Eliminating codes above {cutoff} length would reduce the dataset by: {len(d0[d0['len'] > cutoff])}") | ||
print(f"\t - Eliminates {len(d0[d0['len'] > cutoff].index.unique())} unique proteins") | ||
# %% | ||
print('test') | ||
|
||
# %% -d PDBbind -f nomsa -e anm | ||
from src.utils.loader import Loader | ||
d1 = Loader.load_dataset('PDBbind', 'nomsa', 'anm') | ||
#### ChemGPT #### | ||
|
||
# %% | ||
tokenizer = AutoTokenizer.from_pretrained("ncfrey/ChemGPT-4.7M") | ||
model = AutoModel.from_pretrained("ncfrey/ChemGPT-4.7M") |
Binary file added
BIN
+22.6 KB
...d/EDIM_PDBbindD_nomsaF_anmE_64B_0.0001LR_0.4D_2000E_originalLF_binaryLE_his.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.6 KB
.../EDIM_PDBbindD_nomsaF_anmE_64B_0.0001LR_0.4D_2000E_originalLF_binaryLE_loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+68.2 KB
...IM_PDBbindD_nomsaF_anmE_64B_0.0001LR_0.4D_2000E_originalLF_binaryLE_scatter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.