view · edit · sidebar · attach · print · history

20131127-integrate-epha-interaction-2

<< | Index | >>


Summary

  • integrate a simple interface to display the interaction from EPHA

Commits

Index

---

integrate a simple interface to display the interaction from EPHA

Continue work. Example is still interaction is between Marcoumar and Aspirin. The import has problem that suddenly it takes way longer (e.g. it did not complete over night and stopped after line 2157). Added more debug output to see when each line is imported. Now this time it stops after line 2330. Limiting import to 100 lines to see whether at least the core functionality is okay. Now it completed in 25 seconds.

Using bin/admin to test I see that the following snippet

h.oddb> $e_ptr = create_epha_interaction('N06AB06', 'M03BX02')
-> 
ch.oddb> $e_ptr.class
-> ODDB::EphaInteraction
ch.oddb> $e_ptr.to_s
ch.oddb> epha_interactions.first.atc_code_self = 'N06AB06'
-> N06AB06
ch.oddb> epha_interactions.first.atc_code_other =  'M03BX02'
-> M03BX02
ch.oddb> epha_interactions.first
-> N06AB06;M03BX02
ch.oddb> epha_interactions.first.odba_store

But after the import looking asking using bin/admin epha_interactions.size returns 0.

But somehow a few things don't work exactly. E.g. calling delete_all_epha_interactions in bin/admin works in the bin/admin session. But after restarting bin/oddbd the old epha_interactions are still there.

But why does this simple snippet not work?

  def delete_all_epha_interactions
    @epha_interactions = []
    @epha_interactions.odba_store
  end

Found the error. Had to call @app.odba_store and not only @app.epha_interactions.odba_store, as the field epha_interactions is new. Now it works like a charm for 100. Importing now all, which finishes after 10 minutes loading all 8734 interactions. After restarting oddbd bin/admin reports the correct count and also displays the epha_interactions. E.g

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
view · edit · sidebar · attach · print · history
Page last modified on November 27, 2013, at 10:56 AM