ma-compbio / Phylo-HMRF

MIT License
15 stars 3 forks source link

Error running on example input #11

Open keoughkath opened 4 years ago

keoughkath commented 4 years ago

Hello,

I'm trying to run phyloHMRF on the example data provided in the repo with the example command provided:

python phylo_hmrf.py -n 20 -r 1 --reload 0 --chromvec 21,22 --miter 100 -p example_input/

however, I get the following error:

NameError: global name 'filename3' is not defined

Thank you, Kathleen

keoughkath commented 4 years ago

Uncommenting line 369 fixed that issue, but then I got this error:

File "/pollard/home/kathleen/projects/harjacking/src/phyloHMRF/Phylo-HMRF/utility.py", line 1526, in write_matrix_image_Ctrl_unsym1 print "species %d: %d %.4f"%(i,len(b)) TypeError: not enough arguments for format string

Which I fixed by commenting out line 1526. After that it seemed to work.

yangymargaret commented 4 years ago

Hi Kathleen @keoughkath, Thank you very much for your interest in Phylo-HMRF, and thank you very much for helping identify the problems in the code. I am sorry that these errors were due to the discrepancies between the updated version of utility.py and the tested version. I do apologize for the errors. I have updated utility.py accordingly. Please let me know if you have any other questions. Many thanks!

Best regards! Yang Yang

keoughkath commented 4 years ago

Thanks for your answers to my questions! Related to running phylo-HMRF on the example data, how much time does this take when you run it? It takes quite a while on my system and I want to make sure there isn't something going wrong that could be causing a long runtime.

yangymargaret commented 4 years ago

Hi Kathleen @keoughkath, I do apologize for my late reply. It took me about 20-30 minutes to run the code the example data. The program performs random initialization of parameters. It will restart parameter initialization if it did not find solutions from one initialization. Then it may take longer time. The example data are relatively of small size. It also takes longer time to run the code on the genome-wide real data (for example, about 1-1.5 days). The code runs in a parallel way across multiple chromosomes. Then the time to use usually depends on the sample size on the larger chromosomes. If the code does not stop after a long time, you could try stopping it manually and restart again, since it is possible that that it didn't find solutions after multiple initializations. Please let me know if you have any other questions. Many thanks!

Best regards! Yang Yang

keoughkath commented 4 years ago

Thanks Yang! I will follow those suggestions and let you know if any more questions pop up.

Thanks! Kathleen

yangymargaret commented 4 years ago

Hi Kathleen @keoughkath, You're welcome. Please let me know if you have any other questions. Many thanks!

Best regards! Yang Yang