greenelab / connectivity-search-backend

Django backend for hetnet connectivity search
https://search-api.het.io
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Log warning but don't fail when multiple pathcounts returned #44

Closed dhimmel closed 5 years ago

dhimmel commented 5 years ago

Refs https://github.com/greenelab/hetmech-backend/issues/43

dhimmel commented 5 years ago

Logging output as of https://github.com/greenelab/hetmech-backend/pull/44/commits/01ad5c153af794f78207c881c91d84f5b03a2653 for http://localhost:8000/v1/query-paths/?source=8224&target=32460&metapath=GpBPpG is like:

WARNING:root:get_paths returned 2 results, but database should not have more than one row (including inverse orientation) for GpBPpG from 8224 to 32460.
  dgp_id      dwpc        id metapath_id       p_value  path_count  source_id  target_id
 5813985  6.344973  42509492      GpBPpG  8.401434e-14         146       8224      32460
 5862663  6.344973  42603777      GpBPpG  8.401434e-14         146      32460       8224
[02/May/2019 16:17:07] "GET /v1/query-paths/?source=8224&target=32460&metapath=GpBPpG HTTP/1.1" 200 236941