Skip to content
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

ValueError: The condensed distance matrix must contain only finite values. #235

Closed
TSL-RamKrishna opened this issue Feb 2, 2021 · 4 comments
Assignees
Labels
bug something isn't working how it should enhancement something we'd like pyani to do that it doesn't already Marked for closure Ready to close

Comments

@TSL-RamKrishna
Copy link

TSL-RamKrishna commented Feb 2, 2021

My command is:

average_nucleotide_identity.py -i tests/test_ani_data/ -o tests/test_ANIb_output \
-m ANIb -g --workers 4 --scheduler SLURM --gmethod seaborn

And I get the following error:

Traceback (most recent call last):
  File "/hpc-home/shrestha/.local/bin/average_nucleotide_identity.py", line 11, in <module>
    load_entry_point('pyani==0.3.0a0', 'console_scripts', 'average_nucleotide_identity.py')()
  File "/hpc-home/shrestha/.local/lib/python3.7/site-packages/pyani-0.3.0a0-py3.7.egg/pyani/scripts/average_nucleotide_identity.py", line 1019, in run_main
  File "/hpc-home/shrestha/.local/lib/python3.7/site-packages/pyani-0.3.0a0-py3.7.egg/pyani/scripts/average_nucleotide_identity.py", line 836, in draw
  File "/hpc-home/shrestha/.local/lib/python3.7/site-packages/pyani-0.3.0a0-py3.7.egg/pyani/pyani_graphics/sns/__init__.py", line 161, in heatmap
  File "/hpc-home/shrestha/.local/lib/python3.7/site-packages/pyani-0.3.0a0-py3.7.egg/pyani/pyani_graphics/sns/__init__.py", line 118, in get_clustermap
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/_decorators.py", line 46, in inner_f
    return f(**kwargs)
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 1406, in clustermap
    tree_kws=tree_kws, **kwargs)
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 1222, in plot
    tree_kws=tree_kws)
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 1068, in plot_dendrograms
    tree_kws=tree_kws
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/_decorators.py", line 46, in inner_f
    return f(**kwargs)
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 786, in dendrogram
    label=label, rotate=rotate)
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 594, in __init__
    self.linkage = self.calculated_linkage
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 661, in calculated_linkage
    return self._calculate_linkage_scipy()
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/seaborn/matrix.py", line 630, in _calculate_linkage_scipy
    metric=self.metric)
  File "/hpc-home/shrestha/miniconda3/lib/python3.7/site-packages/scipy/cluster/hierarchy.py", line 1057, in linkage
    raise ValueError("The condensed distance matrix must contain only "
ValueError: The condensed distance matrix must contain only finite values.
@TSL-RamKrishna
Copy link
Author

TSL-RamKrishna commented Feb 2, 2021

After I got this error, I worked on the code and found that there was error running blastn commands.

Example of blastn command is:

blastn -out tests/test_ANIb_output/blastn_output/NC_011916_vs_NC_002696.blast_tab \
-query tests/test_ANIb_output/blastn_output/NC_011916-fragments.fna \
-db tests/test_ANIb_output/blastn_output/NC_002696.fna \
-xdrop_gap_final 150 \
-dust no \
-evalue 1e-15 \
-max_target_seqs 1 \
-outfmt '6 qseqid sseqid length mismatch pident nident qlen slen qstart qend sstart send positive ppos gaps' \
-task blastn

Though the blastn command are correct, it runs into the following error:

Error: Too many positional arguments (1), the offending value: qseqid

This is because of the single quote in the option -outfmt not be considered and so the qseqid becomes an argument for blastn which then reports as positional argument error.

The work around is, I saved the commands to a randomly generated filename and run the file as a bash script. Wolla, it runs successfully.

I have pushed my code updates to the forked version of pyani here:
https://github.com/TeamMacLean/pyani

@widdowquinn widdowquinn self-assigned this Feb 17, 2021
@widdowquinn widdowquinn added enhancement something we'd like pyani to do that it doesn't already bug something isn't working how it should labels Feb 17, 2021
@baileythegreen
Copy link
Contributor

@widdowquinn What is to be done here? It seems like this is unlikely to be a general issue, but there's not much information to see what specific circumstances might lead to it.

@widdowquinn
Copy link
Owner

IIRC this was brought into the codebase at about the same time as the SLURM-related changes in #215 . Those changes caused a numberr of regressions and had issues such as hard-coded paths to TSL machines thay caused tests to fail and were tough to trace, so the ideas were reimplemented, rather than code merged.

@widdowquinn widdowquinn added the Marked for closure Ready to close label May 6, 2022
@baileythegreen
Copy link
Contributor

Okay, then we can probably just close it; unless you want to wait for a period of time first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working how it should enhancement something we'd like pyani to do that it doesn't already Marked for closure Ready to close
Projects
None yet
Development

No branches or pull requests

3 participants