PyDESeq2 icon indicating copy to clipboard operation
PyDESeq2 copied to clipboard

[RFC] Adding rpy2 (and R and deseq2) as test-only dependency.ies to have more flexible end2end tests

Open jeandut opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. As of now comparison between pydeseq2 and deseq2 necessitates to run deseq2 in R/r2py then save results in csvs in repository to later compare pydeseq2 back to it. This prevents flexibly testing different use-cases using parametrized tests varying i.e. design factors or read-counts values. For instance to test PR #181 one would have wanted to do something around the lines of:

import pytest
import rpy2

@pytest.mark.parametrize("design_factors, continuous_factors", [(["a", "a:b"], "a"), ("~ a + b + a:b", "c"), (["a:b:c", b"], None, (["a:b:c", b"],["a","b","c"])
def test_matching_deseq2(design_factors, continuous_factors):
    # Run deseq2 and pydeseq2 on the current design_factors, continuous_factors pair
    assert pydeseq2_result == deseq2_result

Describe the solution you'd like Adding rpy2 as a test-only dependency + installing R/deseq2 in the CI/tests should allow to run tests more flexibly and should keep regular install of pydeseq2 as lightweight as before.

What do you think @BorisMuzellec @mandreux-owkin @maikia ?

jeandut avatar Oct 19 '23 09:10 jeandut