From: Ke J. <bio...@gm...> - 2022-02-08 04:10:28
|
Great! It works. Thank you for the help! I missed two things in my previous example: 1. before "&sessionTracks", "&tracks=url_track" is also needed to turn the track on first; 2. proper HTML encoding is needed in the url, for example, spaces by %20 and quotes by %22. For a test in case someone is also trying this: The following is the one did not work: http://myjbrowse2sites/testsite/?config=config.json&loc=1:6000-7000&assembly=Porcine%20S.%20scrofa%20v11.1&sessionTracks=[{ <http://myjbrowse2sites/testsite/?config=config.json&loc=1:6000-7000&assembly=Porcine%20S.%20scrofa%20v11.1&sessionTracks=[%7B>"type":"FeatureTrack","trackId":"url_track","name":"URL track","assemblyNames":["Porcine S. scrofa v11.1"],"adapter":{"type":"FromConfigAdapter","features":[{"uniqueId":"one","refName":"1","start":6100,"end":6200,"name":"dynamic_test"}]}}] The following is the url that works: http://myjbrowse2sites/testsite/?config=config.json&loc=1:6000-7000&assembly=Porcine%20S.%20scrofa%20v11.1&tracks=url_track&sessionTracks=[{%22type%22:%22FeatureTrack%22,%22trackId%22:%22url_track%22,%22name%22:%22URL%20track%22,%22assemblyNames%22:[%22Porcine%20S.%20scrofa%20v11.1%22],%22adapter%22:{%22type%22:%22FromConfigAdapter%22,%22features%22:[{%22uniqueId%22:%22one%22,%22refName%22:%221%22,%22start%22:6400,%22end%22:6500,%22name%22:%22dynamic_test%22}]}}] On Mon, Feb 7, 2022 at 4:48 PM Colin <col...@gm...> wrote: > Hi Ke > > Basically &sessionTracks= added this to your session, and then you have to > turn the track on with &tracks= referring to the trackId from your > sessionTrack > > Example URL > > > https://jbrowse.org/code/jb2/v1.6.4/?config=test_data/volvox/config.json&loc=ctgA:0-500&assembly=volvox&tracks=url_track&sessionTracks=[{%22type%22:%22FeatureTrack%22,%22trackId%22:%22url_track%22,%22name%22:%22URL%20track%22,%22assemblyNames%22:[%22volvox%22],%22adapter%22:{%22type%22:%22FromConfigAdapter%22,%22features%22:[{%22uniqueId%22:%22one%22,%22refName%22:%22ctgA%22,%22start%22:100,%22end%22:200,%22name%22:%22URL%20Feature%22}]}}] > <https://jbrowse.org/code/jb2/v1.6.4/?config=test_data/volvox/config.json&loc=ctgA:0-500&assembly=volvox&tracks=url_track&sessionTracks=[%7B%22type%22:%22FeatureTrack%22,%22trackId%22:%22url_track%22,%22name%22:%22URL%20track%22,%22assemblyNames%22:[%22volvox%22],%22adapter%22:%7B%22type%22:%22FromConfigAdapter%22,%22features%22:[%7B%22uniqueId%22:%22one%22,%22refName%22:%22ctgA%22,%22start%22:100,%22end%22:200,%22name%22:%22URL%20Feature%22%7D]%7D%7D]> > > > -Colin > > On Mon, Feb 7, 2022 at 2:20 PM Ke Jiang <bio...@gm...> wrote: > >> Hi, >> >> It was great to see this feature! I was looking forward to it from the >> start of JBrowse2. Thanks to all the developers behind this! The URL works >> well but the &sessionTracks didn't quite work for me so far, here is an >> example: >> >> >> http://myjbrowse2sites/testsite/?config=config.json&loc=1:6000-7000&assembly=Porcine%20S.%20scrofa%20v11.1&sessionTracks=[{ >> <http://myjbrowse2sites/testsite/?config=config.json&loc=1:6000-7000&assembly=Porcine%20S.%20scrofa%20v11.1&sessionTracks=[%7B>"type":"FeatureTrack","trackId":"url_track","name":"URL >> track","assemblyNames":["Porcine S. scrofa >> v11.1"],"adapter":{"type":"FromConfigAdapter","features":[{"uniqueId":"one","refName":"1","start":6100,"end":6200,"name":"Boris"}]}}] >> >> The url works properly up to the "sessionTracks" part, but there was no >> dynamic track loaded or shown. Anyone have any advice? Do I need to code >> the spaces in the configuration with "%20", too? >> >> Thanks! >> >> Ke >> >> On Fri, Feb 4, 2022 at 11:45 AM han...@ge... < >> han...@ge...> wrote: >> >>> Hi Colin, >>> This is helpful for me. Thanks >>> >>> Best >>> >>> ------------------------------ >>> Hang Yang, Ph.D. >>> >>> Institute of Genetics and Developmental Biology >>> Chinese Academy of Sciences >>> No.1 West Beichen Road, Chaoyang District >>> Beijing, China 100101 >>> >>> >>> *From:* Colin <col...@gm...> >>> *Date:* 2022-02-03 05:25 >>> *To:* han...@ge... >>> *CC:* gmod-ajax <gmo...@li...> >>> *Subject:* Re: [Gmod-ajax] JBrowse2 >>> Hi there >>> JBrowse 1.6.4 merged this finally. Docs here >>> https://jbrowse.org/jb2/docs/urlparams/ >>> >>> Let me know if that helps:) >>> -Colin >>> >>> On Tue, Jan 11, 2022 at 11:02 AM Colin <col...@gm...> wrote: >>> >>>> Hello, >>>> This feature has been implemented on a work-in-progress branch. It is >>>> planned to be released in an upcoming version soon >>>> >>>> https://github.com/GMOD/jbrowse-components/pull/2165 >>>> >>>> >>>> If you want to try to preview the feature before the official release >>>> you can use the CLI command to test out the branch (it is otherwise up to >>>> date with other latest release features) >>>> >>>> jbrowse create --branch nav_with_urlbar2 jbrowse2 >>>> >>>> This will download the code from that branch to a folder named >>>> jbrowse2, and then you can use URLs like >>>> >>>> >>>> http://yoursite.com/jbrowse2/?loc=chr1:1-100&assembly=hg19&tracks=track_id1,track_id2 >>>> >>>> >>>> -Colin >>>> >>>> On Tue, Jan 11, 2022 at 10:12 AM han...@ge... < >>>> han...@ge...> wrote: >>>> >>>>> Dear JBrowse developers, >>>>> I am a user of the JBrowse. It's really a useful tool. >>>>> I have a question about how to use URL query API in JBrowse2 >>>>> e.g. specifying ?loc=1:1..100. >>>>> Thanks, Look forward to your reply. >>>>> >>>>> Best >>>>> >>>>> ------------------------------ >>>>> Hang Yang, Ph.D. >>>>> >>>>> Institute of Genetics and Developmental Biology >>>>> Chinese Academy of Sciences >>>>> No.1 West Beichen Road, Chaoyang District >>>>> Beijing, China 100101 >>>>> _______________________________________________ >>>>> Gmod-ajax mailing list >>>>> Gmo...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/gmod-ajax >>>>> >>>> _______________________________________________ >>> Gmod-ajax mailing list >>> Gmo...@li... >>> https://lists.sourceforge.net/lists/listinfo/gmod-ajax >>> >> |