higlass / higlass-docker

Builds a docker container wrapping higlass-server and higlass-client in nginx
MIT License
32 stars 14 forks source link

What is the minimal viewconfig? #104

Closed mccalluc closed 7 years ago

mccalluc commented 7 years ago

@pkerpedjiev : Either it should be easy to start the server running from a minimal view config, or we should reference one in the documentation. (Slightly prefer the former, but I think you see it differently, and that's ok.) Particularly if it's in the documentation, it should be as concise as possible. I don't know what values the software can fill in itself, and which will error down the line, but here's what I have right now:

{
  "editable": true,
  "zoomFixed": false,
  "trackSourceServers": [
    "/api/v1"
  ],
  "exportViewUrl": "/api/v1/viewconfs/",
  "views": [
    {
      "uid": "TODO-if-I-remove-this-ui-has-no-controls",
      "initialXDomain": [
        5.960464477539063e-8,
        3100000000
      ],
      "autocompleteSource": "/api/v1/suggest/?d=OHJakQICQD6gTD7skx4EWA&",
      "genomePositionSearchBoxVisible": true,
      "chromInfoPath": "//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",
      "tracks": {
        "top": [],
        "left": [],
        "center": [],
        "right": [],
        "bottom": []
      },
      "initialYDomain": [
        841428571.4285713,
        2258571428.571429
      ],
      "layout": {
        "w": 6,
        "h": 12,
        "x": 0,
        "y": 0,
        "i": "aa",
        "moved": false,
        "static": false
      }
    }
  ],
  "zoomLocks": {
    "locksByViewUid": {},
    "locksDict": {}
  },
  "locationLocks": {
    "locksByViewUid": {},
    "locksDict": {}
  }
}

Most glaringly, the UID does not need to correspond to anything on the server, but if it's removed, the UI just won't load.

How much shorter can the whole thing be?

pkerpedjiev commented 7 years ago

You should be able to take out the layout section. If removing the view uid causes the UI to not load, then that's a glaring bug. It should be auto-assigned if it's not present. The view uids are used to set zoom and location lock (links) between views, so if none are present then the view uid is extraneous.

mccalluc commented 7 years ago

https://github.com/hms-dbmi/higlass-server/issues/11 asks for validation, and figuring out the minimum is implicit in that. (Not so important if we start with a largely empty tool.)