Python API¶
hgflask¶
-
hgflask.server.
start
(tilesets, port=None, tmp_dir='/tmp/hgflask')[source]¶ Start the hgflask server. If a port is not specified, an open port will be automatically selected.
Parameters: - tilesets (object) –
The list of tilesets to serve. For example:
import hgflask.tilesets as hfti tilesets = [ hfti.cooler('mycooler.cool', hfti.bigwig('mybigwig.bigWig', ]
- port (int) – The port to start this server on. If it is None, a port will automatically be assigned.
- tmp_dir (string) – A temporary directory to be used for mounting http files (experimental)
- tilesets (object) –
hgflask.client¶
-
View.
__init__
(tracks=[], x=0, y=0, width=12, height=6, initialXDomain=None, initialYDomain=None, uid=None)[source]¶ Add a new view
Parameters: - tracks ([]) – A list of Tracks to include in this view
- x (int) – The position of this view on the grid
- y (int) – The position of this view on the grid
- width (int) – The width of this of view on a 12 unit grid
- height (int) – The height of the this view. The height is proportional to the height of all the views present.
- initialXDoamin ([int, int]) – The initial x range of the view
- initialYDomain ([int, int]) – The initial y range of the view
- uid (string) – The uid of new view
-
Track.
__init__
(track_type, position, tileset_uuid=None, api_url=None, height=None, width=None, options={})[source]¶ Add a track to a position.
Parameters: - track_type (string) – The type of track to add (e.g. “heatmap”, “line”)
- position (string) – One of ‘top’, ‘bottom’, ‘center’, ‘left’, ‘right’
- tileset_uuid – The of uuid of the tileset being displayed in this track
- api_url (string) – The server storing the data for this track
- height (int) – The height of the track (in pixels)
- width (int) – The width of the track (in pixels)
- options ({}) – The options to pass onto the track