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

Blank page when use example data #192

Closed tiramisutes closed 3 years ago

tiramisutes commented 3 years ago

Hi, I install the cellBrowser use conda (conda install -c bioconda ucsc-cell-browser) and use sample data to test whether it works.

Here is the code that I'm running:

curl -s https://cells.ucsc.edu/downloads/samples/mini.tgz | tar xvz
cd mini
cbBuild -o ./cells/ -p 8888

The stdout is normal but returns a blank page when open URL http://127.0.0.1:8888/.

INFO:root:dataRoot is not set in ~/.cellbrowser.conf or via $CBDATAROOT. Dataset hierarchies are not supported.
INFO:root:Creating ./cells/sample
INFO:root:Determining if ./cells/sample/exprMatrix.tsv.gz needs to be created
INFO:root:./cells/sample/exprMatrix.tsv.gz does not exist. Must build matrix now.
INFO:root:Creating ./cells/sample/metaFields
INFO:root:Checking and reordering meta data to ./cells/sample/meta.tsv
INFO:root:Reading sample names from /public/home/zpxu/mini/meta.tsv
INFO:root:Reading headers from file /public/home/zpxu/mini/exprMatrix.tsv.gz
WARNING:root:3034 sample names are in the meta data, but not in the expression matrix. Examples: ['S190.C1', 'S82.D11', 'S3.C3', 'S200.G9', 'S222.F3', 'S26.E4', 'S33.A3', 'S140.D1', 'S15.F3', 'S79.D9']
WARNING:root:These samples will be removed from the meta data
INFO:root:Data contains 4129 samples/cells
INFO:root:Converting to numbers and compressing meta data fields
WARNING:root:File colors.tsv does not exist
INFO:root:Read 47 acronyms from /public/home/zpxu/mini/acronyms.tsv
INFO:root:Field Cell: type uniqueString, 4129 different values
WARNING:root:Field WGCNAcluster: value U1 has no long label through the acronyms
WARNING:root:Field WGCNAcluster: value U4 has no long label through the acronyms
WARNING:root:Field WGCNAcluster: value U3 has no long label through the acronyms
WARNING:root:Field WGCNAcluster: value U2 has no long label through the acronyms
INFO:root:Field WGCNAcluster: type enum, 47 different values
INFO:root:Field Name: type enum, 48 different values
INFO:root:Field Age: type float, 29 different values
WARNING:root:Field RegionName: value Cortex has no long label through the acronyms
WARNING:root:Field RegionName: value GE has no long label through the acronyms
WARNING:root:Field RegionName: value Presumptive_cortex has no long label through the acronyms
INFO:root:Field RegionName: type enum, 4 different values
INFO:root:Field Laminae: type enum, 7 different values
INFO:root:Field Area: type enum, 7 different values
INFO:root:Indexing meta file ./cells/sample/meta.tsv to ./cells/sample/meta.index
INFO:root:Kept 4129 cells present in both meta data file and expression matrix
INFO:root:Copying/compressing /public/home/zpxu/mini/exprMatrix.tsv.gz to ./cells/sample/exprMatrix.tsv.gz
INFO:root:converting ./cells/sample/exprMatrix.tsv.gz to ./cells/sample/exprMatrix.bin and writing index to ./cells/sample/exprMatrix.json, type None
INFO:root:Compressing gene expression vectors...
INFO:root:Auto-detecting number type of ./cells/sample/exprMatrix.tsv.gz
INFO:root:Auto-detect: Numbers in matrix are of type 'float'
INFO:root:Global minimum in matrix is: 0.000000
INFO:root:Wrote ./cells/sample/cellbrowser.json.bak
INFO:root:Wrote ./cells/sample/dataset.json
INFO:root:Wrote main config ./cells/sample/dataset.json
INFO:root:Parsing column WGCNAcluster from ./cells/sample/meta.tsv
INFO:root:Parsing coordinates for t-SNE on WGCNA
INFO:root:Creating ./cells/sample/coords/coords_0
INFO:root:Writing coordinates for t-SNE on WGCNA
INFO:root:Creating ./cells/sample/images
INFO:root:Wrote ./cells/sample/desc.json
INFO:root:Creating ./cells/sample/markers/markers_0
INFO:root:Reading /public/home/zpxu/mini/markers.tsv: assuming marker file format (cluster, gene, score) + any other fields
INFO:root:Wrote 47 .tsv.gz files into directory ./cells/sample/markers/markers_0
INFO:root:Read 4 quick genes from /public/home/zpxu/mini/quickGenes.csv, kept 4
INFO:root:dataRoot not set in ~/.cellbrowser.conf, no need to rebuild hierarchy
INFO:root:Wrote ./cells/sample/cellbrowser.json.bak
INFO:root:Wrote ./cells/sample/dataset.json
INFO:root:Wrote main config ./cells/sample/dataset.json
INFO:root:Rebuilding flat list of datasets, without hierarchies
INFO:root:Found 1 datasets in subdirectories of directory ./cells/
INFO:root:Wrote ./cells/dataset.json
INFO:root:Wrote ./cells/index.html (devMode: False)
Interrupt this process, e.g. with Ctrl-C, to stop the webserver
Serving ./cells/ on port 8888
Point your internet browser to http://127.0.0.1:8888 (or the IP address of this server)

05145505 Thanks a lot for your help!

hoholee commented 3 years ago

Hi,

Is there a fix for this issue? I ran into a similar issue when using cellBrowser(v0.7.14) installed from conda. The log is quite similar to the OP's except for this one line:

ERROR:root:/cndd2/junhao/ucsc_cell_browser_test/cellBrowser/sampleData/mini/markers.tsv: the following cluster names are in the meta file but not in the marker file: {''}. Please fix one of the files, clicks onto a label will otherwise not work.

I'm not sure whether this is related but it looks similar to this issue: #152 (which was fixed a while ago...)

Thanks in advance!

matthewspeir commented 3 years ago

@tiramisutes sorry for not following up sooner.

Hmm, there's nothing in either of those output messages that would indicate why you're just seeing a blank screen.

(e.g. the error that @hoholee noted only means that there's a name (blank or '' in this case) in the metadata file that isn't in the markers.tsv. That wouldn't cause the cell browser to just not load.)

In Chrome or Firefox, if you open up the web developers console, are there any errors listed there? Errors are typically indicated by red text or a red x in the console.

@maximilianh any other ideas here?

hoholee commented 3 years ago

Hi @matthewspeir,

Yes the console show lots of error: image

It seems that the index.html file generated by cbBuild imports many javascript files in the ext and js folders, which do not exist in the folder built by cbBuild: image

image

Any ideas?

matthewspeir commented 3 years ago

@hoholee Can you try running cbUpgrade --code -o <same cbBuild output dir>? The output directory for cbUpgrade should be the same as the one you specified for cbBuild.

hoholee commented 3 years ago

Oh great, it works after cbUpgrade! Thank you! I would recommend adding this instruction in the tutorial.

matthewspeir commented 3 years ago

Great! cbBuild should put those files in place. You should not need to run cbUpgrade. I'll see if I can replicate this issue so, hopefully, we can track down why cbBuild doesn't seem to be doing that in some cases.

To that end, @hoholee can you share a bit more about the machine you're running the cell browser on? Is it a laptop or server? Mac, Linux, or Windows?

hoholee commented 3 years ago

I'm using a Linux server, Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-190-generic x86_64). The cellBrowser version is v0.7.14, installed using conda 4.8.1 via this command: conda install -c bioconda ucsc-cell-browser

maximilianh commented 3 years ago

Ohhhh... this is a bug I think! I must have broken something and cbBuild stopped putting the JS files in place automatically... Many thanks !!

On Tue 27 Oct 2020 at 19:32, Junhao Li notifications@github.com wrote:

I'm using a Linux server, Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-190-generic x86_64). The cellBrowser version is v0.7.14, installed using conda 4.8.1 via this command: conda install -c bioconda ucsc-cell-browser

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/192#issuecomment-717446449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TKEZUJH2HGIOYCH6CLSM4G5RANCNFSM4SEJ7RBQ .

tiramisutes commented 3 years ago

Yes, it works after cbUpgrade --code -o <same cbBuild output dir>. Thanks.

maximilianh commented 3 years ago

I cannot reproduce this yet, but I'm installing conda now to check what's going wrong here. I know we had this problem two releases ago then I fixed it, but the fix should be in 0.7.14. Thanks for contacting us in any case.

On Wed, Oct 28, 2020 at 3:14 AM hope notifications@github.com wrote:

Yes, it works after cbUpgrade --code -o . Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/192#issuecomment-717650537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TKSVTGDTYSB6K47LHLSM547XANCNFSM4SEJ7RBQ .

maximilianh commented 3 years ago

OK, I installed conda and then ran these commands and it's all working fine:

conda install -c bioconda/label/cf201901 ucsc-cell-browser curl -ks https://cells.ucsc.edu/downloads/samples/mini.tgz | tar xvz cd mini cbBuild -o html/ -p 8888

This is as expected as the "blank page" bug was fixed a while ago. So I can't reproduce this bug.

On Thu, Oct 29, 2020 at 9:35 AM Maximilian Haeussler maximilianh@gmail.com wrote:

I cannot reproduce this yet, but I'm installing conda now to check what's going wrong here. I know we had this problem two releases ago then I fixed it, but the fix should be in 0.7.14. Thanks for contacting us in any case.

On Wed, Oct 28, 2020 at 3:14 AM hope notifications@github.com wrote:

Yes, it works after cbUpgrade --code -o . Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/192#issuecomment-717650537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TKSVTGDTYSB6K47LHLSM547XANCNFSM4SEJ7RBQ .

luyang93 commented 3 years ago

I also came to the same problem when I used conda to install cellbrowser. ucsc-cell-browser 0.7.14 py_0 bioconda I manually download ucsc-cell-browser-0.7.14-py_0.tar.bz2 and extract site-packages/cellbrowser/cbWeb to pubhtml folder.

maximilianh commented 3 years ago

Hi luyang93, this is very interesting, can you tell me what you did? Did you download the conda package or the pip package manually?

I don't understand why I can't reproduce a bug that two people report with the same conda command line... hmm...

On Fri, Oct 30, 2020 at 1:46 PM luyang93 notifications@github.com wrote:

I also came to the same problem when I used conda to install cellbrowser. ucsc-cell-browser 0.7.14 py_0 bioconda I manually download ucsc-cell-browser-0.7.14-py_0.tar.bz2 and extract site-packages/cellbrowser/cbWeb to pubhtml folder.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/192#issuecomment-719531483, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TLL7POM7UGMLGBI5E3SNKYR5ANCNFSM4SEJ7RBQ .

luyang93 commented 3 years ago
conda create -n cellbrowser
conda activate cellbrowser
conda install ucsc-cell-browser scanpy

then download sample data https://github.com/maximilianh/cellBrowser/blob/master/sampleData/pbmc_small/anndata.h5ad

cbImportScanpy -i anndata.h5ad -o pbmc3kImportScanpy
cd pbmc3kImportScanpy
cbBuild -o ~/public_html/cb

the public_html folder doesn't have static files

maximilianh commented 3 years ago

Hi @luyang93, ohh, many thanks for insisting! First, this brought another bug to my attention, I didn't realize that you used an anndata file here. Fixed now in the develop branch. @Matthew Speir mspeir@ucsc.edu I guess this is important enough to push out a release now?

On Sun, Nov 1, 2020 at 6:28 AM luyang93 notifications@github.com wrote:

conda create -n cellbrowser conda activate cellbrowser conda install ucsc-cell-browser scanpy

then download sample data

https://github.com/maximilianh/cellBrowser/blob/master/sampleData/pbmc_small/anndata.h5ad

cbImportScanpy -i anndata.h5ad -o pbmc3kImportScanpy cd pbmc3kImportScanpy cbBuild -o ~/public_html/cb

the public_html folder doesn't have statci files

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/192#issuecomment-720031633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TMXPFWZBE3OQAIX5BDSNTWZHANCNFSM4SEJ7RBQ .

matthewspeir commented 3 years ago

@maximilianh Yeah, seems important. Lets try to get the release out there today or tomorrow then.

luyang93 commented 3 years ago

It's solved.

maximilianh commented 3 years ago

Thanks for the feedback. I'll close the ticket then.

On Tue, Nov 17, 2020 at 4:20 AM luyang93 notifications@github.com wrote:

It's solved.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/192#issuecomment-728660723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TMQVCYIWJ6S4TKEXR3SQHTXDANCNFSM4SEJ7RBQ .