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
102 stars 40 forks source link

Changing dotsize (radius) of cells in an already built cellbrowser #236

Open redst4r opened 2 years ago

redst4r commented 2 years ago

Hi all,

I'm wondering if there's a quick way to change the dotsize ("radius" in cellbrowser.conf) of cells in an already existing cellbrowser (built into a html site via cbBuild).

I noticed the dots are way too small in a cellbrowser I built recently (with ALOT of cells), and I'd rather not rebuild the thing until I get a appropriate size (it takes quite a while to build).

Thanks!

maximilianh commented 2 years ago

Hi @redst4r, rebuilding should be fast. If you build into the same directory, it will only re-create the meta information, which is quick.

Otherwise: to change the radius directly in the html directory, just edit dataset.json, there is a 'radius=xx' setting in it.

Also: I really really need to add a little input box where one can change the radius interactively, right?

On Tue, Mar 1, 2022 at 5:41 PM redst4r @.***> wrote:

Hi all,

I'm wondering if there's a quick way to change the dotsize ("radius" in cellbrowser.conf) of cells in an already existing cellbrowser (built into a html site via cbBuild).

I noticed the dots are way too small in a cellbrowser I built recently (with ALOT of cells), and I'd rather not rebuild the thing until I get a appropriate size (it takes quite a while to build).

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/236, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TM566PZG75ALULX3XLU5ZCDNANCNFSM5PURZEFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

redst4r commented 2 years ago

Hi,

thanks, I'll try editing the dataset.json (unfortunately, I got rid of the intermediate files created by the scanpy-export, so I cant quickly rebuild the html). An input box with custom dotsize would of course be nice, but is there a way to remember a users choice across sessions (via cookies or something)? Otherwise they'll have to adjust that setting each time.

redst4r commented 2 years ago

Just had a look at the dataset.json file in the html directory. Here's how it looks like, I don't see a "radius" setting, not sure exactly where to add it:

{
  "name": "",
  "shortLabel": "somename",
  "inDir": "/some/path",
  "datasets": [
    {
      "shortLabel": "somename",
      "name": "somename",
      "md5": "776de8bada",
      "hasFiles": [
        "datasetDesc"
      ],
      "sampleCount": 20910
    }
  ],
  "md5": "d9df92ffa0",
  "fileVersions": {
    "desc": {
      "fname": "/some/path/desc.conf",
      "md5": "9acc04939e",
      "size": 94,
      "mtime": "2021-12-03 23:51:08"
    }
  },
  "hasFiles": [
    "datasetDesc"
  ]
}

Am I missing something here? I noticed there's another dataset.json in the subdirectory where the actual data resides (e.g. UMAP.coords.tsv.gz ...). That dataset.json is much more complicated, but I don't see a radius setting there eiher.

The website was build using cellbrowser 1.0.1. I can try to update to the most recent version.

Thanks alot for your help!!!

maximilianh commented 2 years ago

This is only the root dataset.json. You'll need to find dataset.json of every dataset, it's in a subdirectory, the dataset that you want to change, and where you want to change the radius and change it there

And if no radius is specified yet in the file, you can add a new line like

"radius" : 4,

after the line with "name".

On Wed, Mar 2, 2022 at 1:24 PM redst4r @.***> wrote:

Just had a look at the dataset.json file in the html directory. Here's how it looks like, I don't see a "radius" setting, not sure exactly where to add it:

{ "name": "", "shortLabel": "somename", "inDir": "/some/path", "datasets": [ { "shortLabel": "somename", "name": "somename", "md5": "776de8bada", "hasFiles": [ "datasetDesc" ], "sampleCount": 20910 } ], "md5": "d9df92ffa0", "fileVersions": { "desc": { "fname": "/some/path/desc.conf", "md5": "9acc04939e", "size": 94, "mtime": "2021-12-03 23:51:08" } }, "hasFiles": [ "datasetDesc" ] }

Am I missing something here? I noticed there's another dataset.json in the subdirectory where the actual data resides (e.g. UMAP.coords.tsv.gz ...). That dataset.json is much more complicated, but I don't see a radius setting there eiher.

The website was build using cellbrowser 1.0.1. I can try to update to the most recent version.

Thanks alot for your help!!!

— Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/236#issuecomment-1056870389, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TMAUSZ64ILPQLFRFXLU55MWDANCNFSM5PURZEFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

redst4r commented 2 years ago

great, editing the dataset.json of the actual dataset worked nicely as a quick fix!! In the future, I'll make sure radius is already set when building the cellbrowser-website!