From: Colin <col...@gm...> - 2023-10-24 19:18:54
|
Hi Michael Sorry for delay in reply, definitely feel free to let us know if you have any updates or questions. Regarding docs, main portal is here https://jbrowse.org/jb2/docs Developer docs related to things like plugins are here, for example, creating an adapter which can be used for adapting to a REST APIs https://jbrowse.org/jb2/docs/developer_guides/creating_adapter/ and then our embedded components that you refer to have links to 'storybook demos' and other docs here https://jbrowse.org/jb2/docs/embedded_components/ If you are accustomed to JBrowse 1 terminology, here is a rough mapping JBrowse 1->JBrowse 2 storeClass->adapter (there is no more urlTemplate, you look at the config docs https://jbrowse.org/jb2/docs/config_guides/alignments_track/ or "auto-generated config docs" for each little schema type https://jbrowse.org/jb2/docs/config/bamadapter/ and you will see that there is instead things like bamLocation, gffGzLocation, etc. sort of different for each track type) trackList->track label->config.json track trackId trackList track key->config.json track name bin/prepare-refseqs.pl->jbrowse add-assembly (assemblies have a special area of the config that provides a ReferenceSequenceTrack) bin/flatfile-to-json.pl->jbrowse add-track For custom sequence fetching and feature fetching, may require hand-editing the config.json. The config.json you linked uses the "biothings" plugin to fetch from mygene.info and myvariant.info. Example code for that here https://github.com/cmdcolin/jbrowse-plugin-biothings-api/blob/master/src/MyGeneAdapter.ts. Can add more info about plugins if interested -Colin On Thu, Oct 12, 2023 at 9:52 PM Michael Thang <m....@qf...> wrote: > Hi Colin, > Thank you for speedy reply and clarification ! I can relate the REST API > (aka mygene.info) to a project I am working on and using this Django > framework to embed jbrowse into it (machado > <https://machado.readthedocs.io/en/latest/jbrowse.html>). I am keen to > use Jbrowse2 but the main issue is how to translate the trackList.json to > config.json for my project. As you mentioned above, most of the Jbrowse1 > options are dropped for Jbrowse2. I guess I need to investigate a bit more > to see how much work I need to use Jbrowse2 for my project. The good news > is the Machado Framework does come with API > <https://www.machado.cnptia.embrapa.br/demo_machado/api/> setup and I am > trying to understand how to combine the API and the Jbrowse2 in the > config.json (Jbrowse2) based on the trackList.json > <https://github.com/lmb-embrapa/machado/blob/master/extras/trackList.json.sample> > (Jbrowse1) format. > > I think this is the config.json > <https://github.com/cmdcolin/jbrowse-plugin-biothings-api/blob/master/config.json> > you use to retrieve reference genome and tracks using API call. For me, it > is a bit difficult to understand the options you use in the config.json. I > believe there must be a documentation somewhere . can you please point me > to the documentation if available? > > To date, I managed to setup the Jbrowse2 running on my apache server > without any problems. What I want to explore next is to work on the REST > API call to query and show the tracks/assemblies of interest on an embedded > Jbrowse2. However, I am kind of stuck at the moment. > > Best > > On Friday, October 13, 2023 at 11:16:28 AM UTC+10 Colin wrote: > >> Hi Michael, >> >> Many of the JBrowse 1 options do not automatically apply to JBrowse 2 >> because the config.json format is quite a bit different from trackList.json. >> >> >> I also see that your trackList.json refers to a "REST" data adapter from >> JBrowse 1 (JBrowse/Store/SeqFeature/REST) but this data adapter type was >> not added to JBrowse 2. We did not add this to JBrowse 2 because it is hard >> or awkward to design a "blessed" or "recommended" REST API format that we >> want users to implement. If you do want to make an adapter for your REST >> API, you can write a custom plugin to do so. I may be biased because I >> wrote a lot of data adapters for various REST APIs on the web as plugins ( >> mygene.info adapter, UCSC rest api adapter, etc) but my feeling is that >> it is relatively little code (100-200 lines for example) and it can >> actually be useful, as a developer, to be in control of the client code >> that is accessing your particular REST API. >> >> If your main concerns are getting a JBrowse 1 REST API working with >> JBrowse 2 I can elaborate, or I can help with any of the other JBrowse 2 >> upgrade steps too :) >> >> >> -Colin >> >> On Thu, Oct 12, 2023 at 11:42 AM Nathan Dunn <ndu...@gmail.com> wrote: >> >>> >>> >>> On Oct 11, 2023, at 11:40 PM, Michael Thang <m.t...@qfab.org> wrote: >>> >>> Hi Apollo Team, >>> I would like to find out how to translate this Jbrowse1 trackList.json >>> <https://github.com/hexylena/JBrowse-REST-API-Example/blob/master/data/trackList.json> >>> to Jbrowse2. I just borrowed the trackList.json online, but I am running >>> into the same situation where I have my Jbrowse1 configured to run API. I >>> am exploring the posssiblity to use the same trackList.json format for >>> Jbrowse2. However, the Jbrowse2 is using config.json instead and the json >>> looks different. Therefore, I dont know if all these options >>> <https://jbrowse.org/docs/global_options.html> are still applicable for >>> Jbrowse2. >>> >>> >>> >>> -- >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to apollo+un...@lbl.gov. >>> >>> >>> -- > To unsubscribe from this group and stop receiving emails from it, send an > email to apo...@lb.... > |