KennthShang / PhaGCN2.0

27 stars 10 forks source link

IndexError: arrays used as indices nust be of integer (or boolean) type #11

Closed wjdbxdbx closed 2 months ago

wjdbxdbx commented 2 months ago

Thank you very much for providing the PhaGCN2.2 tool! I encountered some errors during use and would like to ask for your assistance.

I input a bacteriophage with a length of 39,048 bp, which is greater than 1,700 bp and a multiple of 3. I also checked that it does not contain spaces or non-ATCG characters. However, during execution, I encountered the following error: ...........................Generating Knowledge graph........................... Namespace(database='Caudoviridae', model='gcn', learning_rate=0.01, epochs=200, hidden=64, dropout=0, weight_decay=0.0005, max_degree=3) Running with cpu Traceback (most recent call last): File "/hone/dbx/PhaGCN2.0/PhaGCN2.0/run_GCN.py", line 44, in test_mask = sample_mask(idx_test, labels.shape[0]) File "/hone/dbx/PhaGCN2.0/PhaGCN2.0/data.py", line 24, in sample_mask mask[idx] = 1 IndexError: arrays used as indices must be of integer (or boolean) type GCN Error for file contig_0 cat: 'pred/*': No such file or directory I tried other bacteriophages, and they ran normally, but only this one encountered the issue. I checked that both the all_protein and single_contig folders contain 0_1 files (while 0_0 and 0_2 are from my other bacteriophages), but the CSV files in the pred folder do not contain 0_1 information; they only include 0_0 and 0_2.

yuanwenguang666 commented 2 months ago

Dear

Thanks a lot of your question.

Unfortunately, due to the current limitations of the ICTV virus database, not all input virus sequences can be classified. The phage sequence you provided, which has a length of 39,048 bp, did not match any entries in the ICTV database. Therefore, it should be classified as unknown. These question are not same as issue 9.

At present, we are planning a significant update to our database to include more representative virus, which will help improve the classification of novel viruses in the future. Stay tuned and thanks again.

Don’t hesitate to let me know if you have other questions.

Wen-Guang

wjdbxdbx commented 2 months ago

Thank you for your very timely reply! I appreciate the answers you’ve provided. Kudos to you, and I wish you all the best in everything!