LirongWu / MAPE-PPI

Code for ICLR 2024 (Spotlight) paper "MAPE-PPI: Towards Effective and Efficient Protein-Protein Interaction Prediction via Microenvironment-Aware Protein Embedding"
MIT License
253 stars 44 forks source link

Cannot Process the Raw Data #4

Closed SophieSarceau closed 7 months ago

SophieSarceau commented 7 months ago

When I use the command: "python data_process.py --dataset SHS27k" to pre=process the raw data, there occurs and error, image

I wonder if the processing file is the right version. Thanks for your notice and really appreciate your work.

LirongWu commented 7 months ago

The processing file is the correct version to run on my site. I noticed that this error may be due to the latest version of numpy discarding this usage.

As per the official instructions, "If you meant to do this, you must specify 'dtype=object' when creating the ndarray". Following this hint, we can solve this problem.

SophieSarceau commented 7 months ago

Thanks, Lirong. We can use the following code to pre-process the raw data.

r_edge_list = np.array(r_edge_list, dtype=object)
k_edge_list = np.array(k_edge_list, dtype=object)
np.save("../processed_data/protein.rball.edges.{}.npy".format(dataset), r_edge_list, allow_pickle=True)
np.save("../processed_data/protein.knn.edges.{}.npy".format(dataset), k_edge_list, allow_pickle=True)