view · edit · sidebar · attach · print · history

<< | Index | >>

20131203-integrate-epha-interaction-3

Summary

  • integrate a simple interface to display the interaction from EPHA

Commits

In Branch remove_legacy (Not to be pulled !!)

Index

---

integrate a simple interface to display the interaction from EPHA

Continue work. Example is still interaction is between Marcoumar and Aspirin.

Still banging my head because of the following three lines in plugin/epha_interactions.rb where I try to save all my new stuff.

        @app.epha_interactions.each{|item| item.odba_isolated_store}
        #@app.epha_interactions.odba_isolated_store 
        @app.odba_store

Remarked behaviour:

  1. with @app.epha_interactions.odba_isolated_store I get insufficient data in "T" message, but bin/admin reports epha_interactions.size of 8734
  2. with @app.epha_interactions.odba_store I get insufficient data in "T" message epha_interactions.size, but bin/admin reports epha_interactions.size of 8734
  3. without @app.epha_interactions.odba_store I get@@ no error message but bin/admin reports epha_interactions.size of 0!

Now trying with inverting the three lines (Dropping the database before)

        @app.odba_store
        @app.epha_interactions.odba_store
        @app.epha_interactions.each{|item| item.odba_store}

A first import completed successfully and bin/admin could verify the stuff correctly:

ch.oddb> epha_interactions.size
-> 8734
ch.oddb> epha_interactions.first
-> N06AB06;Sertralin;M03BX02;Tizanidin;Keine Interaktion;Tizanidin wird über CYP1A2 metabolisiert. Sertralin beeinflusst CYP1A2 jedoch nicht.;Keine Interaktion.;Die Kombination aus Sertralin und Tizanidi
ch.oddb> epha_interactions.last
-> C10AA55;Atorvastatin und Amlodipin;C10AA08;Pitavastatin;Gegenseitige Wirkungsbeeinflussung der Statine;Kompetition an der Bindungsstelle der HMG-CoA-Reduktase.;Durch die Kompetition an der Bindungsste

Running the import a second time. Found no problem. Added a small correction to move after the import the imported csv to *-latest.csv. This will enforce on the next run another download from Epha. Pushed the commits:

  1. Import of epha interaction csv
  2. Corrected order of odba_store. Better logging. Moving data to *latest.csv

Cleanup LEGACY_INTERFACE of htmlgrid

Created the following small utility to remove all references to LEGACY_INTERFACE

#!/usr/bin/env ruby
files = Dir.glob("**/*.rb")
files.each{
  |file|
    next if File.expand_path(file) == File.expand_path(__FILE__)
    content = IO.readlines(file)
    content.delete_if {|x| /LEGACY_INTERFACE = false/.match(x) }
    File.open(file, 'w+'){|out| out.write(content.join()) }
}

Running test/test_views/suite.rb produces now a lot of error. There seem to be quite a few views which are still based on the LEGACY_INTERFACE. Cleaning it up will take probable an hour or two.

Decided to revert to htmlgrid 1.0.6 while keeping a branch with the preliminary work. See commit Adapt to removal of LEGACY_INTERFACE. Problemtic and Added documentation on the failed removal of the LEGACY_INTERFACE and Revert to htmlgrid 1.0.6

On oddb-ci2 had to patch /var/lib/service/yus/run to the following:

#!/bin/sh
exec 2>&1
ulimit -v 1536000
cd /usr/local/src/yus  
# exec sudo -u apache /usr/local/bin/bundle exec ruby  bin/yusd
exec sudo -u apache /usr/local/ruby18/bin/bundle exec ruby18 bin/yusd    
view · edit · sidebar · attach · print · history
Page last modified on December 03, 2013, at 05:31 PM