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

error when attempting to use pairwise #45

Closed dllahr closed 9 months ago

dllahr commented 3 years ago

Hi, I'm trying to use pairwise with lists and I'm getting an error message. Note the everything works fine when using venn instead.

Here's the command I used: intervene pairwise -i a.grp b.grp c.grp --type list

Here's the output / error message:

Performing a pairwise intersection analysis. Please wait...

Traceback (most recent call last):
  File "/Users/dlahr/miniconda3/envs/intervene/bin/intervene", line 4, in <module>
    __import__('pkg_resources').run_script('intervene==0.5.8', 'intervene')
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1448, in run_script
    exec(code, namespace, namespace)
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/intervene-0.5.8-py3.6.egg-info/scripts/intervene", line 543, in <module>
    main()
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/intervene-0.5.8-py3.6.egg-info/scripts/intervene", line 355, in main
    pairwise.pairwise_intersection(options)
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/intervene/modules/pairwise/pairwise.py", line 476, in pairwise_intersection
    barplot(series, matrix, outfile, options, max_size=max(bed_sizes))
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/intervene/modules/pairwise/pairwise.py", line 132, in barplot
    cax, order = heatmap_triangle(matrix, ax, options)
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/intervene/modules/pairwise/pairwise.py", line 211, in heatmap_triangle
    D = D.ix[cluster_order, cluster_order]
  File "/Users/dlahr/miniconda3/envs/intervene/lib/python3.6/site-packages/pandas/core/generic.py", line 5141, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'ix'

it does produce an output Intervene_pairwise_frac_matrix.txt before the error occurs that contains:

    a   b   c
a   5   1   0
b   1   5   1
c   0   1   4

Here's the contents of the input files:

==> a.grp <==
a
b
c
d
e

==> b.grp <==
e
f
g
h
i

==> c.grp <==
i
j
k
l

Any help getting this working would be greatly appreciated, thank you.

asntech commented 3 years ago

Hi @dllahr you're using an old version v0.5.8 of the tool. Please try to install the latest version 0.6.5 using: conda install intervene=0.6.5 -c bioconda or pip install intervene==0.6.5

dllahr commented 3 years ago

Thank you I was able to get it working installing via pip. FYI the conda install command did not work even though I was using a new clean environment i.e.:

conda create -n intervene3 intervene=0.6.5 -c bioconda

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                                                      

UnsatisfiableError: 

or attempting to do it separately:

conda create -n intervene3
conda activate intervene3
conda install intervene=0.6.5 -c bioconda

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                                                      

UnsatisfiableError: 
asntech commented 3 years ago

@dllahr It seems is using the python 2.7., or potentially you conda base env has python 2.7.

Can you please try this? conda create -n intervene3 python=3.6 intervene=0.6.5 -c bioconda

Abeer-hes commented 1 year ago

Hello,

Thank you for the nice package, I am still trying to explore it. Sorry for the simple question, but I am running into this error when running the test with the pairwise module as well.

Running Intervene with test data.

Performing a pairwise intersection analysis. Please wait...

Traceback (most recent call last):
  File "/home/scn-4/anaconda3/bin/intervene", line 604, in <module>
    main()
  File "/home/scn-4/anaconda3/bin/intervene", line 424, in main
    pairwise.pairwise_intersection(label_names, options)
  File "/home/scn-4/anaconda3/lib/python3.8/site-packages/intervene/modules/pairwise/pairwise.py", line 486, in pairwise_intersection
    barplot(series, matrix, outfile, options, max_size=max(bed_sizes))
  File "/home/scn-4/anaconda3/lib/python3.8/site-packages/intervene/modules/pairwise/pairwise.py", line 165, in barplot
    ax.grid(b=False, which='major', axis='both', alpha=0.1)
  File "/home/scn-4/anaconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 3194, in grid
    self.xaxis.grid(visible, which=which, **kwargs)
  File "/home/scn-4/anaconda3/lib/python3.8/site-packages/matplotlib/axis.py", line 1660, in grid
    self.set_tick_params(which='major', **gridkw)
  File "/home/scn-4/anaconda3/lib/python3.8/site-packages/matplotlib/axis.py", line 932, in set_tick_params
    kwtrans = self._translate_tick_params(kwargs)
  File "/home/scn-4/anaconda3/lib/python3.8/site-packages/matplotlib/axis.py", line 1076, in _translate_tick_params
    raise ValueError(
ValueError: keyword grid_b is not recognized; valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop', 'labelrotation', 'grid_agg_filter', 'grid_alpha', 'grid_animated', 'grid_antialiased', 'grid_clip_box', 'grid_clip_on', 'grid_clip_path', 'grid_color', 'grid_dash_capstyle', 'grid_dash_joinstyle', 'grid_dashes', 'grid_data', 'grid_drawstyle', 'grid_figure', 'grid_fillstyle', 'grid_gapcolor', 'grid_gid', 'grid_in_layout', 'grid_label', 'grid_linestyle', 'grid_linewidth', 'grid_marker', 'grid_markeredgecolor', 'grid_markeredgewidth', 'grid_markerfacecolor', 'grid_markerfacecoloralt', 'grid_markersize', 'grid_markevery', 'grid_mouseover', 'grid_path_effects', 'grid_picker', 'grid_pickradius', 'grid_rasterized', 'grid_sketch_params', 'grid_snap', 'grid_solid_capstyle', 'grid_solid_joinstyle', 'grid_transform', 'grid_url', 'grid_visible', 'grid_xdata', 'grid_ydata', 'grid_zorder', 'grid_aa', 'grid_c', 'grid_ds', 'grid_ls', 'grid_lw', 'grid_mec', 'grid_mew', 'grid_mfc', 'grid_mfcalt', 'grid_ms']  

I have the dependencies updated as required, and esp pandas and matplotlib. The tool version is up to date.

Any help would be appreciated.

asntech commented 11 months ago

Hi @Abeer-hes please try this: #56 conda install matplotlib==3.4.3