KennthShang / PhaBOX

Local version of the phage identification and analysis web server (tool set)
https://phage.ee.cityu.edu.hk/
Academic Free License v3.0
27 stars 2 forks source link

why only have phagcn_prediction.csv phamer_prediction.csv phatyp_prediction.csv,but not cherry_prediction.csv #14

Open Wangdongyang12 opened 3 months ago

Wangdongyang12 commented 3 months ago

Could you please help me with this issue here? here is my result and log: ########################### result ############################################ this is only have three result of the contigs: phagcn_prediction.csv phamer_prediction.csv phatyp_prediction.csv

wc -l *.csv 39215 phagcn_prediction.csv 114305 phamer_prediction.csv 39215 phatyp_prediction.csv 192735 total ########################### log ############################################# Traceback (most recent call last): File "/xx/05.phabox/PhaBOX-main/main.py", line 1170, in node2label[node] = prokaryote_df[prokaryote_df['Accession'] == crispr_pred[node]]['Species'].values[0] IndexError: index 0 is out of bounds for axis 0 with size 0 100%|██████████| 1226/1226 [40:09:16<00:00, 117.91s/it] ############################################################################# By the way, my other files can generate normal result files, so what could be the reason for this

ls -lhtr total 39M 633K 3月 31 13:03 phamer_prediction.csv 248K 3月 31 13:03 phatyp_prediction.csv 239K 3月 31 13:03 phagcn_prediction.csv 326K 3月 31 13:03 cherry_prediction.csv 1.8M 3月 31 13:03 phagcn_edge.csv 91K 3月 31 13:03 phagcn_node.csv 2.8M 3月 31 13:03 cherry_edge.csv 295K 3月 31 13:03 cherry_node.csv 20M 3月 31 13:03 significant_proteins.fa 14M 3月 31 13:03 blast_results.tab

KennthShang commented 3 months ago

Thanks for reporting the issue.

This maybe caused by the situation that the CRISPRs results do not have the species-level taxa.

We have fixed this bug in the latest version. Please re-download the main.py and cherry_single.py to update your local version.

Besides, to save your time, you can rerun your files with the cherry_single.py to get the remaining cherry results. Please use the predicted phage fasta as your input. The file should be in the output folder of your first run (named as checked_phage_contigs.fa or phage_contigs.fa I suppose)

Best, Jiayu

Wangdongyang12 commented 3 months ago

Thanks for you, but i have the same error: the report of error: ######################### error ############### adj: (5301, 5301) features: (5301, 256) x : tensor([[0.0113, 0.0103, 0.0064, ..., 0.0098, 0.0059, 0.0135], [0.0109, 0.0106, 0.0058, ..., 0.0076, 0.0052, 0.0118], [0.0017, 0.0018, 0.0024, ..., 0.0015, 0.0018, 0.0017], ..., [0.0002, 0.0002, 0.0005, ..., 0.0003, 0.0004, 0.0002], [0.0200, 0.0076, 0.0114, ..., 0.0088, 0.0072, 0.0186], [0.0057, 0.0039, 0.0047, ..., 0.0045, 0.0042, 0.0057]], device='cuda:0') sp: tensor([[0.3333, 0.3333, 0.0000, ..., 0.0000, 0.0000, 0.0000], [0.3333, 0.3333, 0.0000, ..., 0.0000, 0.0000, 0.0000], [0.0000, 0.0000, 0.0217, ..., 0.0000, 0.0000, 0.0000], ..., [0.0000, 0.0000, 0.0000, ..., 0.0196, 0.0000, 0.0000], [0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0137, 0.0000], [0.0000, 0.0000, 0.0000, ..., 0.0000, 0.0000, 0.0143]], device='cuda:0') input dim: 256 output dim: 256 num_features_nonzero: 0 Traceback (most recent call last): File "/home/wangdy2/teacher_lin/phabox/test4/result_test_080/PhaBOX/Cherry_single.py", line 684, in pred = prokaryote_df[prokaryote_df['Accession'] == crispr_pred[virus]]['Species'].values[0] IndexError: index 0 is out of bounds for axis 0 with size 0

##################################### this is my step of cherry_single.py: python /home/wangdy2/teacher_lin/phabox/test4/result_test_080/PhaBOX/Cherry_single.py --contigs /home/wangdy2/teacher_lin/phabox/test4/result_test_080/phage_contigs.fa --threads 60 --len 2000 --out test_20240405 --parampth /home/wangdy2/database/phabox/parameters --dbdir /home/wangdy2/database/phabox/database --midfolder tmp --rootpth /home/wangdy2/teacher_lin/phabox/test4/result_test_20240405 --scriptpth /home/wangdy2/teacher_lin/phabox/test4/result_test_080/PhaBOX/script

But I randomly select a few sequences and can run them through online websites get the result. (https://phage.ee.cityu.edu.hk/

KennthShang commented 3 months ago

Sorry, it seems there is another place I missed to revise. I am on a leave and will fix it tomorrow night. Sorry for the delay

Wangdongyang12 commented 3 months ago

Thank you very much

KennthShang commented 3 months ago

Hi, I have updated the program, and hopefully, it can be run on your data. Please check through.

Best, Jiayu

Wangdongyang12 commented 3 months ago

Thank you very much,and i get the result

KennthShang commented 3 months ago

Good to know.

Best, Jiayu

Wangdongyang12 commented 3 months ago

Sorry, I'm going to test some of the contigs and I can get results, but when I run all the sequences, I still get a similar error ################################################### Traceback (most recent call last): File "/home/wangdongyang/data/teacher_linyan/virsortv2/05.phabox/PhaBOX/main.py", line 1369, in pred = prokaryote_df[prokaryote_df['Accession'] == crispr_pred[virus]]['Species'].values[0] IndexError: index 0 is out of bounds for axis 0 with size 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/wangdongyang/data/teacher_linyan/virsortv2/05.phabox/PhaBOX/main.py", line 1371, in pred = f'Unknown species with accession {crispr_pred[node]}' KeyError: 'GCF_000172635' 100%|██████████| 147/147 [2:47:49<00:00, 68.50s/it]

for exampe: only one can get the result

image
KennthShang commented 3 months ago

Sorry, seems I forgot to update the main.py. Please try again to see whether there is any other typos

Wangdongyang12 commented 3 months ago

I tried main.py and it always got an error, but I ran it separately in the cherry_single.py always yields the right result, thank you for your reply

Wangdongyang12 commented 3 months ago

Thanks for your help, I was finally able to run successfully this time