Re: FW: Chado Views Integration

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: FW: Chado Views Integration

Stephen Ficklin-2
Hi Lacey,

Sorry for my slow response.   We've recently been struggling with how to implement Views in Tripal.  We recognize that others may not want to look at the data in the pre-canned way we have organized it..  Thanks for taking the plunge and doing some work here!  

The point has been raised that we should perhaps try and integrate Drupal and chado into the same database schema.  Perhaps into different namespaces in the same database to avoid name collisions.   My initial thought would be to install Drupal into the chado database rather than the other way around.

I wanted to throw out this thought to see what others think?  It would mean that version 3.0 would not be backwards compatible with previous installations.


On Wed, Sep 1, 2010 at 5:07 PM, Stephen Ficklin <[hidden email]> wrote:

From: Lacey-Anne Sanderson[[hidden email]]
Sent: Wednesday, September 01, 2010 4:16:38 PM
To: GMOD Tripal; Stephen Ficklin
Subject: [Gmod-tripal] Chado Views Integration
Auto forwarded by a Rule I've created a drupal module that integrates chado fields with views (for those of you not familiar with drupal, the views module allows you to create filterable, sortable tables without programming). This module does not solve the problem of joining data between two databases. Instead, what it does is make chado fields available independent of drupal. Thus each table can only contain data from chado.

Tables that have been implemented: feature, organism, library, cvterm, cv, dbxref, db
There are also default views for feature, organism, library, cvterm, dbxref with sorting, filtering and access control built-in.

These tables do have access to the node ID (necessary to link these tables back to the drupal nodes) through means of a computed field. Essentially, each node ID is retrieved from the database individually using db_query and the chado ID (ie: feature_id, library_id, organism_id) during rendering of the table. Because this field doesn't exist in the database (chado) you can't sort or filter based on the node ID.

Implications of selecting data directly from chado independent of drupal:
  1. The views created select directly from chado and cannot include drupal content,                                                                                                                                                   
     this means:                                                                                                                                                                                                                       
     a) these views will contain data not sync'd with drupal                                                                                                                                                                           
     b) you cannot filter these views by any node fields such as published, user, etc.                                                                                                                                                 
     c) the node ID fields available are computed fields -meaning a database query is                                                                                                                                                  
        executed for every row of the table                                                                                                                                                                                            
  2. Default views are provided for features, organisms, libraries, cvterms, and dbxrefs                                                                                                                                               
  3. Currently only the base table (except in the case of cvterms and dbxrefs which also                                                                                                                                               
     implement cv and db respectively) are implemented. Thus you cannot currently access                                                                                                                                               
     properties, etc.                                                                                                                                                                                                                  
  4. For Database References, currently only the main feature database reference                                                                                                                                                       
     (ie: referenced by feature.dbxref_id) is being displayed.

Please comment if this is functionality that you want so that I know whether to implement more tables. Also any feedback would be welcome!


PS. Stephen: Is it okay that I set the package=Tripal?

This Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
Gmod-tripal mailing list
[hidden email]