maximilianh / cellBrowser

main repo: https://github.com/ucscGenomeBrowser/cellBrowser/ - Python pipeline and Javascript scatter plot library for single-cell datasets, http://cellbrowser.rtfd.org
https://github.com/ucscGenomeBrowser/cellBrowser/
GNU General Public License v3.0
104 stars 40 forks source link

cbScanpy --init doesn't exist #44

Closed Jeltje closed 5 years ago

Jeltje commented 5 years ago
cbScanpy --init
Usage: cbScanpy [options] -e matrixFile -o outDir - run scanpy and output .tsv files
    If exceptions occur, will automatically start the debugger.
cbScanpy: error: no such option: --init

Version:

pip list | grep cell
cellbrowser      0.4.4

Usage statement

cbScanpy -h
Usage: cbScanpy [options] -e matrixFile -o outDir - run scanpy and output .tsv files

    If exceptions occur, will automatically start the debugger.

Options:
  -h, --help            show this help message and exit
  -e EXPRMATRIX, --exprMatrix=EXPRMATRIX
                        gene-cell expression matrix file, possible formats:
                        .h5ad, .csv, .xlsx, .h5, .loom, .mtx, .txt, .tab,
                        .data
  -o OUTDIR, --outDir=OUTDIR
                        output directory
  -c CONFFNAME, --confFname=CONFFNAME
                        config file from which settings are read, default is
                        scanpy.conf
  -s, --samplesOnRows   when reading the expression matrix from a text file,
                        assume that samples are on lines (default behavior is
                        one-gene-per-line, one-sample-per-column)
  -n NAME, --name=NAME  name of dataset in cell browser, default cbScanpy-Data
  --test                run doctests
  -d, --debug           open an iPython shell when an exception occurs. also
                        output debug messages
Jeltje commented 5 years ago

I do notice scanpy.conf comes with the example so maybe that statement in the README is just obsolete.

Jeltje commented 5 years ago

... but there is a bigger problem, because this is what happens next:

cbScanpy -e filtered_gene_bc_matrices/hg19/matrix.mtx -o myscanpyout -n pbmc3k

Traceback (most recent call last):
  File "/home/jeltjessh/venvs/cellBrowser/bin/cbScanpy", line 11, in <module>
    sys.exit(cbScanpyCli())
  File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 2950, in cbScanpyCli
    if options.init:
AttributeError: 'Values' object has no attribute 'init'
maximilianh commented 5 years ago

yeah yeah, sorry, I know just committting here, I got the same error a few hours ago...

On Tue, Oct 16, 2018 at 11:43 PM Jeltje notifications@github.com wrote:

... but there is a bigger problem, because this is what happens next:

cbScanpy -e filtered_gene_bc_matrices/hg19/matrix.mtx -o myscanpyout -n pbmc3k

Traceback (most recent call last): File "/home/jeltjessh/venvs/cellBrowser/bin/cbScanpy", line 11, in sys.exit(cbScanpyCli()) File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 2950, in cbScanpyCli if options.init: AttributeError: 'Values' object has no attribute 'init'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/44#issuecomment-430438981, or mute the thread https://github.com/notifications/unsubscribe-auth/AAS-TQnl1kf53Q3hISAr1jruBOCGIeXOks5ulm8bgaJpZM4Xilyd .

maximilianh commented 5 years ago

Seems to work now.

Try:

pip install --ugprade cellbrowser

On Tue, Oct 16, 2018 at 11:48 PM Maximilian Haeussler maximilianh@gmail.com wrote:

yeah yeah, sorry, I know just committting here, I got the same error a few hours ago...

On Tue, Oct 16, 2018 at 11:43 PM Jeltje notifications@github.com wrote:

... but there is a bigger problem, because this is what happens next:

cbScanpy -e filtered_gene_bc_matrices/hg19/matrix.mtx -o myscanpyout -n pbmc3k

Traceback (most recent call last): File "/home/jeltjessh/venvs/cellBrowser/bin/cbScanpy", line 11, in sys.exit(cbScanpyCli()) File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 2950, in cbScanpyCli if options.init: AttributeError: 'Values' object has no attribute 'init'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/44#issuecomment-430438981, or mute the thread https://github.com/notifications/unsubscribe-auth/AAS-TQnl1kf53Q3hISAr1jruBOCGIeXOks5ulm8bgaJpZM4Xilyd .

Jeltje commented 5 years ago

It does... until:

Performing Louvain Clustering, using 20 PCs and 5 neighbors
  File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 2976, in cbScanpyCli
    adata = cbScanpy(matrixFname, confFname, figDir, logFname)
  File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 2895, in cbScanpy
    sc.tl.louvain(adata, resolution=res)
  File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/scanpy/tools/louvain.py", line 103, in louvain
    g = utils.get_igraph_from_adjacency(adjacency, directed=directed)
  File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/scanpy/utils.py", line 304, in get_igraph_from_adjacency
    import igraph as ig
  File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/igraph/__init__.py", line 34, in <module>
    from igraph._igraph import *
> /home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/igraph/__init__.py(34)<module>()
-> from igraph._igraph import *

I did pip install scanpy python-igraph louvain as suggested elsewhere

pip list | grep igraph
python-igraph    0.7.1.post6
maximilianh commented 5 years ago

Is the pip on the same python version as you are ?

Sometimes pip is using python 2 and pip3 is for python 3... what does “which pip2” say?

Yes this igraph installation is a mess. Not sure what I can do about that to make it easier...

On Tue, Oct 16, 2018 at 5:13 PM Jeltje notifications@github.com wrote:

It does... until:

Performing Louvain Clustering, using 20 PCs and 5 neighbors File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 2976, in cbScanpyCli adata = cbScanpy(matrixFname, confFname, figDir, logFname) File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 2895, in cbScanpy sc.tl.louvain(adata, resolution=res) File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/scanpy/tools/louvain.py", line 103, in louvain g = utils.get_igraph_from_adjacency(adjacency, directed=directed) File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/scanpy/utils.py", line 304, in get_igraph_from_adjacency import igraph as ig File "/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/igraph/init.py", line 34, in from igraph._igraph import *

/home/jeltjessh/venvs/cellBrowser/lib/python3.6/site-packages/igraph/init.py(34)() -> from igraph._igraph import *

I did pip install scanpy python-igraph louvain as suggested elsewhere

pip list | grep igraph python-igraph 0.7.1.post6

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/44#issuecomment-430444925, or mute the thread https://github.com/notifications/unsubscribe-auth/AAS-TQcy_VTju-iYl7ayj_Mg4bsugeJAks5ulnYzgaJpZM4Xilyd .

Jeltje commented 5 years ago
(cellBrowser) jeltjessh@svr-cellranger-1:pbmc3k>which pip2
/usr/local/bin/pip2
(cellBrowser) jeltjessh@svr-cellranger-1:pbmc3k> which pip
/home/jeltjessh/venvs/cellBrowser/bin/pip

As you can see, I'm doing this in a (python 3, I checked) virtualenv. I used pip to install, not pip2

Jeltje commented 5 years ago

Have you considered providing a Dockerfile (or image) with all the right bits?

maximilianh commented 5 years ago

so we're really debugging the scanpy installation here now... ok...

i wonder what happens when you start python and do

import igraph

On Wed, Oct 17, 2018 at 12:50 AM Jeltje notifications@github.com wrote:

(cellBrowser) jeltjessh@svr-cellranger-1:pbmc3k>which pip2 /usr/local/bin/pip2 (cellBrowser) jeltjessh@svr-cellranger-1:pbmc3k> which pip /home/jeltjessh/venvs/cellBrowser/bin/pip

As you can see, I'm doing this in a (python 3, I checked) virtualenv. I used pip to install, not pip2

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/44#issuecomment-430450867, or mute the thread https://github.com/notifications/unsubscribe-auth/AAS-TfqYJYkYZZ06R0GUDXwholknlb4-ks5uln7lgaJpZM4Xilyd .

maximilianh commented 5 years ago

I could easily do this, but I think it's not my job to package other people's packages... On Wed, Oct 17, 2018 at 12:52 AM Jeltje notifications@github.com wrote:

Have you considered providing a Dockerfile (or image) with all the right bits?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

maximilianh commented 5 years ago

Also, no one that I work with can run docker images on their machines. We're not root. Singularity would work, maybe. On Wed, Oct 17, 2018 at 12:52 AM Maximilian Haeussler maximilianh@gmail.com wrote:

I could easily do this, but I think it's not my job to package other people's packages... On Wed, Oct 17, 2018 at 12:52 AM Jeltje notifications@github.com wrote:

Have you considered providing a Dockerfile (or image) with all the right bits?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

maximilianh commented 5 years ago

Hey, you can install igraph through conda!

https://anaconda.org/conda-forge/python-igraph On Wed, Oct 17, 2018 at 12:53 AM Maximilian Haeussler maximilianh@gmail.com wrote:

Also, no one that I work with can run docker images on their machines. We're not root. Singularity would work, maybe. On Wed, Oct 17, 2018 at 12:52 AM Maximilian Haeussler maximilianh@gmail.com wrote:

I could easily do this, but I think it's not my job to package other people's packages... On Wed, Oct 17, 2018 at 12:52 AM Jeltje notifications@github.com wrote:

Have you considered providing a Dockerfile (or image) with all the right bits?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

maximilianh commented 5 years ago

quick update: I'm working on cbSeurat, which uses R and Seurat for the analysis, instead of Scanpy. It's slower, but trivial to install, so hopefully this will solve your problem.

maximilianh commented 5 years ago

cbScanpy --init is working now.

Also, I've added a big ton of install instructions for Scanpy and catching the python3 version problem now.

Also I've created cbSeurat.

So I think I've done as much as possible, short of packing scanpy, as I leave that to the Scanpy authors.