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
105 stars 42 forks source link

minimal.conf example not working #141

Closed prete closed 4 years ago

prete commented 5 years ago

Environment:

I tried running cellBrowser using the minimal required settings with the provided file:

cbBuild -o /tmp/singleCell -i minimal.conf -p 8888

But got this error:

INFO:root:Compressing gene expression vectors...
INFO:root:Wrote /tmp/singleCell/sample/cellbrowser.json.bak
INFO:root:Wrote /tmp/singleCell/sample/cellbrowser.json.bak
INFO:root:Wrote /tmp/singleCell/sample/dataset.json
INFO:root:Wrote /tmp/singleCell/sample/dataset.json
INFO:root:Parsing coordinates for t-SNE on WGCNA
INFO:root:Creating /tmp/singleCell/sample/coords/coords_0
INFO:root:Writing coordinates for t-SNE on WGCNA
Traceback (most recent call last):
  File "anaconda3/envs/dev/bin/cbBuild", line 10, in <module>
    sys.exit(cbBuildCli())
  File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 3601, in cbBuildCli
    build(confFnames, outDir, port)
  File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 3470, in build
    convertDataset(inConf, outConf, datasetDir)
  File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 3066, in convertDataset
    coordFiles, clusterLabels = convertCoords(inConf, outConf, sampleNames, outMeta, datasetDir)
  File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 2683, in convertCoords
    return outFnames, labelVals
UnboundLocalError: local variable 'labelVals' referenced before assignment

Adding labelField to minimal.conf fixes the problem. The working minimal.conf is:

# these are the required settings in the cellbrowser.conf file:

coords = [ {'file':'tsne.coords.tsv', 'shortLabel':'t-SNE on WGCNA'} ]
meta = 'meta.tsv'
name = 'sample'
exprMatrix = 'exprMatrix.tsv.gz'
labelField = 'WGCNAcluster'

It's probably worth adding clusterField to the file so it's selected by default. For exmaple: clusterField = 'WGCNAcluster'

maximilianh commented 5 years ago

Oh darn no idea how this got dropped. Thanks. Will fix. Can I ask how you found my software - through today’s HCA meeting ?

On Fri 11 Oct 2019 at 15:42, Prete notifications@github.com wrote:

Environment:

  • Python 3.7.3
  • Installed using pip install cellbrowser
  • Running on System macOS 10.14.6 (18G103)

I tried running cellBrowser using the minimal required settings with the provided file:

cbBuild -o /tmp/singleCell -i minimal.conf -p 8888

But got this error:

INFO:root:Compressing gene expression vectors... INFO:root:Wrote /tmp/singleCell/sample/cellbrowser.json.bak INFO:root:Wrote /tmp/singleCell/sample/cellbrowser.json.bak INFO:root:Wrote /tmp/singleCell/sample/dataset.json INFO:root:Wrote /tmp/singleCell/sample/dataset.json INFO:root:Parsing coordinates for t-SNE on WGCNA INFO:root:Creating /tmp/singleCell/sample/coords/coords_0 INFO:root:Writing coordinates for t-SNE on WGCNA Traceback (most recent call last): File "anaconda3/envs/dev/bin/cbBuild", line 10, in sys.exit(cbBuildCli()) File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 3601, in cbBuildCli build(confFnames, outDir, port) File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 3470, in build convertDataset(inConf, outConf, datasetDir) File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 3066, in convertDataset coordFiles, clusterLabels = convertCoords(inConf, outConf, sampleNames, outMeta, datasetDir) File "anaconda3/envs/dev/lib/python3.7/site-packages/cellbrowser/cellbrowser.py", line 2683, in convertCoords return outFnames, labelVals UnboundLocalError: local variable 'labelVals' referenced before assignment

Adding labelField to minimal.conf fixes the problem. The working minimal.conf is:

these are the required settings in the cellbrowser.conf file:

coords = [ {'file':'tsne.coords.tsv', 'shortLabel':'t-SNE on WGCNA'} ] meta = 'meta.tsv' name = 'sample' exprMatrix = 'exprMatrix.tsv.gz' labelField = 'WGCNAcluster'

— 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/141?email_source=notifications&email_token=AACL4TMJWRQZ3VUDFD6WE53QOB7EPA5CNFSM4I7Z7CL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRG2M6Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TNHEMNDZI4AM3YDLVDQOB7EPANCNFSM4I7Z7CLQ .

prete commented 5 years ago

No, I was not on any HCA meeting. I'm just trying it out.

maximilianh commented 5 years ago

Ah, Nice. How did you find it ?

On Wed 16 Oct 2019 at 18:11, Prete notifications@github.com wrote:

No, I was not on any HCA meeting. I'm just trying it out.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/141?email_source=notifications&email_token=AACL4TM3GJZXMDEF7R7JSZ3QO44KFA5CNFSM4I7Z7CL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNCAXQ#issuecomment-542777438, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TKETQIHAXZNEPXSFP3QO44KFANCNFSM4I7Z7CLQ .

prete commented 5 years ago

Recommended to my by @wikiselev

maximilianh commented 4 years ago

Hi Prete, did you cell browser install go well? Any problems?

prete commented 4 years ago

Yes, it did and we finished all the needed tests. Importing data from h5ad to cellbrowser was done using scanpy.external.exporting.cellbrowser and it took quite a while to import. Besides that, everything else went well.

wikiselev commented 4 years ago

Thanks, Max! I will reply to your email this week, sorry for the delay! Vlad

maximilianh commented 4 years ago

Great, thanks!

On Mon, Dec 16, 2019 at 3:24 PM Vladimir Kiselev notifications@github.com wrote:

Thanks, Max! I will reply to your email this week, sorry for the delay! Vlad

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.