about summary refs log tree commit diff
path: root/test/python/test_dev_token.py
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2026-11-15 04:09:45 +0000
committerPjotr Prins <pjotr.public01@thebird.nl>2026-11-15 04:09:45 +0000
commit6dc92df74ebfc1f54889d247946a16ba6af6c056 (patch)
treea498c7ccd4dea6c997286119bd7440529d106b82 /test/python/test_dev_token.py
parent07bf685a30c2e0d740fd22958a3a47ebaf48f98f (diff)
downloadgenenetwork4-6dc92df74ebfc1f54889d247946a16ba6af6c056.tar.gz
correlation: the live site answers Spearman whatever method it is asked for
Recorded next to `Method` so the next comparison does not chase a 0.005
disagreement in r for an afternoon.

GN2's `get_sample_r_and_p_values` takes a parameter called `type` and is
called with `corr_params['type']` -- "sample" -- where the method belongs,
so `if type == 'pearson'` is never true and `scipy.stats.spearmanr` always
runs. The method is used only on the tissue path.

Evidence, from the live site with `method=pearson&type=sample`:

  1427571_at vs 1447043_at   reported -0.8446202819617522
                             spearman   -0.8446202819617523
                             pearson    -0.8393085803732605
  1427571_at vs 1427641_at   reported -0.8479321530363810
                             spearman   -0.8479321530363810
                             pearson    -0.8451666639589470
  BXDPublish 10001 vs 17084  reported  1.0
                             spearman   1.0000000000000000
                             pearson    0.9757237677298747

Asked for spearman, our endpoint reproduces the live site's whole reply:
the same five traits in the same order, r to 2.2e-16, p to 5e-10
relative. Asked for pearson it reproduces the Pearson r of the values the
same site publishes, to 1.4e-8 (their sample_data endpoint rounds to three
decimals).

The live site stays the reference for the sample axis, the six-pair
overlap, the |r|-descending order and the reply shape. The statistic it is
asked for is the one place where it is not: it ignores the request.
Diffstat (limited to 'test/python/test_dev_token.py')
0 files changed, 0 insertions, 0 deletions