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

Fix scanpy by using profile #2704

Merged
merged 3 commits into from
Dec 5, 2019
Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Nov 29, 2019

numba write to the code directory or the home directory, neither of which is or should be writable. The profile version ensures this is written to an isolated home_dir for the job.

FOR CONTRIBUTOR:

  • - I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • - License permits unrestricted use (educational + commercial)
  • - This PR adds a new tool or tool collection
  • - This PR updates an existing tool or tool collection
  • - This PR does something else (explain below)

@mvdbeek
Copy link
Member Author

mvdbeek commented Dec 1, 2019

Huh, containerized test passed while the Conda test fails with

| Dataset Job Standard Error:
|  Traceback (most recent call last):
|  File "/tmp/tmppX0FjK/job_working_directory/000/2/tmpcO_7Mi", line 21, in <module>
|  copy=False)
|  File "/home/travis/miniconda3/envs/mulled-v1-141253bb58fad23ac50749589168696eca3ed3ab1e99608dbf718dbfa9556234/lib/python3.6/site-packages/scanpy/tools/_louvain.py", line 120, in louvain
|  import louvain
|  ModuleNotFoundError: No module named 'louvain'

@mvdbeek
Copy link
Member Author

mvdbeek commented Dec 2, 2019

OK, louvain has actually been removed at bioconda/bioconda-recipes@8cbb444#diff-42a29748c004d0dde077e3b41b022f3c, but the container wasn't rebuilt. So I guess we should add louvain as a separate requirement.

@bgruening
Copy link
Member

Mh, the container is here: 1.4.4.post1--py_1 ... https://quay.io/repository/biocontainers/scanpy?tab=tags isn't it?

@mvdbeek
Copy link
Member Author

mvdbeek commented Dec 2, 2019

Hmm, the container seems to contain louvain, which it shouldn't according to the recipe ...:

Unable to find image 'quay.io/biocontainers/scanpy:1.4.4.post1--py_1' locally
1.4.4.post1--py_1: Pulling from biocontainers/scanpy
a3ed95caeb02: Already exists
b0dc45cd432d: Already exists
9466b3513669: Already exists
ddd482ea7b54: Already exists
4d69f833b9d8: Already exists
e7c454e5167d: Already exists
e38092b005c0: Already exists
f879b42dfe2b: Already exists
bc6d8d5a56f8: Pull complete
Digest: sha256:4cd4cd9a9c555c8178464ba0b69748938459009958d743dbdd1e100436b4fb0d
Status: Downloaded newer image for quay.io/biocontainers/scanpy:1.4.4.post1--py_1
bash-4.2# python
Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 21:52:21)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import louvain
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'louvain'
>>> import scanpy as sc
>>> sc.tl.louvain
<function louvain at 0x7fe4b2579730>
>>> sc.tl.louvain()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: louvain() missing 1 required positional argument: 'adata'
>>> sc.tl.louvain('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/scanpy/tools/_louvain.py", line 95, in louvain
    if adjacency is None and 'neighbors' not in adata.uns:
AttributeError: 'str' object has no attribute 'uns'

Hah, it doesn't contain louvain, and yet it's not failing ... that isn't good :/
fwiw the louvain import is buried here: https://github.com/theislab/scanpy/blob/master/scanpy/tools/_louvain.py#L131
In any case we need to add louvain as a dependency to scanpy_cluster_reduce_dimension

@bebatut
Copy link
Member

bebatut commented Dec 2, 2019

Yep we will need louvain for sure.
I have also some local changes to the wrappers and was planning also to update to the latest version. I will wait for your changes to add mine

@mvdbeek
Copy link
Member Author

mvdbeek commented Dec 3, 2019

This is ready for review

@bgruening
Copy link
Member

@bebatut do you want to add your changes to this branch?

@mvdbeek
Copy link
Member Author

mvdbeek commented Dec 5, 2019

Let's try to keep the changes frequent and small, this will help with debugging and reviewing.

tools/scanpy/macros.xml Outdated Show resolved Hide resolved
@bebatut
Copy link
Member

bebatut commented Dec 5, 2019

I will add the changes in another PR as they are not ready

@mvdbeek mvdbeek merged commit e6675ef into galaxyproject:master Dec 5, 2019
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

Successfully merging this pull request may close these issues.

4 participants