Skip to content

Commit

Permalink
feat: Add bedlike file support (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
smitkadvani authored and manzt committed Oct 3, 2023
1 parent f35dcd6 commit f11c38d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/higlass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
cooler = _create_tileset_helper(server, higlass.tilesets.cooler)
hitile = _create_tileset_helper(server, higlass.tilesets.hitile)
bed2ddb = _create_tileset_helper(server, higlass.tilesets.bed2ddb)
beddb = _create_tileset_helper(server, higlass.tilesets.beddb)
17 changes: 17 additions & 0 deletions src/higlass/tilesets.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@ def bigwig(filepath: str, uid: str):
)


@hash_absolute_filepath_as_default_uid
def beddb(filepath: str, uid: str):
try:
from clodius.tiles.beddb import tiles, tileset_info
except ImportError:
raise ImportError(
'You must have `clodius` installed to use "vector" data-server.'
)

return LocalTileset(
datatype="vector",
tiles=functools.partial(tiles, filepath),
info=functools.partial(tileset_info, filepath),
uid=uid,
)


@hash_absolute_filepath_as_default_uid
def multivec(filepath: str, uid: str):
try:
Expand Down

0 comments on commit f11c38d

Please sign in to comment.