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

pairwise is not working even on --test #40

Closed
unique379 opened this issue Sep 15, 2020 · 10 comments
Closed

pairwise is not working even on --test #40

unique379 opened this issue Sep 15, 2020 · 10 comments

Comments

@unique379
Copy link

unique379 commented Sep 15, 2020

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
Copy link

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
Copy link

zhypan commented Oct 9, 2020

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

@asntech
Copy link
Owner

asntech commented Oct 12, 2020

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

@bernt-matthias
Copy link

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 bioconda/bioconda-recipes#25235

@asntech
Copy link
Owner

asntech commented Nov 17, 2020

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

@bernt-matthias
Copy link

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

bernt-matthias added a commit to bernt-matthias/bioconda-recipes that referenced this issue Nov 17, 2020
- remove/invert restriction on pandas which was fixed in 0.6.5 asntech/intervene#40 (comment)
- running the tool outputs deprection warnings for matplotlib >= 3.4 ..
so I added a version restriction
BiocondaBot pushed a commit to bioconda/bioconda-recipes that referenced this issue Nov 17, 2020
Merge PR #25392, commits were: 
 * remove create test data (as workaround)

for

```
Traceback (most recent call last):
  File "/home/circleci/project/miniconda/bin/bioconda-utils", line 8, in <module>
    sys.exit(main())
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/bioconda_utils/cli.py", line 971, in main
    bioconductor_skeleton, clean_cran_skeleton, autobump, bot
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/argh/dispatching.py", line 328, in dispatch_commands
    dispatch(parser, *args, **kwargs)
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/argh/dispatching.py", line 174, in dispatch
    for line in lines:
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/argh/dispatching.py", line 277, in _execute_command
    for line in result:
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/argh/dispatching.py", line 260, in _call
    result = function(*positional, **keywords)
  File "<boltons.funcutils.FunctionBuilder-5>", line 2, in build
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/bioconda_utils/cli.py", line 130, in wrapper
    func(*args, **kwargs)
  File "<boltons.funcutils.FunctionBuilder-4>", line 2, in build
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/bioconda_utils/cli.py", line 59, in wrapper
    func(*args, **kwargs)
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/bioconda_utils/cli.py", line 476, in build
    keep_old_work=keep_old_work)
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/bioconda_utils/build.py", line 343, in build_recipes
    linter=linter)
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/bioconda_utils/build.py", line 149, in build
    pkg_test.test_package(pkg_path, base_image=base_image)
  File "/home/circleci/project/miniconda/lib/python3.7/site-packages/bioconda_utils/pkg_test.py", line 170, in test_package
    p = utils.run(cmd, env=env, cwd=d, mask=False)
  File "/home/circleci/project/miniconda/lib/python3.7/tempfile.py", line 805, in __exit__
    self.cleanup()
  File "/home/circleci/project/miniconda/lib/python3.7/tempfile.py", line 809, in cleanup
    _shutil.rmtree(self.name)
  File "/home/circleci/project/miniconda/lib/python3.7/shutil.py", line 485, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/home/circleci/project/miniconda/lib/python3.7/shutil.py", line 423, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/home/circleci/project/miniconda/lib/python3.7/shutil.py", line 443, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/home/circleci/project/miniconda/lib/python3.7/shutil.py", line 441, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'Intervene_pairwise_frac_matrix.txt'
```
 * add proper tests to intervene

- remove/invert restriction on pandas which was fixed in 0.6.5 asntech/intervene#40 (comment)
- running the tool outputs deprection warnings for matplotlib >= 3.4 ..
so I added a version restriction
@asntech
Copy link
Owner

asntech commented Dec 2, 2020

Thanks @bernt-matthias !!

@allenyen
Copy link

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
Copy link
Owner

asntech commented Jul 24, 2022

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

@allenyen
Copy link

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!

@asntech asntech closed this as completed Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants