-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gimme motifs error: creating statistics report crashed with KeyError: 'Factor' #170
Comments
Hmm. I don't know what the underlying cause of this error is, but can you try changing line 1332 of
to
If that works I'll add it to the next bugfix release. |
Hi @simonvh I updated the code as you recommended, and I got the final report Here is the log: 2021-01-15 10:07:50,709 - INFO - creating background (random)
2021-01-15 10:08:08,670 - INFO - skipping de novo
2021-01-15 10:08:08,671 - INFO - creating motif scan tables
2021-01-15 10:08:17,602 - INFO - using 14000 sequences
2021-01-15 10:08:17,603 - INFO - Creating index for genomic GC frequencies.
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/subprocess.py:849: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stderr = io.open(errread, 'rb', bufsize)
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/subprocess.py:849: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stderr = io.open(errread, 'rb', bufsize)
2021-01-15 10:26:11,048 - WARNING - Using 0.75-0.80
2021-01-15 10:27:38,182 - WARNING - Using 0.75-0.80
2021-01-15 10:29:36,285 - INFO - calculating stats
2021-01-15 10:30:24,956 - INFO - selecting non-redundant motifs
2021-01-15 10:30:31,031 - INFO - selected 10 non-redundant motifs: ROC AUC 0.940, PR AUC 0.882
2021-01-15 10:30:31,905 - INFO - determining FPR-based threshold
2021-01-15 10:30:33,615 - WARNING - Using 0.75-0.80
2021-01-15 10:30:34,907 - INFO - determining FPR-based threshold
2021-01-15 10:30:36,917 - WARNING - Using 0.75-0.80
2021-01-15 10:30:38,371 - INFO - determining FPR-based threshold
2021-01-15 10:30:40,168 - WARNING - Using 0.75-0.80
2021-01-15 10:30:41,453 - INFO - determining FPR-based threshold
2021-01-15 10:30:43,179 - WARNING - Using 0.75-0.80
2021-01-15 10:30:44,485 - INFO - determining FPR-based threshold
2021-01-15 10:30:46,188 - WARNING - Using 0.75-0.80
2021-01-15 10:30:47,492 - INFO - determining FPR-based threshold
2021-01-15 10:30:49,187 - WARNING - Using 0.75-0.80
2021-01-15 10:30:50,613 - INFO - determining FPR-based threshold
2021-01-15 10:30:52,342 - WARNING - Using 0.75-0.80
2021-01-15 10:30:53,682 - INFO - determining FPR-based threshold
2021-01-15 10:30:55,352 - WARNING - Using 0.75-0.80
2021-01-15 10:30:56,642 - INFO - determining FPR-based threshold
2021-01-15 10:30:58,510 - WARNING - Using 0.75-0.80
2021-01-15 10:30:59,764 - INFO - determining FPR-based threshold
2021-01-15 10:31:01,410 - WARNING - Using 0.75-0.80
2021-01-15 10:31:01,825 - INFO - creating statistics report
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/core/arraylike.py:274: RuntimeWarning: divide by zero encountered in log10
result = getattr(ufunc, method)(*inputs, **kwargs)
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/io/formats/style.py:1268: RuntimeWarning: invalid value encountered in double_scalars
norm = colors.Normalize(smin - (rng * low), smax + (rng * high))
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/core/arraylike.py:274: RuntimeWarning: divide by zero encountered in log10
result = getattr(ufunc, method)(*inputs, **kwargs)
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/io/formats/style.py:1268: RuntimeWarning: invalid value encountered in double_scalars
norm = colors.Normalize(smin - (rng * low), smax + (rng * high))
2021-01-15 10:33:30,057 - INFO - gimme motifs final report: gimmemotifs/zone2.random_bg.debug/gimme.motifs.html
As you may see, there are some warnings about log10 division by 0, but they don't seem to affect the report creation. thanks a lot for your help Best |
I just checked my script again and I added |
I confirmed you that the trick fixed the error also on a full motif analysis. Should I take caution of these warnings in the interpretation of the results? thank you very much Best Here is the log: 2021-01-15 11:00:18,736 - INFO - creating background (random)
2021-01-15 11:00:36,717 - INFO - starting full motif analysis
2021-01-15 11:00:36,744 - INFO - using original size
2021-01-15 11:00:36,744 - INFO - preparing input from FASTA
2021-01-15 11:00:36,744 - INFO - preparing input (FASTA)
2021-01-15 11:01:08,866 - INFO - starting motif prediction (xl)
2021-01-15 11:01:08,866 - INFO - tools: MEME, BioProspector, Homer
2021-01-15 11:01:09,633 - INFO - all jobs submitted
2021-01-15 11:01:21,071 - INFO - Homer_width_6 finished, found 5 motifs
2021-01-15 11:01:30,753 - INFO - Homer_width_8 finished, found 5 motifs
2021-01-15 11:02:19,223 - INFO - Homer_width_10 finished, found 5 motifs
2021-01-15 11:03:31,532 - INFO - Homer_width_12 finished, found 5 motifs
2021-01-15 11:06:07,383 - INFO - Homer_width_14 finished, found 5 motifs
2021-01-15 11:06:07,775 - INFO - MEME_width_6 finished, found 0 motifs
2021-01-15 11:06:07,957 - INFO - MEME_width_8 finished, found 0 motifs
2021-01-15 11:06:08,127 - INFO - MEME_width_10 finished, found 0 motifs
2021-01-15 11:06:08,291 - INFO - MEME_width_12 finished, found 0 motifs
2021-01-15 11:06:08,369 - INFO - BioProspector_width_10 finished, found 5 motifs
2021-01-15 11:06:08,446 - INFO - MEME_width_14 finished, found 0 motifs
2021-01-15 11:06:08,541 - INFO - MEME_width_16 finished, found 0 motifs
2021-01-15 11:06:08,613 - INFO - MEME_width_18 finished, found 0 motifs
2021-01-15 11:06:08,720 - INFO - MEME_width_20 finished, found 0 motifs
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, 'rb', bufsize)
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/subprocess.py:849: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stderr = io.open(errread, 'rb', bufsize)
2021-01-15 11:06:09,069 - INFO - using 14000 sequences
2021-01-15 11:06:13,654 - INFO - BioProspector_width_6 finished, found 5 motifs
2021-01-15 11:06:31,797 - INFO - BioProspector_width_8 finished, found 5 motifs
2021-01-15 11:06:47,815 - INFO - BioProspector_width_12 finished, found 5 motifs
2021-01-15 11:07:19,243 - INFO - BioProspector_width_16 finished, found 5 motifs
2021-01-15 11:07:32,884 - INFO - BioProspector_width_14 finished, found 5 motifs
2021-01-15 11:07:41,562 - INFO - BioProspector_width_20 finished, found 5 motifs
2021-01-15 11:08:24,047 - INFO - BioProspector_width_18 finished, found 5 motifs
2021-01-15 11:08:49,898 - INFO - Homer_width_16 finished, found 5 motifs
2021-01-15 11:15:59,385 - INFO - Homer_width_20 finished, found 5 motifs
2021-01-15 11:17:03,846 - INFO - Homer_width_18 finished, found 5 motifs
2021-01-15 11:17:44,095 - INFO - predicted 80 motifs
2021-01-15 11:17:44,116 - INFO - 80 motifs are significant
2021-01-15 11:17:44,705 - INFO - clustering 80 motifs.
2021-01-15 11:19:13,946 - INFO - creating de novo reports
2021-01-15 11:20:16,271 - INFO - finished
2021-01-15 11:20:16,271 - INFO - output dir: gimmemotifs/zone2.random_bg.debug
2021-01-15 11:20:16,271 - INFO - de novo report: gimmemotifs/zone2.random_bg.debug/gimme.denovo.html
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, 'rb', bufsize)
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/subprocess.py:849: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
self.stderr = io.open(errread, 'rb', bufsize)
2021-01-15 11:20:53,061 - INFO - creating motif scan tables
2021-01-15 11:22:06,465 - WARNING - Using 0.75-0.80
2021-01-15 11:23:27,901 - WARNING - Using 0.75-0.80
2021-01-15 11:25:30,911 - INFO - calculating stats
2021-01-15 11:26:27,389 - INFO - selecting non-redundant motifs
2021-01-15 11:26:37,981 - INFO - selected 12 non-redundant motifs: ROC AUC 0.966, PR AUC 0.927
2021-01-15 11:26:38,923 - INFO - determining FPR-based threshold
2021-01-15 11:26:40,562 - WARNING - Using 0.75-0.80
2021-01-15 11:26:41,881 - INFO - determining FPR-based threshold
2021-01-15 11:26:43,675 - WARNING - Using 0.75-0.80
2021-01-15 11:26:45,504 - WARNING - Using 0.75-0.80
2021-01-15 11:26:47,246 - WARNING - Using 0.75-0.80
2021-01-15 11:26:48,558 - INFO - determining FPR-based threshold
2021-01-15 11:26:50,237 - WARNING - Using 0.75-0.80
2021-01-15 11:26:51,566 - INFO - determining FPR-based threshold
2021-01-15 11:26:53,241 - WARNING - Using 0.75-0.80
2021-01-15 11:26:54,578 - INFO - determining FPR-based threshold
2021-01-15 11:26:56,236 - WARNING - Using 0.75-0.80
2021-01-15 11:26:57,533 - INFO - determining FPR-based threshold
2021-01-15 11:26:59,186 - WARNING - Using 0.75-0.80
2021-01-15 11:27:00,457 - INFO - determining FPR-based threshold
2021-01-15 11:27:01,994 - WARNING - Using 0.75-0.80
2021-01-15 11:27:03,671 - WARNING - Using 0.75-0.80
2021-01-15 11:27:05,012 - INFO - determining FPR-based threshold
2021-01-15 11:27:06,684 - WARNING - Using 0.75-0.80
2021-01-15 11:27:08,445 - WARNING - Using 0.75-0.80
2021-01-15 11:27:08,817 - INFO - creating statistics report
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/core/arraylike.py:274: RuntimeWarning: divide by zero encountered in log10
result = getattr(ufunc, method)(*inputs, **kwargs)
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/io/formats/style.py:1268: RuntimeWarning: invalid value encountered in double_scalars
norm = colors.Normalize(smin - (rng * low), smax + (rng * high))
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/core/arraylike.py:274: RuntimeWarning: divide by zero encountered in log10
result = getattr(ufunc, method)(*inputs, **kwargs)
/opt/share/FLOCAD/userspace/jtran1/miniconda3/envs/gimmemotifs/lib/python3.8/site-packages/pandas/io/formats/style.py:1268: RuntimeWarning: invalid value encountered in double_scalars
norm = colors.Normalize(smin - (rng * low), smax + (rng * high))
2021-01-15 11:29:43,570 - INFO - gimme motifs final report: gimmemotifs/zone2.random_bg.debug/gimme.motifs.html
|
Sorry for the late reply and thanks for checking! You can ignore the warnings. |
Hi @simonvh
I ran gimme motifs after several attempts and add-ons to my script you suggested me earlier.
But still I was not able to complete the full analysis. It crashed trying to generate the statistics report throwing a
KeyError: 'Factor'
.Can you help please?
@jos4uke
To Reproduce
Error logs
*Installation information:
bash mamba create -n gimmemotifs python=3 gimmemotifs
Additional context
Here is the config file content:
The text was updated successfully, but these errors were encountered: