Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Descriptor NaN #59

Open
mikewzp opened this issue Jun 2, 2023 · 0 comments
Open

Descriptor NaN #59

mikewzp opened this issue Jun 2, 2023 · 0 comments

Comments

@mikewzp
Copy link

mikewzp commented Jun 2, 2023

Hi, I'm getting trouble with computing descriptors.

[MaSIF-search]

./compute_descriptors.sh 1AKJ_AB_DE
Traceback (most recent call last):
File "/media/ps/3632610B3260D203/DeepLearning/masif/source/masif_ppi_search/masif_ppi_search_comp_desc.py", line 233, in
roc_auc = 1.0 - compute_roc_auc(pos_dists, neg_dists)
File "/media/ps/3632610B3260D203/DeepLearning/masif/source/masif_ppi_search/masif_ppi_search_comp_desc.py", line 21, in compute_roc_auc
return metrics.roc_auc_score(labels, dist_pairs)
File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/metrics/_ranking.py", line 524, in roc_auc_score
y_score = check_array(y_score, ensure_2d=False)
File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 721, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/ps/.conda/envs/masif/lib/python3.6/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

According to the traceback, find that: during compute_roc_auc(pos_dists, neg_dists) these two descriptor files exist but values are NAN.
# Save descriptors
np.save(os.path.join(out_desc_dir, "p1_desc_straight.npy"), desc1_str)
np.save(os.path.join(out_desc_dir, "p1_desc_flipped.npy"), desc1_flip)
# Compute pos_dists
pos_dists = np.sqrt(np.sum(np.square(desc1_str[k1] - desc2_flip[k2]), axis=1))
neg_dists = np.sqrt( np.sum(np.square(desc1_str[kneg1] - desc2_flip[kneg2]), axis=1) )

1AKJ_NaN

[MaSIF-Site]

  • predict_site.sh
  • color_site.sh
    The output of the predict_site script is a contact score calculated by the Neural Network between 0 and 1 for each center point. However, these files are also exist but NAN values.
    (masif) ps@ps:~/DeepLearning/masif/data/masif_site$ ls output/all_feat_3l/pred_data/
    pred_1A0G_A.npy pred_1A0G_B.npy pred_1A0H_D.npy pred_1A0H_E.npy

Does anyone experience similar problems? What the standard output should be?
Any comment or ideas would be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant