Add webanno tool to SABER repository #37
                
     Open
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
webanno
A human-facing web annotation tool for different flavors of data.
Overview
The
webannotool runs a Python process that exposes a web server with a single user-facing web-page which holds developer-defined data to annotate (perhaps it's text, perhaps it's a webform, perhaps it's imagery...). Once the data are annotated and submitted, the web server shuts down gracefully (exitcode 0), which means you can use the output data in a SABER workflow.Why not a conventional web app?
A conventional web application process does not stop once the data are annotated, which means you cannot run it "in-line" with the rest of a SABER workflow.
How do I pick the data to annotate?
webannouses a plugin architecture system: A plugin defines both the HTML of the page as well as what to do with the data when annotation is over.There are many already-existing annotation plugins:
ButtonPressPluginThis plugin is the simplest (and a good example to learn from!), and just monitors when a button is pressed.
FormInputPluginThis plugin lets you create a custom form in HTML for a user to fill out.
CentroidsPluginThis plugin lets a user place points in a 2D image, and returns a JSON file of the coordinates of those clicks.
BossVolumePluginThis plugin lets a user place points in a 3D volume downloaded from BossDB.
Installation
To get started, you need only pip-install this package and its dependencies:
pip3 install -r requirements.txt pip3 install -e .Usage
Use the
webannotool from the command-line:Results will be stored in
results.jsonin PWD. If you would like to store them elsewhere, setjson_file_outputin any config file (all plugins accept this config value).