From 04e93c4bd464c91f74d9393e27989e91c27a55a4 Mon Sep 17 00:00:00 2001 From: smitkadvani Date: Mon, 16 Oct 2023 18:00:10 -0700 Subject: [PATCH 1/4] Example added for searching using higlass-python --- docs/getting_started.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 4561751..a66d64d 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -182,6 +182,39 @@ or loading an existing view config via URL to access a sub-track: # } +Add Genome Position SearchBox +.. code-block:: python + +import higlass as hg +search_box_obj = hg.GenomePositionSearchBox( + autocompleteServer="//higlass.io/api/v1", + autocompleteId="OHJakQICQD6gTD7skx4EWA", + chromInfoId="hg19", + chromInfoServer="//higlass.io/api/v1", + visible=True) + +mm10 = hg.remote( + uid="QDutvmyiSrec5nX4pA5WGQ", + server="//higlass.io/api/v1", +) + +view1 = hg.view( + + mm10.track("gene-annotations",height=150).opts( + minHeight = 24, + ), + genomePositionSearchBox = search +) + +#In order to get access to track sources from higlass.io data sources +list_of_track_source_servers = [ + "//higlass.io/api/v1", + "https://resgen.io/api/v1/gt/paper-data" + ] + +view1.viewconf(trackSourceServers = list_of_track_source_servers, exportViewUrl = "/api/v1/viewconfs") + + View extent ----------- From a9e9a1b3eaf8fa3c19ca284a2107bca56add44ab Mon Sep 17 00:00:00 2001 From: smit kadvani Date: Mon, 16 Oct 2023 18:20:47 -0700 Subject: [PATCH 2/4] Syntax updated --- docs/getting_started.rst | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index a66d64d..13f3495 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -185,34 +185,34 @@ or loading an existing view config via URL to access a sub-track: Add Genome Position SearchBox .. code-block:: python -import higlass as hg -search_box_obj = hg.GenomePositionSearchBox( - autocompleteServer="//higlass.io/api/v1", - autocompleteId="OHJakQICQD6gTD7skx4EWA", - chromInfoId="hg19", - chromInfoServer="//higlass.io/api/v1", - visible=True) - -mm10 = hg.remote( - uid="QDutvmyiSrec5nX4pA5WGQ", - server="//higlass.io/api/v1", -) - -view1 = hg.view( - - mm10.track("gene-annotations",height=150).opts( - minHeight = 24, - ), - genomePositionSearchBox = search -) - -#In order to get access to track sources from higlass.io data sources -list_of_track_source_servers = [ - "//higlass.io/api/v1", - "https://resgen.io/api/v1/gt/paper-data" - ] - -view1.viewconf(trackSourceServers = list_of_track_source_servers, exportViewUrl = "/api/v1/viewconfs") + import higlass as hg + search_box_obj = hg.GenomePositionSearchBox( + autocompleteServer="//higlass.io/api/v1", + autocompleteId="OHJakQICQD6gTD7skx4EWA", + chromInfoId="hg19", + chromInfoServer="//higlass.io/api/v1", + visible=True) + + mm10 = hg.remote( + uid="QDutvmyiSrec5nX4pA5WGQ", + server="//higlass.io/api/v1", + ) + + view1 = hg.view( + + mm10.track("gene-annotations",height=150).opts( + minHeight = 24, + ), + genomePositionSearchBox = search + ) + + #In order to get access to track sources from higlass.io data sources + list_of_track_source_servers = [ + "//higlass.io/api/v1", + "https://resgen.io/api/v1/gt/paper-data" + ] + + view1.viewconf(trackSourceServers = list_of_track_source_servers, exportViewUrl = "/api/v1/viewconfs") View extent From ccc8f16acd0a1471d830906869be8946f5a09005 Mon Sep 17 00:00:00 2001 From: smit kadvani Date: Mon, 16 Oct 2023 18:24:39 -0700 Subject: [PATCH 3/4] Update getting_started.rst --- docs/getting_started.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 13f3495..887b7c3 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -182,7 +182,13 @@ or loading an existing view config via URL to access a sub-track: # } + + Add Genome Position SearchBox +------------------- + + + .. code-block:: python import higlass as hg From be567c1b59f2e6a6e849072eeab3bec40dcab275 Mon Sep 17 00:00:00 2001 From: smit kadvani Date: Mon, 20 Nov 2023 18:08:28 -0800 Subject: [PATCH 4/4] Update getting_started.rst - typo corrected --- docs/getting_started.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 887b7c3..5616e21 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -192,12 +192,6 @@ Add Genome Position SearchBox .. code-block:: python import higlass as hg - search_box_obj = hg.GenomePositionSearchBox( - autocompleteServer="//higlass.io/api/v1", - autocompleteId="OHJakQICQD6gTD7skx4EWA", - chromInfoId="hg19", - chromInfoServer="//higlass.io/api/v1", - visible=True) mm10 = hg.remote( uid="QDutvmyiSrec5nX4pA5WGQ", @@ -209,7 +203,12 @@ Add Genome Position SearchBox mm10.track("gene-annotations",height=150).opts( minHeight = 24, ), - genomePositionSearchBox = search + genomePositionSearchBox = hg.GenomePositionSearchBox( + autocompleteServer="//higlass.io/api/v1", + autocompleteId="OHJakQICQD6gTD7skx4EWA", + chromInfoId="hg19", + chromInfoServer="//higlass.io/api/v1", + visible=True) ) #In order to get access to track sources from higlass.io data sources