Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs v2: bedlike data #111

Open
manzt opened this issue Feb 28, 2023 · 0 comments
Open

docs v2: bedlike data #111

manzt opened this issue Feb 28, 2023 · 0 comments

Comments

@manzt
Copy link
Member

manzt commented Feb 28, 2023

Bed-like data
-------------

If you have data representing intervals in a Python object, you can load it
directly into higlass using the `bedtiles` helper function:

.. image:: img/beditems.png

.. code-block:: python

	from higlass.client import View, Track
	from higlass.inline_tiles import bedtiles
	import higlass

	bed = [['chr1', 1000, 2000, 'item #1', '.', '+'],
	       ['chr2', 3000, 3500, 'item #1', '.', '-']]

	chroms = [['chr1', 2100], ['chr2', 4000]]


	data = bedtiles(bed, chroms)
	track = Track(track_type='bedlike', position='top',
	              height=50, data=data, options={"minusStrandColor": "red"})


	d,s,v = higlass.display([[track]])
	d


Note that this function loads all the data into the viewconf and does
not use a server. Do not use this function with more than ~3000 items of
data.

We haven't implemented an inline-tiles function, however this API should be easy to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant