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

handling as URL params instead of JSON #952

Merged
merged 18 commits into from
Jan 9, 2018
Merged

Conversation

nathandunn
Copy link
Contributor

@nathandunn nathandunn commented Jan 4, 2018

  • handle addBookmarks
  • handle addTracks
  • handle addStores
    ~~handle addFeatures ~~
  • add tests
  • handle nested JSON features in addTracks (e.g., styles)
  • convert JSON to URL as well
  • mention security issues in the index.html
  • mention notation changes in the index.html
  • update release notes
  • update GMOD JBrowse config
  • update Apollo hash version to reflect this

@nathandunn nathandunn self-assigned this Jan 4, 2018
@ghost ghost added the in progress currently being worked on label Jan 4, 2018
@nathandunn
Copy link
Contributor Author

nathandunn commented Jan 4, 2018

http://localhost/jbrowse/?data=sample_data/json/volvox&loc=ctgA:1..50001&tracks=DNA,genes&addStore.store1.type=JBrowse/Store/SeqFeature/GFF3&addStore.store1.urlTemplate=http://localhost/volvox.gff3&addTracks.store1.label=genes&addTracks.store1.type=JBrowse/View/Track/HTMLFeatures&highlight=

http://localhost/jbrowse/?data=sample_data%2Fjson%2Fvolvox&loc=ctgA%3A1..50001&tracks=DNA&addStore.store1.type=JBrowse%2FStore%2FSeqFeature%2FGFF3&addStore.store1.urlTemplate=http%3A%2F%2Flocalhost%2Fvolvox.gff3&addTracks.store1.label=genes&addTracks.store1.type=JBrowse%2FView%2FTrack%2FHTMLFeatures&highlight=

@nathandunn nathandunn changed the title initial foray into handling as URL params handling as URL params instead of JSON Jan 4, 2018
@nathandunn
Copy link
Contributor Author

@deepakunni3 Can you make sure this works? (not sure why you are not in as a reviewer for this one)

In this case I'm using a remote gff as reference.

http://localhost/jbrowse/?data=sample_data/json/volvox&loc=ctgA:1..50001&tracks=DNA,genes&addStore.store1.type=JBrowse/Store/SeqFeature/GFF3&addStore.store1.urlTemplate=http://localhost/volvox.gff3&addTracks.store1.label=genes&addTracks.store1.type=JBrowse/View/Track/HTMLFeatures&highlight=&addBookmarks.bookmark1.start=3000&addBookmarks.bookmark1.end=4000&addBookmarks.bookmark1.ref=ctgA

@nathandunn
Copy link
Contributor Author

Its using the GFF3 file that comes with volvox, but should work for any set of anything. Also supports bookmarks.

screen shot 2018-01-04 at 10 50 35 am

@nathandunn nathandunn removed the in progress currently being worked on label Jan 5, 2018
@nathandunn
Copy link
Contributor Author

@deepakunni3 / @enuggetry I think this does everything I want to do. It still needs some documentation, but I want to merge this first.

It is using this: https://github.com/rhalff/dot-object

I got the npm package to work, but it ended up being wonky (wanted things at src) and the make release test failed.

@childers, I think this would be worth testing internally. I tried to encompass the work-cases you gave me. You can create URLs from JSON, as well. Some of the tests show how:

https://github.com/nathandunn/jbrowse/blob/e87f81a8eab4929ac8826cfcf601b6ca66085b20/tests/js_tests/spec/QueryParamConfigMapper.spec.js

@enuggetry
Copy link
Contributor

It looks good to go. thanks.

@ghost ghost added the in progress currently being worked on label Jan 9, 2018
@nathandunn nathandunn merged commit e5584b3 into GMOD:master Jan 9, 2018
@ghost ghost removed the in progress currently being worked on label Jan 9, 2018
@childers
Copy link

@nathandunn Thanks, I've been testing this and it does take the parameters as URL params now. This new functionality works great. Thanks!

@nathandunn
Copy link
Contributor Author

Wait, it works for both JBrowse and Apollo now? (I haven't tested it)

@childers
Copy link

childers commented Jan 10, 2018

The URL params work great in JBrowse, but don't work in Apollo. I can open an issue there if that's helpful. Please see GMOD/Apollo#1840 for some more information

@childers
Copy link

I just noticed that addFeatures doesn't seem to be implemented, or if it is, I can't figure it out.

As an example I have a URL with some features here:

https://apollo.nal.usda.gov/Drosophils%20bipectinata/jbrowse/?loc=scf7180000394085:914360..917628&tracks=DNA,Annotations,BlastResults&addTracks=[{"style": {"renderClassName":"blast-hit-20pct"},"label":"BlastResults","store":"url","type":"JBrowse/View/Track/HTMLFeatures"}]&addFeatures=[{ "seq_id":"scf7180000394085", "start": 914360, "end": 914389, "strand": "1", "name": "HSP:"},{ "seq_id":"scf7180000394085", "start": 917599, "end": 917628, "strand": "1", "name": "HSP:"}]

I can get all of the other sections working, but can't seem to work out the addFeatures params.

&addFeatures=[{ "seq_id":"scf7180000394085", "start": 914360, "end": 914389, "strand": "1", "name": "HSP:"},{ "seq_id":"scf7180000394085", "start": 917599, "end": 917628, "strand": "1", "name": "HSP:"}]

@nathandunn
Copy link
Contributor Author

@childers I have not implemented addFeatures, as I thought the most common use-case would be to use a remote url. I've added it to my list (its a "TODO" https://github.com/GMOD/jbrowse/pull/952/files#diff-cfb6e24963d31803b05b44d42ea77246R86).

You have a pretty simple use-case. I'll see if I can't get it done in the next couple of weeks. If you have time to start the implementation in PR, that would be great, as well, and I can simply help you finish it out.

@rbuels
Copy link
Collaborator

rbuels commented Jan 31, 2018

@nathandunn can you write a section on this in the JBrowse Configuration guide on the wiki, and note that it is coming out in JBrowse 1.12.4?

@nathandunn
Copy link
Contributor Author

@rbuels You need anything else on this? I'm going to do some work on supporting addFeatures, as well and I will update the doc further as well. Let me know if anything is with it.

@rbuels
Copy link
Collaborator

rbuels commented Feb 1, 2018

This looks good to me as is! Thanks for this.

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

Successfully merging this pull request may close these issues.

4 participants