jefferislab / NBLAST_on-the-fly

Web application demonstrating NBLAST neuron similarity/search
http://jefferislab.org/si/nblast
5 stars 3 forks source link

Links to one against all blast? #52

Open dosumis opened 9 years ago

dosumis commented 9 years ago

Is is possible to roll a stable link to a 1 against all Nblast?

I'd like to use this to roll links from single neuron pages on VFB to NBlast.

jefferis commented 9 years ago

No.

We could do this if

  1. We got metacell to build the configurable 3d browser I mentioned
  2. We make a web service (probably https://www.opencpu.org) for the search results rather than relying on http://shiny.rstudio.com

I've discussed point 2 with @ajdm but no telling if this will be possible.

jdmanton commented 9 years ago

If I've understood correctly, this could also be done if we can get #20 to work (which I'd forgotten about, to be honest). At the moment, we can have links to pre-fill fields, but not autocomplete on the same fields, although this might be possible if we implement a different autocompletion mechanism. I'll investigate on a different branch.

dosumis commented 9 years ago

Quick way to get a webservice: open up post requests on the form ??

jdmanton commented 9 years ago

Now implemented with #54, merged into master and deployed to flybrain. For example, clicking on http://flybrain.mrc-lmb.cam.ac.uk/si/nblast/on-the-fly/#query_all=fru-M-500112 and then clicking the NBLAST button should give the NBLAST results, as well as the links to VFB implemented in #53.

jefferis commented 9 years ago

@dosumis @Robbie1977 @mmc46 Could we implement a link out scheme from all flycircuit neurons on VFB using this url pattern

http://flybrain.mrc-lmb.cam.ac.uk/si/nblast/on-the-fly/#query_all=<fc_neuron_id>
``
dosumis commented 9 years ago

OK. Already using idid for linkouts to flycircuit, so should be straightforward.

jdmanton commented 9 years ago

Just to confirm, these links still work irrespective of whether the code is running on flybrain or the external VPS, so should remain stable.

jdmanton commented 8 years ago

This still works after the rewrite.

Robbie1977 commented 8 years ago

can we turn on mean scores in the link?

jefferis commented 8 years ago

@ajdm do you know?

can we turn on mean scores in the link?

would we have to just turn mean scores on by default?

jefferis commented 8 years ago

I looked at this code: https://github.com/jefferislab/NBLAST_on-the-fly/blob/master/url.js and it looks like it should be possible to update checkboxes, but haven't worked out the syntax.

jdmanton commented 8 years ago

I can do it, but this has revealed a bug in the current implementation. Will fix and push soon.

jdmanton commented 8 years ago

Done in 7b711b3875970d7ba062d4249da4ade55094d8d1. I've had to remove the example field input and have put it in the text, as this causes the wrong scores to be loaded on page load from a link to a different neuron.

jefferis commented 8 years ago

I've had to remove the example field input and have put it in the text, as this causes the wrong scores to be loaded on page load from a link to a different neuron.

Thanks! I think that's fine. G.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

jefferis commented 8 years ago

That sounds great @ajdm. Is this update live?

I am trying:

http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/#query_all=fru-M-500112,all_use_mean=TRUE

and it is searching for the default value (fru-M-200266) as suggested in your earlier message.

jdmanton commented 8 years ago

Sorry, I forgot to update flybrain. Live now.

jefferis commented 8 years ago

Hmm. Right now

http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/#query_all=fru-M-500112,all_use_mean=TRUE

sets the checkbox but doesn't choose a neuron or run a search. Consistent with this:

http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/#query_all=fru-M-500112

no longer works for me, but just results in an empty search. Finally

http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/#all_use_mean=TRUE

does set the checkbox but of course does not run a search. Am I missing something @ajdm?

jdmanton commented 8 years ago

Getting it to run a search without it ever running the wrong search seems to be impossible, as the output can only be reactive on one input, not both. This means that if you have a URL that contains a neuron ID and a checkbox option it will run the search before setting the checkbox. As such, it just prefills the inputs and waits for the user to press the button.

jefferis commented 8 years ago

Hmm OK. I get this bit:

As such, it just prefills the inputs and waits for the user to press the button.

But for the urls mentioned above, for me, it doesn't put neuron id in the id field (and pressing the button therefore does nothing!)

jdmanton commented 8 years ago

Ah. During the rewrite I renamed query_all to all_query to make the code more consistent. http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/#all_query=fru-M-500112,all_use_mean=TRUE should work for your first link. Do you want me to change this back to query_all, or change the links?

jefferis commented 8 years ago

Ah! That's fine. We can go with the revised url scheme. Maybe you can add some information to the README documenting the url scheme. Also could you add the same functionality for the GAL4 search?

dosumis commented 8 years ago

Also could you add the same functionality for the GAL4 search? +1 - this is what we'd most like for VFB linkouts.

jefferis commented 8 years ago

@ajdm Any chance you could take a look at the GAL4 linkout?

jdmanton commented 8 years ago

Sorry, I meant to reply earlier but obviously didn't get around to it. The problem with the GAL4 linkout is that you don't seem to be able to get it to change to the GAL4 tab. I keep on having a few more ideas on how to try it but none have worked so far. I'll let you know if I get anywhere.

jefferis commented 8 years ago

Ah, I see. That's a pain, because after the paper and the chaps at VFB advertising, this is something that loads of people are interested in.

jdmanton commented 8 years ago

As a very un-ideal solution, we could spin off the GAL4 search into a separate Shiny app and have a link to and from the main one there. Then I could set up the URL-linking as I did for the one-against-all search.

jefferis commented 8 years ago

What would be the downsides other than different urls?

jdmanton commented 8 years ago

As far as I can tell, the only other downside is the lack of state sharing. At the moment, if you switch between tabs, your previous input is remembered. If we had separate apps, that wouldn't be the case if people closed their browser tab. Also, as far as I can find, there's no way to stop it opening a new tab if that page is already open in a browser tab, so you wouldn't 'switch' between tabs in the same way as you currently do.

jefferis commented 8 years ago

Might this be useful? https://github.com/aoles/shinyURL

jdmanton commented 8 years ago

I've now got this working in 797f010deddfb3b9bed9574feb57d3c86303ac52 and it seems to work well, but I can't get packrat to add the shinyURL package into the version store. Any ideas? (packrat::snapshot() doesn't work)

jefferis commented 8 years ago

I've now got this working in 797f010 and it seems to work well,

Super!

but I can't get packrat to add the shinyURL package into the version store. Any ideas? (packrat::snapshot() doesn't work)

What does the error look like?

jdmanton commented 8 years ago

There's no error, it just doesn't add anything.

jefferis commented 8 years ago

Are you doing this on your laptop or live on flybrain? Do you have latest R? How was the shinyURL package installed? I assume by devtools::install_github.

jdmanton commented 8 years ago

Laptop. I could just install the package on flybrain, but that would somewhat defeat the point of using packrat. I'm on R 3.2.3, and installed the shinyURL package as you said.

jefferis commented 8 years ago

I'll take a look quickly on my laptop, but I would recommend installing shinyURL manually for the time being.

jdmanton commented 8 years ago

Now running on flybrain. GAL4 links have the format of http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/?gal4_query=fru-M-200266&tab=GAL4.

jefferis commented 8 years ago

woot! or words to that effect!

jefferis commented 8 years ago

@dosumis do you want to try this out? Worked for me.

dosumis commented 8 years ago

Excellent. Works fine for me (although feels a bit odd that I still need to press the NBlast button).

@Robbie1977 - can we make it a priority to get these added?

I guess this issue is identifying the appropriate individuals to add to. This could potentially be hacked into the current site based on the image being from the FlyCircuit dataset. We should be able to add on VFBdev version of 1.5 based on typing of individuals in Neo as neuron. Code in place, but rebuild of Neo production required.

Robbie1977 commented 8 years ago

Neither: http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/#query_all=fru-M-500112,all_use_mean=TRUE or http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/#all_query=fru-M-500112,all_use_mean=TRUE seems to show any results now?

GAL4 is working (with user NBLAST button press).

jdmanton commented 8 years ago

http://flybrain.mrc-lmb.cam.ac.uk:8080/NBLAST_on-the-fly/?all_query=fru-M-500112&all_use_mean=TRUE is the new format. Sorry for not making the change clearer.

Robbie1977 commented 8 years ago

thanks