Closed MathGon closed 7 years ago
Hi,
I'm not sure what's going wrong, there - the error is initially thrown by matplotlib
in colorbar.py
, and is (I think) probably due to trying to take a log of 0 or some negative value.
Do you have a minimal example input dataset which throws this error that I could use for debugging?
Cheers,
L.
Some Googling suggests that the problem could come from trying to set upper and lower limits on a bounding box, where those values are the same. I've been able to replicate part of your error by only running the analysis on two input sequences. I'll try to fix on this dataset, but if you've got an example set, that would be extremely helpful.
L.
Hmm... my test actually just gives a warning, and doesn't fail in the same way as yours - would you be able to indicate your installed version of matplotlib
?
Hi Leighton,
I use matplotlib 1.4.2
You can find a minimal example input here
Thanks - with matplotlib 1.3.1
I don't reproduce your error. I'll upgrade to 1.4.2 and see what happens.
I can reproduce on matplotlib 1.4.3
,
Hi MathGon,
The problem seems to be fixed for me now, using your data, on matplotlib
1.4.3. If you could please grab the latest HEAD
and test it, then confirm that it's working for you again, I'll close this bug.
The problem seemed to arise from matplotlib
code being stricter about the heatmap colorbar range. That was being set automatically from the input data, so if there was only a single value in the heatmap, the range (max - min value) was zero. matplotlib
1.4.2 and 1.4.3 at least didn't like that, so threw an error.
Thanks for the bug report - if you find any other problems, please do report them - I'll try to be a bit quicker with a fix, next time ;)
Cheers,
L.
I am in the weekend and can not connect to my computer via ssh, I turned it off before you go! I go back Tuesday and I test as soon as I arrive.
Do not worry of the time I think you've been very quick and attentive. Thank you
After test, the problem persists :(
That's frustrating! I'm sorry about that. I've just tested your data on my work machine, where it failed until I took the whitespace out of the input filenames. Once I did that, the analysis goes to completion:
$ ./average_nucleotide_identity.py -i /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data -o /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out -m ANIm -g --gformat png -v
INFO: Namespace(blastall_exe='blastall', blastn_exe='blastn', classes=None, force=False, formatdb_exe='formatdb', fragsize=1020, gformat='png', gmethod='mpl', graphics=True, indirname='/Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data', labels=None, logfile=None, makeblastdb_exe='makeblastdb', maxmatch=False, method='ANIm', noclobber=False, nucmer_exe='nucmer', outdirname='/Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out', scheduler='multiprocessing', skip_blastn=False, skip_nucmer=False, verbose=True, write_excel=False)
INFO: Input directory: /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data
INFO: Creating directory /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out
INFO: Output directory: /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out
INFO: Using ANI method: ANIm
INFO: Using scheduler method: multiprocessing
INFO: Identifying FASTA files in /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data
INFO: Input files:
/Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data/B._abortus_90-12178.fas
/Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data/B._sp._NF2653.fas
INFO: Processing input sequence lengths
INFO: Sequence lengths:
B._abortus_90-12178: 3528544
B._sp._NF2653: 3110281
INFO: Carrying out ANIm analysis
INFO: Running ANIm
INFO: Generating NUCmer command-lines
INFO: Running jobs with multiprocessing
INFO: Command pool now running:
INFO: nucmer -mum -p /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out/B._abortus_90-12178_vs_B._sp._NF2653 /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data/B._abortus_90-12178.fas /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_data/B._sp._NF2653.fas
INFO: Command pool done.
INFO: Cumulative return value: 0
INFO: All multiprocessing jobs complete.
INFO: Processing NUCmer .delta files.
INFO: Writing ANIm results to /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out
INFO: ANIm_alignment_lengths
INFO: ANIm_percentage_identity
INFO: ANIm_alignment_coverage
INFO: ANIm_similarity_errors
INFO: Rendering output graphics
INFO: Graphics format: png
INFO: Graphics method: mpl
INFO: Writing heatmap to /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out/ANIm_alignment_lengths.png
/Users/lpritc/Virtualenvs/pyani/lib/python2.7/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if self._edgecolors == str('face'):
INFO: Writing heatmap to /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out/ANIm_percentage_identity.png
INFO: Writing heatmap to /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out/ANIm_alignment_coverage.png
INFO: Writing heatmap to /Users/lpritc/Development/GitHub/pyani/tests/mgonnet_failing_out/ANIm_similarity_errors.png
INFO: Done.
I have added a requirements.txt
file so, if you're using pip
to manage your Python packages, you should be able to get your machine/virtualenv to the same state as mine by running pip install -r requirements.txt
from in the top-level pyani
directory.
Could you please see if either the file naming or the package installation changes anything for you?
Finally I'm back with my issue which wasn't really solved. It appears that it depends of my input dataset. Have you an idea of the cause of the error?