-
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.
Was running into silly mem issues with PDBbind since 5 proteins are above 2000 amino acids in length. #50
- Loading branch information
Showing
4 changed files
with
36 additions
and
12 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,9 +1,31 @@ | ||
# %% | ||
from src.data_analysis.figures import prepare_df, fig3_edge_feat | ||
df = prepare_df('results/model_media/model_stats.csv') | ||
#%% | ||
from src.data_processing.datasets import PDBbindDataset | ||
from src.utils import config as cfg | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
|
||
# 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) | ||
|
||
d0['len'] = d0.prot_seq.str.len() | ||
|
||
# %% | ||
fig3_edge_feat(df, show=True, exclude=[]) | ||
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)') | ||
|
||
# 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') | ||
|
||
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") | ||
|
||
# %% -d PDBbind -f nomsa -e anm | ||
from src.utils.loader import Loader | ||
d1 = Loader.load_dataset('PDBbind', 'nomsa', 'anm') | ||
|
||
# %% | ||
print('test') |
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