Skip to content

Instantly share code, notes, and snippets.



Last active Dec 26, 2015
What would you like to do?

Weighted Network

We're going to gather gene pairs from single query results searching for genes sharing the same annotation term.

G1 A1

G2 A1 -> G1 G2 A1

G2 A3

The client's going to send a single query with all the attribute lists and the server splits this one and sends them as separated queries throuth the query engine. The results are then merged properly and sent back to the client.



  • #validateProcessorConfig retrieves the processor's name from the xml query


  • #accepts(String[]) I believe it checks the content type of the request is compatible with the type handled by this processor and returns a truth value. There's no need to customize it for now.

  • #isClientDefined(String)

      public final boolean isClientDefined(String name) {
          try {
              // Get declared name field of this class or interface
              Field field = this.getClass().getDeclaredField(name);
              // If a FieldInfo annotation is defined for this field
              if (field.isAnnotationPresent(FieldInfo.class)) {
                  FieldInfo info = field.getAnnotation(FieldInfo.class);
                  // Returns the clientDefined element of the annotation
                  return info.clientDefined();
          } catch (NoSuchFieldException e) {
              // nothing
          return false;
  `FieldInfo` is an annotation and so is declared within the processors/annotation folder.
  This method is invoked from QueryController to set fields with values coming from the query or other confs.

+ `#initializeProcessor` sets field values for processors. Maybe we can *preprocess* the query to add the
  number or attribute lists and let the processor know that!! 
- - - 

webdefault.xml: server configuration (cache too)

## Martexplorer
+ Atleast for this app, which uses streaming, the form request returns an HTML page with `parent.biomart.datasource.write('results', <results>);` where `'results'` is an uuid.
+ `refreshParamCache` updates the params for the queries and the *step callback* at each user choise.

## Martreport

* `init()` is invoked when `biomart.init` is fired
* `ready()` is invoked when `biomart.initialized` is fired

#### init

Retrieves the query parameters from the URL of the page (`location.href`), manipulates them and attaches a callback to call after the `gui` is loaded. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.