asntech / intervene

Intervene: a tool for intersection and visualization of multiple genomic region and gene sets
http://intervene.rtfd.io/
Other
132 stars 28 forks source link

pairwise is not working even on --test #40

Closed unique379 closed 11 months ago

unique379 commented 3 years ago

Hi install latest version of intervene using git but its not working for pairwise. and by the way, using conda, its installing 0.5.8 which is not latest and does not work either for pairwise.

intervene pairwise --test

Running Intervene with test data.

Performing a pairwise intersection analysis. Please wait...

Traceback (most recent call last):
  File "/Users/rupeshk/miniconda3/bin/intervene", line 4, in <module>
    __import__('pkg_resources').run_script('intervene==0.6.4', 'intervene')
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 665, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1463, in run_script
    exec(code, namespace, namespace)
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/intervene-0.6.4-py3.7.egg/EGG-INFO/scripts/intervene", line 606, in <module>
    main()
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/intervene-0.6.4-py3.7.egg/EGG-INFO/scripts/intervene", line 426, in main
    pairwise.pairwise_intersection(label_names, options)
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/intervene-0.6.4-py3.7.egg/intervene/modules/pairwise/pairwise.py", line 480, in pairwise_intersection
    barplot(series, matrix, outfile, options, max_size=max(bed_sizes))
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/intervene-0.6.4-py3.7.egg/intervene/modules/pairwise/pairwise.py", line 135, in barplot
    cax, order = heatmap_triangle(matrix, ax, options)
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/intervene-0.6.4-py3.7.egg/intervene/modules/pairwise/pairwise.py", line 214, in heatmap_triangle
    D = D.ix[cluster_order, cluster_order]
  File "/Users/rupeshk/miniconda3/lib/python3.7/site-packages/pandas/core/generic.py", line 5274, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'ix'
bioinfouser commented 3 years ago

I am not the owner of intervene, but it works with python 2.7. Just make a new conda environment and reinstall. It should run

zhypan commented 3 years ago

DId you fix it? I meet some problem when used the intervene pairwise --htype tribar

asntech commented 3 years ago

Hi @unique379 @zhypan. It is fixed now. Please try to install it from the source.

bernt-matthias commented 3 years ago

Just to be sure: this is not fixed in the latest release (0.6.4)? Asking because I just fixed the conda package (by requiring pandas <1.0) .. see https://github.com/bioconda/bioconda-recipes/pull/25235

asntech commented 3 years ago

sorry, this was not pushed to pypi. Please try now with v0.6.5. conda install -c bioconda intervene==0.6.5

bernt-matthias commented 3 years ago

Thanks a lot, this means that I can remove the restriction pandas<1 from the conda recipe, right?

asntech commented 3 years ago

Thanks @bernt-matthias !!

allenyen commented 1 year ago

Hi, I am having trouble with getting pairwise to run with --test as well. I created a conda env using conda create -n intervene python=3.6 intervene=0.6.5. Venn and upset work with --test, however I get the following when trying it with pairwise.

intervene pairwise --test

Running Intervene with test data.

Performing a pairwise intersection analysis. Please wait...

Traceback (most recent call last):
  File "/home/a.yen/miniconda3/envs/intervene/bin/intervene", line 604, in <module>
    main()
  File "/home/a.yen/miniconda3/envs/intervene/bin/intervene", line 424, in main
    pairwise.pairwise_intersection(label_names, options)
  File "/home/a.yen/miniconda3/envs/intervene/lib/python3.6/site-packages/intervene/modules/pairwise/pairwise.py", line 464, in pairwise_intersection
    matrix = pd.read_table(matrix_file,index_col=0, delim_whitespace=True)
  File "/home/a.yen/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 755, in read_table
    return read_csv(**locals())
  File "/home/a.yen/.local/lib/python3.6/site-packages/pandas/io/parsers.py", line 625, in read_csv
    "Specified a delimiter with both sep and "
ValueError: Specified a delimiter with both sep and delim_whitespace=True; you can only specify one.
asntech commented 1 year ago

@allenyen can you check the pandas version installed? And please try to update pandas with v1.2.x https://github.com/pandas-dev/pandas/pull/36560

allenyen commented 1 year ago

I couldn't get pandas >1.1.5 with python3.6, so I created an entirely new environment with python 3.9 and pandas 1.4.3 and it works now. Thanks!