merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
426 stars 145 forks source link

anvi-script-snvs-to-interactive ValueError: negative dimensions are not allowed #406

Closed palomo11 closed 7 years ago

palomo11 commented 7 years ago

I'm doing a SNV analysis in four genomes. I have been able to visualize the SNV using R but when I try to do it using anvi'o (with this script anvi-script-snvs-to-interactive) for 2 of the genomes I get this error:

Traceback (most recent call last):
  File "/home/projects/env_10000/people/alpal/scripts/anvi-script-snvs-to-interactive", line 98, in <module>
    main(args)
  File "/home/projects/env_10000/people/alpal/scripts/anvi-script-snvs-to-interactive", line 76, in main
    g.generate()
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/summarizer.py", line 853, in generate
    self.gen_clustering_of_view_data()
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/summarizer.py", line 871, in gen_clustering_of_view_data
    clustering.get_newick_tree_data(self.view_data_path, self.tree_file_path)
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/clustering.py", line 118, in get_newick_tree_data
    tree = get_clustering_as_tree(vectors, linkage, distance, progress)
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/clustering.py", line 165, in get_clustering_as_tree
    linkage = hierarchy.linkage(vectors, metric=distance, method=linkage)
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/scipy/cluster/hierarchy.py", line 660, in linkage
    int(_cpy_non_euclid_methods[method]))
  File "scipy/cluster/_hierarchy.pyx", line 733, in scipy.cluster._hierarchy.linkage (scipy/cluster/_hierarchy.c:9058)
ValueError: negative dimensions are not allowed

For another genome I get this error:

Traceback (most recent call last):
  File "/home/projects/env_10000/people/alpal/scripts/anvi-script-snvs-to-interactive", line 98, in <module>
    main(args)
  File "/home/projects/env_10000/people/alpal/scripts/anvi-script-snvs-to-interactive", line 76, in main
    g.generate()
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/summarizer.py", line 853, in generate
    self.gen_clustering_of_view_data()
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/summarizer.py", line 871, in gen_clustering_of_view_data
    clustering.get_newick_tree_data(self.view_data_path, self.tree_file_path)
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/clustering.py", line 118, in get_newick_tree_data
    tree = get_clustering_as_tree(vectors, linkage, distance, progress)
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/anvio/clustering.py", line 165, in get_clustering_as_tree
    linkage = hierarchy.linkage(vectors, metric=distance, method=linkage)
  File "/services/tools/anaconda-2.2.0/lib/python2.7/site-packages/scipy/cluster/hierarchy.py", line 660, in linkage
    int(_cpy_non_euclid_methods[method]))
  File "scipy/cluster/_hierarchy.pyx", line 740, in scipy.cluster._hierarchy.linkage (scipy/cluster/_hierarchy.c:9126)
  File "scipy/cluster/stringsource", line 1254, in View.MemoryView.memoryview_copy_contents (scipy/cluster/_hierarchy.c:23377)
  File "scipy/cluster/stringsource", line 1210, in View.MemoryView._err_extents (scipy/cluster/_hierarchy.c:22918)
ValueError: got differing extents in dimension 0 (got 861662736 and 7304113680)

And for the last genome it works fine.

Any idea what does it happen?

Thanks in advance.

Alex

meren commented 7 years ago

Hi Alex,

Sorry for the late response. Can you please attach the input file you use with anvi-script-snvs-to-interactive so I can try to reproduce it?

Thanks,

palomo11 commented 7 years ago

Hi Murat,

Finally I redid everything and the problem was solved. I will let you know if i have that problem again.

Thanks!

Best,

Alex

meren commented 7 years ago

Thank you, Alex.