GithubHelp home page GithubHelp logo

berkeleybop / bbop-js Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 5.0 7.63 MB

Cross-platform client and server JavaScript library, with a concentration on Solr, graphs, utilities, and convenience methods.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.24% JavaScript 97.39% Common Lisp 0.31% Perl 0.87% Python 0.07% HTML 1.13%

bbop-js's Introduction

Generic repository, README, and scratch space for the Berkeley BOP.

bbop-js's People

Contributors

cmungall avatar kltm avatar skinner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bbop-js's Issues

get_assemble fails on some input

If an input field value is null, it blows up:

js> bbop.core.get_assemble({"defType": "edismax", "qt": "standard", "indent": "on", "wt": "json", "rows": 10, "start": 0, "fl": "*,score", "facet": "true", "facet.mincount": 1, "facet.sort": "count", "json.nl": "arrarr", "facet.limit": 25, "personality": null, "sfq": {"document_category": ["annotation"]}})

highlight external ontology terms different color

We have the GO regexp floating around in the amigo code, so that could maybe be pulled in as an option--nice and not GO-specific. However, it would make the linker a bit more complicated. If too unpleasant, it might end up being a bad idea.

certain queries return unexpected results

Switch all widgets over to Bootstrap 3

We're currently on jQuery UI, but

  • AmiGO 2 uses BS3, and it would be nice to match
    • This would also mean controlling the styles would be easier
  • BS3 looks and works significantly better

Migrate code to use underscore.js (core and testing are meh)

There is some hilariously bad old code floating around in core.js and test.js. This ticket is a reminder that we need to move to a more solid base using underscore.js for the primitives, and hopefully built around npm tools, mocha, gulp, etc.

spinner in search pane widget

When the connection is slow on the search pane, it is difficult to know when a button has been pressed. A spinner (maybe autocomplete's) should be added to give a visual clue that action has started or is taking place.

This same spinner should also be visible during the initial search.

Shared annotation checks improvements

Report labels

This is a bit opaque

Checked exclusive: GO:0006520 && GO:0006310 (3)
ERROR : exclusive count of 3 on: GO:0006520;GO:0006310

From:

Use more concise bookmarks

The URL in the report is long, ugly and yields a warning.

This form works just as well:

http://amigo2.berkeleybop.org/cgi-bin/amigo2/amigo/search/bioentity?q=*:*&fq=isa_partof_closure:%22GO:0006520%22&fq=isa_partof_closure:%22GO:0006310%22&sfq=document_category:%22bioentity%22

Use GO labels on the AmiGO page

When your search is pinned using IDs you can't see the labels for the IDs. I realize the way this works makes it a bit trickier to show the labels here, but I think we need to work on this.

Highlight matching terms

In the above page with two closure terms pinned, there are 3 matching bioentities. They match because two terms in the list of direct annotations are in the closure of both search terms. We should be able to see which ones.

bookmarks do not recover q and/or fill out the filter box

Looking at the bookmark

http://amigo2.berkeleybop.org/cgi-bin/amigo2/amigo/search?bookmark=http%3A%2F%2Fgolr.berkeleybop.org%2Fselect%3FdefType%3Dedismax%26qt%3Dstandard%26indent%3Don%26wt%3Djson%26rows%3D10%26start%3D0%26fl%3Dbioentity%252Cbioentity_name%252Cannotation_class%252Cannotation_extension_class_handler%252Csource%252Ctaxon%252Cevidence_type%252Cevidence_with%252Cpanther_family%252Cbioentity_isoform%252Creference%252Cbioentity_label%252Cannotation_class_label%252Ctaxon_label%252Cpanther_family_label%252Cscore%252Cid%26facet%3Dtrue%26facet.mincount%3D1%26facet.sort%3Dcount%26json.nl%3Darrarr%26facet.limit%3D25%26hl%3Dtrue%26hl.simple.pre%3D%3Cem%2520class%3D%22hilite%22%3E%26personality%3Dbbop_ann%26sfq%3Ddocument_category%3A%22annotation%22%26fq%3Ddocument_category%3A%22annotation%22%26fq%3Devidence_type_closure%3A%22author%2520statement%2520used%2520in%2520manual%2520assertion%22%26facet.field%3Dsource%26facet.field%3Dassigned_by%26facet.field%3Daspect%26facet.field%3Devidence_type_closure%26facet.field%3Dpanther_family_label%26facet.field%3Dtaxon_closure_label%26facet.field%3Dannotation_class_label%26facet.field%3Disa_partof_closure_label%26facet.field%3Dregulates_closure_label%26facet.field%3Dannotation_extension_class_closure_label%26q%3D-reference%3APMID*%26qf%3Dannotation_class%5E2%26qf%3Dannotation_class_label_searchable%5E1%26qf%3Dbioentity%5E2%26qf%3Dbioentity_label_searchable%5E1%26qf%3Dbioentity_name_searchable%5E1%26qf%3Dannotation_extension_class%5E2%26qf%3Dannotation_extension_class_label_searchable%5E1%26qf%3Dreference%5E1%26qf%3Dpanther_family_searchable%5E1%26qf%3Dpanther_family_label_searchable%5E1%26qf%3Dbioentity_isoform%5E1

the filter box is not filled out even though the results are correct. The filter box should contain:

-reference:PMID*

facet drilling/search filters (accordion in the search pane) needs some work

Counts that are the same number of returned documents does /not/ imply that the facet bears no information; think of closures on different paths--they might look the same (same counts) but clicking on them can get you different sets.

Even assuming the above, in Solr it's hard to eliminate facets--we have a lower limit, but not an upper one. without getting way more facets than we need, it's not knowable how many we would have to order to get 25 back. Might be doable with pivots in Solr 4.+?

We have triaged all of the above with mentioning a little about the redundancy in the accordion itself.

Remove reference to dead modules

Remove/update dead modules like ringo http https etc. They are causing upstream problems when the bbop libraries are imported

term annotation pane: pin to closure OR annotation extension (bbop.logic)

This boils down to the use of bbop.logic to replace strings in fqs. This is on the map.

This starts getting a little harder since we'll be needing actual logic functioning in the fqs as their default functionality is flat and AND.

This will take a rewrite of some of the fundamental manager stuff. Probably not horrible, but will take a little effort.

Widget interfaces (handlers, linkers, table renderers, etc.) should have access to more than ID and field names

This issue comes from table widget reuse in monarch-initiative/monarch-app#687.
Essentially, they cannot uniquely calculate a link from the ID and incoming field name, and need to probe another document field to make a correct calculation.

While not devastating for the linker itself in some formulations, the code around the linker at least needs access to more information to hint the linker properly. Which in turn means that the table cell needs to be able to access more than the local "bits", but rather the whole document at that moment, which we do not currently have.

Thus, the ability to access the larger context should be added to bbop-js functions to increase the general applicability; however, it would be an incompatible (although not earth shaking) API break. I think it would then be best handled by 1) allowing the _process_entry function to be overridden and/or 2) making the handler dispatch pass more information by default.

Yes, we are limiting this in scope to the handlers and the table cell drawing mechanisms for the BS3 table render at this point. This may cause API breaks elsewhere in AmiGO that will need to be fixed as we run into them.

The win for this item is that BBOP/AmiGO widgets can see wider reuse (e.g. Monarch).

Need better algorithm in set_comfy_query (getting inconsistent autocomplete results)

From email thread with @cmungall and david

regulation heart g| (gives response because there /are/ free-floating "g"s)
regulation heart gr| (no response--not a lot of "gr"s)
regulation heart gro|* (wildcard added and "gro*" gives response)

A better method would be to only invoke the three character limit when the "last token" is the only token. This should give the desired behavior.

Search pane filter names/labels are often unhelpful or confusing

Labels (while real) like regulates_closure should be replaced, or at least modified, with a user label. Like how the accordion uses nice titles rather than internal strings.

While there is an argument to me made that it helps education, debugging, and training people for gannet, we might want to consider a change here.

Documentation for Computed Relationship

The TransitivityGraph page mentions this but it isn't defined.

Computed Relationship

A computed relationship (or inferred relationship) is a relationship that is inferred through the application of a set of rules. For example, if P is declared transitive, then given path

x P y P z

There is a computed relationship x P z.

Implementations may differ in how this is performed, but as a general rule the rules should be specified in OWL, and the implementation should be complete w.r.t the EL++ subset of OWL. This allows for property chains, e.g.

Given

  P o Q -> R

And a path

  x P y Q z

Then there is an inferred relationship x R z

Non-reducible paths

If we have a path

x P y Q z

And there are no property chains connecting P and Q, then the path between x and z cannot be reduced any further than a computed relationship

x (P o Q) z

For now we only allow primitive relations between nodes; thus the path between x and z would be discarded. In future we may make this configurable[??]

Base case

There is at least one computed edge for every asserted edge. Thus if the graph contains

x R y

Then it is valid to call 'x R y' a computed edge

Implementations

We currently use the OWLGraphWrapper implementation

Tree/graph structure browsing in facet filters

For filters that have graph structure associated with them (likely another special ending), have a display that operates more like a tree browser.

Unlikely to have any progress until #16, and would need some loader support (but see below).

Another way to do it would be to piggyback on #29 and have it as a pop-out. That might be the easiest and could be done with the current framework.

Exploration autocomplete widget

It would be nice to either extend the autocomplete (on ontologies) widget, or make a complementary widget that:

  • pops open a window with an embedded browser
  • allows the exploration of the graph (including definitions--from David/Tanya)
  • button to return ID from widget to AC

Add bbop.min.js to NPM

I am unaware of the best practice of supplying minified js files for libraries that may be used on the client, but this would be useful for Monarch while we implement bundling of js and css files.

make the filter accordion an independent widget

With the accordion as a separate widget, not only would it make the code cleaner, we could apply the widget to other use cases such as reimplementing the tree-based annotation count (from AmiGO 1.x) and outside uses such as PAINT column filtering.

Plan for migration to bbop-graph and other libraries

Continuing from #33

My understanding is that the plan is to deprecate this library and replace it with other libraries. I'd like to make sure we don't lose any documentation when doing this. I can help move the graph docs over to bbop-graph, and updating them in the process. I don't want to start making PRs or wiki edits to bbop-graph yet til I'm sure of the plan.

user selectable results count

goes fine with 25
and 100
10000 is a bit much

Not sure how important this is. May be bumped in favor of a selectable download widget.

convert library/namespacing to CommonJS

To allow better interoperability, and to pave the way for rhino/ringo/node uses of bbop-js and amigo (easy opensearch, no more parallel implementations in perl and JS), we should commit to following the CommonJS spec.

I've already done some experimental packaging of bbop.js in a CommonJS-style container and it seems that while the rewriting of the namespaced calls will be annoying, there is little that would have to be changed otherwise. Looks easy, but requires a little elbow grease--image going back through the unit tests.

bookmarking code is a unwieldy, with too much in user space

It might be good to revisit bookmarks and the search pane with an eye on getting the UI as well as the manager into the right state with a single call and a bookmark argument.

Currently, a large portion of the bookmark mechanism is left to the "user", so there is a lot of sanity and recall coding running around (think first call issues as well) that would probably be a better fit inside the search_pane itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.