higlass-python icon indicating copy to clipboard operation
higlass-python copied to clipboard

docs v2: Search Box

Open manzt opened this issue 2 years ago • 1 comments
trafficstars

From the pior docs:

Search box
-----------

Views can have a search box which shows the current genomic position and lets users search for genes. In order for the current position to be shown, we need to pass in a chromsizes track. For gene search to be enabled, we have to pass in a gene annotations track:

chromosomes = Track(tilesetUid='N12wVGG9SPiTkk03yUayUw',
           server='https://higlass.io/api/v1',
           type='horizontal-chromosome-labels')
genes = Track(tilesetUid='OHJakQICQD6gTD7skx4EWA',
           server='https://higlass.io/api/v1',
           type='horizontal-gene-annotations')

(d,s,v) = higlass.display([
    View(
            [chromosomes, genes],
            chrominfo=chromosomes,
            geneinfo=genes,
        )
])
d

manzt avatar Feb 21 '23 19:02 manzt

We don't currently have a utility API for setting up the geneinfo and chrominfo for the viewconf object. Should be easy enough to add some API that supports passing a tileset or track: e.g.,:

import higlass as hg

hg.view(...).viewconf().info(
  genes=tileset, # or track?
  chromosomes=tileset, # or track?
)

Thoughts, @nvictus ?

manzt avatar Feb 21 '23 19:02 manzt