giesselmann / STRique

Nanopore raw signal repeat detection pipeline
MIT License
43 stars 10 forks source link

Installation issue? #1

Closed satomimitsuhashi closed 5 years ago

satomimitsuhashi commented 5 years ago

Hi, I have got this error message when I tried two test commands.


python scripts/STRique_test.py EEE ERROR: test_Detection (main.DetectionTest) Traceback (most recent call last): File "scripts/STRique_test.py", line 55, in test_Detection dt.add_target('c9orf72', repeat, prefix, suffix) File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 439, in add_target flankedRepeatHMM(repeat, prefix, suffix, self.pm, self.HMM_config) ) File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 338, in init self.build_model() File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 366, in build_model self.bake(merge='All') File "pomegranate/hmm.pyx", line 826, in pomegranate.hmm.HiddenMarkovModel.bake File "/home/satomi/anaconda3/lib/python3.7/site-packages/networkx/classes/reportviews.py", line 666, in return (self._report(n, nbr, dd) for n, nbrs in self._nodes_nbrs() RuntimeError: dictionary changed size during iteration

ERROR: test_Interpolation (main.DetectionTest) Traceback (most recent call last): File "scripts/STRique_test.py", line 75, in test_Interpolation dt.add_target('fmr1', repeat, prefix, suffix) File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 439, in add_target flankedRepeatHMM(repeat, prefix, suffix, self.pm, self.HMM_config) ) File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 338, in init self.build_model() File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 366, in build_model self.bake(merge='All') File "pomegranate/hmm.pyx", line 826, in pomegranate.hmm.HiddenMarkovModel.bake File "/home/satomi/anaconda3/lib/python3.7/site-packages/networkx/classes/reportviews.py", line 666, in return (self._report(n, nbr, dd) for n, nbrs in self._nodes_nbrs() RuntimeError: dictionary changed size during iteration

ERROR: test_normalization (main.DetectionTest) Traceback (most recent call last): File "scripts/STRique_test.py", line 92, in test_normalization dt.add_target('c9orf72', repeat, prefix, suffix) File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 439, in add_target flankedRepeatHMM(repeat, prefix, suffix, self.pm, self.HMM_config) ) File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 338, in init self.build_model() File "/home/satomi/nanoSTRique/STRique/scripts/STRique.py", line 366, in build_model self.bake(merge='All') File "pomegranate/hmm.pyx", line 826, in pomegranate.hmm.HiddenMarkovModel.bake File "/home/satomi/anaconda3/lib/python3.7/site-packages/networkx/classes/reportviews.py", line 666, in return (self._report(n, nbr, dd) for n, nbrs in self._nodes_nbrs() RuntimeError: dictionary changed size during iteration Ran 3 tests in 0.365s

FAILED (errors=3)


cat data/c9orf72.sam | python3 scripts/STRique.py ./data/ ./models/template_median68pA6mer.model ./configs/repeat_config.tsv ID target strand count score_prefix score_suffix log_p offset ticks Traceback (most recent call last): File "scripts/STRique.py", line 764, in counts = rd.detect(line) File "scripts/STRique.py", line 551, in detect self.init_hmm() File "scripts/STRique.py", line 512, in init_hmm self.repeatCounter.add_target(target_name, repeat, prefix, suffix) File "scripts/STRique.py", line 439, in add_target flankedRepeatHMM(repeat, prefix, suffix, self.pm, self.HMM_config) ) File "scripts/STRique.py", line 338, in init self.build_model() File "scripts/STRique.py", line 366, in build_model self.bake(merge='All') File "pomegranate/hmm.pyx", line 826, in pomegranate.hmm.HiddenMarkovModel.bake File "/home/satomi/anaconda3/lib/python3.7/site-packages/networkx/classes/reportviews.py", line 666, in return (self._report(n, nbr, dd) for n, nbrs in self._nodes_nbrs() RuntimeError: dictionary changed size during iteration

I think I was using: Python 3.7.0 networks 2.1 numpy 1.15.1 pomgranate 0.11.0

The same thing occurred when I tested them with python 3.5.0. I would be grateful if you could let me know what was wrong.

Best, Satomi

giesselmann commented 5 years ago

Dear Satomi, thank you for the report, in development we used python 3.5 I'll set up a 3.7 and try to reproduce the issue. Pomegranate requires for some reason a very specific networkx version >1.8 and <2.0. I'll check if we can relax this a bit with more recent pomegranate versions.

Pay

giesselmann commented 5 years ago

Dear Satomi, I had to downgrade to pomegranate 0.10.0 and also specified more precise versions of the other dependencies. Please note that the README has been updated in the installation section. I've added travis tests for python 3.5, 3.6 and 3.7 all passing right now. To fix the issue I would recommend starting with a fresh cloned repo and install everything in a virtual environment dedicated for STRique. Please let me know if you encounter further problems or if you're able to install the software properly. Pay

satomimitsuhashi commented 5 years ago

Dear Pay, I could finally install it and successfully finished tests. Thank you for fixing those bugs! Satomi