[InterMine Dev] Strange behavior with SNP data

Richard Smith richard at flymine.org
Thu Aug 20 09:27:14 BST 2009


Hi Andrew,
Good question - this is actually one of the performance features of
InterMine.  In the default configuration serialised copies of objects
are stored in the InterMineObject table - this includes the values of
attributes and foreign keys for references (collections are held
separately).

When objects are read into the webapp it actually de-serialises by
object id from the InterMineObject table.  This gives a performance
improvement when considering inheritance in the data model, i.e. if
fetching from the the LocatedSequenceFeature table there are dozens
of subclasses, to retrieve all fields of all classes it may need to
query dozens of tables.

Instead, it can just fetch ids resulting from the query then pull the
objects either from cache or from the InterMineObject table.

More details:
http://www.intermine.org/wiki/GettingStarted#a7.2Objectrelationalmapping

So, it isn't feasible to update attributes with SQL statements because
while the value in the table (which gets queried) changes, the
serialised object does not.  Of course if you update the object and
store it again it will change in both places.

You can switch from this mode to a straight SQL mode which the
userprofile databases use.


Regards,
Richard.



Vallejos, Andrew wrote:
> I am not getting primary identifers showing up for my snps.
> 
>  
> 
> I have a link to the snp report page and the results from the postgres 
> database query.  The query shows that the primaryidentifier is set, its 
> equal to the name.  The original dbSNP.pl script set the name to the 
> name value.  Rather than rerun the XML generating script, I ran an sql 
> query to set the primaryidentifier equal to the name.  It seems to have 
> worked, except that we webapp does not want to display the id 
> information.  I will probably go back and update the dbSNP script, but 
> this behavior seems odd to me….
> 
>  
> 
> http://ratmine.mcw.edu/ratmine-webapp/objectDetails.do?id=763929527&trail=|query|results.6|763929527 
> <http://ratmine.mcw.edu/ratmine-webapp/objectDetails.do?id=763929527&trail=|query|results.6|763929527>
> 
>  
> 
> production-rat=# select * from snp limit 1;
> 
>  secondaryidentifier | chromosomestart | curated | allele2 | 
> primaryidentifier | length |    id     |       name       | snp | 
> allele1 | chromosomeend | chromosomeid | chromosomelocationid | 
> organismid | sequenceid |            class           
> 
> ---------------------+-----------------+---------+---------+-------------------+--------+-----------+------------------+-----+---------+---------------+--------------+----------------------+------------+------------+-----------------------------
> 
>                      |                 |         | T       | 
> ENSRNOSNP2336733  |        | 763929527 | ENSRNOSNP2336733 |     | 
> C       |               |    756050611 |            763929526 |  
> 755000000 |            | org.intermine.model.bio.SNP
> 
> (1 row)
> 
>  
> 
>  
> 
> ======================
> 
> Andrew Vallejos
> 
> Web Developer II
> 
> Biotechnology and Bioengineering Center
> 
> Medical College of Wisconsin
> 
> 414-955-4104
> 
> avallejos at mcw.edu
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> dev mailing list
> dev at mail.intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev




More information about the dev mailing list