Skip to content

Commit

Permalink
Added test for rate_diff_transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
ptajvar committed May 15, 2024
1 parent 1fe783e commit 00be3d6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
clr_transformation,
correct_pvalues,
log1p_transformation,
rate_diff_transformation,
rel_normalization,
)

Expand Down Expand Up @@ -120,6 +121,22 @@ def test_clr_standard_transformation_axis_1():
assert_frame_equal(norm_counts, expected)


def test_rate_diff_transformation():
antibody_counts = pd.DataFrame(
[[7.0, 3.0, 10.0], [10.0, 2.0, 5.0]],
columns=["A", "B", "C"],
index=["0000000", "0000001"],
)

norm_counts = rate_diff_transformation(antibody_counts)
expected = pd.DataFrame(
[[-2.189189, 0.2972973, 1.89189189], [2.189189, -0.2972973, -1.89189189]],
columns=["A", "B", "C"],
index=["0000000", "0000001"],
)
assert_frame_equal(norm_counts, expected)


def test_rel_normalization():
antibody_counts = pd.DataFrame(
[[7.0, 3.0, 10.0], [10.0, 2.0, 5.0]],
Expand Down

0 comments on commit 00be3d6

Please sign in to comment.